Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89f4ab8
commit 11f5ddd
Showing
1 changed file
with
76 additions
and
0 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
sample/math/geometry/riemann-curvature-tensor-of-M5-conformal.egi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')))) |