Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
egisatoshi committed Mar 10, 2017
1 parent 89f4ab8 commit 11f5ddd
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions sample/math/geometry/riemann-curvature-tensor-of-M5-conformal.egi
@@ -0,0 +1,76 @@
;;;
;;; Polar coordinates
;;;

(define $x [|α β γ δ ε|])

;;
;; Metric tensor
;;

(define $g__ (generate-tensor 2#(* (a α β γ δ ε) G_%1_%2) {5 5}))
(define $g~~ (M.inverse g_#_#))
g_#_#
g~#~#

(with-symbols {i j k} (. g~i~j g_j_k))
;[| [| 1 0 0 0 0 |] [| 0 1 0 0 0 |] [| 0 0 1 0 0 |] [| 0 0 0 1 0 |] [| 0 0 0 0 1 |] |]

;;
;; Christoffel symbols of the first kind
;;

(define $Γ___
(with-symbols {j k l}
(* (/ 1 2)
(+ (∂/∂ g_j_l x_k)
(∂/∂ g_j_k x_l)
(* -1 (∂/∂ g_k_l x_j))))))

Γ_#_#_#

;;
;; Christoffel symbols of the second kind
;;

(define $Γ~__
(with-symbols {i j k l}
(. g~i~j Γ_j_k_l)))

Γ~#_#_#

;;
;; Riemann curvature tensor
;;

(define $R~___
(+ (- (∂/∂ Γ~i_j_k x_l) (∂/∂ Γ~i_j_l x_k))
(- (. Γ~m_j_k Γ~i_m_l) (. Γ~m_j_l Γ~i_m_k))))

R~#_#_#_#

;;
;; Ricci curvature
;;

(define $Ric__ (with-symbols {i j k} (contract + R~i_j_k_i)))

Ric_#_#

;;
;; Scalar curvature
;;

(define $scalar-curvature (with-symbols {j k} (. g~j~k Ric_j_k)))

scalar-curvature

;;
;; Wodzicki-Chern-Simons form
;;

(let* {[[$es $os] (even-and-odd-permutations 5)]
[$es' (map 1#(lambda [$i] (nth i %1)) es)]
[$os' (map 1#(lambda [$i] (nth i %1)) os)]}
(- (sum (map (lambda [$σ] (. R~u_1_s_(σ 1) R~s_t_(σ 3)_(σ 2) R~t_u_(σ 5)_(σ 4))) es'))
(sum (map (lambda [$σ] (. R~u_1_s_(σ 1) R~s_t_(σ 3)_(σ 2) R~t_u_(σ 5)_(σ 4))) os'))))

0 comments on commit 11f5ddd

Please sign in to comment.