;;; ;;; Parameters ;;; (define \$x [|θ φ ψ η δ|]) (define \$X [|(* r (cos θ)) (* r (sin θ) (cos φ)) (* r (sin θ) (sin φ) (cos ψ)) (* r (sin θ) (sin φ) (sin ψ) (cos η)) (* r (sin θ) (sin φ) (sin ψ) (sin η) (cos δ)) (* r (sin θ) (sin φ) (sin ψ) (sin η) (sin δ)) |]) ;; ;; Local basis ;; (define \$e ((flip ∂/∂) x~# X_#)) e ;[|[| (* -1 r (sin θ)) (* r (cos θ) (cos φ)) (* r (cos θ) (sin φ) (cos ψ)) (* r (cos θ) (sin φ) (sin ψ) (cos η)) (* r (cos θ) (sin φ) (sin ψ) (sin η) (cos δ)) (* r (cos θ) (sin φ) (sin ψ) (sin η) (sin δ)) |] ; [| 0 (* -1 r (sin θ) (sin φ)) (* r (sin θ) (cos φ) (cos ψ)) (* r (sin θ) (cos φ) (sin ψ) (cos η)) (* r (sin θ) (cos φ) (sin ψ) (sin η) (cos δ)) (* r (sin θ) (cos φ) (sin ψ) (sin η) (sin δ)) |] ; [| 0 0 (* -1 r (sin θ) (sin φ) (sin ψ)) (* r (sin θ) (sin φ) (cos ψ) (cos η)) (* r (sin θ) (sin φ) (cos ψ) (sin η) (cos δ)) (* r (sin θ) (sin φ) (cos ψ) (sin η) (sin δ)) |] ; [| 0 0 0 (* -1 r (sin θ) (sin φ) (sin ψ) (sin η)) (* r (sin θ) (sin φ) (sin ψ) (cos η) (cos δ)) (* r (sin θ) (sin φ) (sin ψ) (cos η) (sin δ)) |] ; [| 0 0 0 0 (* -1 r (sin θ) (sin φ) (sin ψ) (sin η) (sin δ)) (* r (sin θ) (sin φ) (sin ψ) (sin η) (cos δ)) |] |] ;; ;; Metric tensor ;; (define \$g__ (generate-tensor 2#(V.* e_%1 e_%2) {5 5})) (define \$g~~ (M.inverse g_#_#)) g_#_#;[| [| r^2 0 0 0 0 |] [| 0 (* r^2 (sin θ)^2) 0 0 0 |] [| 0 0 (* r^2 (sin θ)^2 (sin φ)^2) 0 0 |] [| 0 0 0 (* r^2 (sin θ)^2 (sin φ)^2 (sin ψ)^2) 0 |] [| 0 0 0 0 (* r^2 (sin θ)^2 (sin φ)^2 (sin ψ)^2 (sin η)^2) |] |]_#_# g~#~#;[| [| (/ 1 r^2) 0 0 0 0 |] [| 0 (/ 1 (* r^2 (sin θ)^2)) 0 0 0 |] [| 0 0 (/ 1 (* r^2 (sin θ)^2 (sin φ)^2)) 0 0 |] [| 0 0 0 (/ 1 (* r^2 (sin θ)^2 (sin φ)^2 (sin ψ)^2)) 0 |] [| 0 0 0 0 (/ 1 (* r^2 (sin θ)^2 (sin φ)^2 (sin ψ)^2 (sin η)^2)) |] |]~#~# (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 \$Γ_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} (. g~#~i Γ_i_#_#))) Γ~#_#_# ;; ;; Riemann curvature tensor ;; (define \$R~i_j_k_l (with-symbols {m} (+ (- (∂/∂ Γ~i_j_l x~k) (∂/∂ Γ~i_j_k x~l)) (- (. Γ~m_j_l Γ~i_m_k) (. Γ~m_j_k Γ~i_m_l))))) R~#_#_#_# (define \$R____ (with-symbols {i} (. g_i_# R~i_#_#_#))) R_#_#_#_# ;; ;; Ricci curvature ;; (define \$Ric__ (with-symbols {i} (contract + R~i_#_i_#))) Ric_#_#;[| [| 4 0 0 0 0 |] [| 0 (* 4 (sin θ)^2) 0 0 0 |] [| 0 0 (* 4 (sin θ)^2 (sin φ)^2) 0 0 |] [| 0 0 0 (* 4 (sin θ)^2 (sin φ)^2 (sin ψ)^2) 0 |] [| 0 0 0 0 (* 4 (sin θ)^2 (sin φ)^2 (sin ψ)^2 (sin η)^2) |] |]_#_# ;; ;; Scalar curvature ;; (define \$scalar-curvature (with-symbols {j k} (. g~j~k Ric_j_k))) scalar-curvature;(/ 20 r^2) ;; ;; Conformal curvature tensor ;; (define \$C_i_k_l_m (+ (. R_i_k_l_m) (+ (- (. Ric_i_m g_k_l) (. Ric_i_l g_k_m)) (- (. Ric_k_l g_i_m) (. Ric_k_m g_i_l))) (* (/ scalar-curvature 2) (- (. g_i_l g_k_m) (. g_i_m g_k_l))))) C_#_#_#_# ;; ;; Wodzicki-Chern-Simons class ;; (let {[[\$es \$os] (even-and-odd-permutations 5)]} (- (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