Verification of properties of n-dimensional sphere metrics

<< EDCRGTCcode.m

Define angular coordinates and metric for an n-dimensionsal sphere of radius r embedded in an n+1 Euclidean space:

xIN[n_] := θ /@ Range[n]

diagTerms[n_] := 
      If[n === 1, {1},  
        Join[{1}, Sin[θ[n]]^2  diagTerms[n - 1]]]

gIN[n_] := 
      r^2  DiagonalMatrix[
          diagTerms[
              n] /. θ[k_] :> θ[
                n + 1 - k]]

xIN[3]

gIN[3]

Use TrigRules:

simpRules = TrigRules

All such mannifolds are spaces of constant curvature. They are, therefore, conformally flat and satisfy Rdd=R/n gdd;  
	Can this be verified using RGtensors?

RGtensors[gIN[2], xIN[2]]

RGtensors[gIN[3], xIN[3]]

The test for 3-dim conformal-flatness fails because a new trigonometric identity is needed: Cot[θ] - Cos[θ]^2 Cot[θ] - 
        Cos[θ] Sin[θ]. 
However, a 3-dim Einstein Space is necessarily a space of constant curvature.

test3dConfFlat = 
      Block[{tmp$ = 
            covD[Rdd] - Outer[Times, gdd, covD[R]/2/(Dim - 1)]}, 
        FacSimp[tmp$ - Transpose[tmp$, {1, 3, 2}]]]

FacSimp[%]

Simplify[%]

RGtensors[gIN[4], xIN[4]]

For n>4, further simplifications are required in order to verify that these are Einstein Spaces and Conformally Flat, which together imply that they are Spaces of Constatnt Curvature.

RGtensors[gIN[5], xIN[5]]

FacSimp[Rdd - 1/Dim*R*gdd]

FacSimp[%]

zeroQ[Wdddd]

zeroQ[Wdddd /. simpRules]

RGtensors[gIN[6], xIN[6]]

FacSimp[Rdd - 1/Dim*R*gdd]

FacSimp[%]

indepTerms[Flatten[Wdddd]]

zeroQ[Wdddd /. simpRules]

RGtensors[gIN[7], xIN[7]]

FacSimp[Rdd - 1/Dim*R*gdd]

FacSimp[%]

FacSimp[%]

indepTerms[Flatten[Wdddd]]

zeroQ[Wdddd /. simpRules]

zeroQ[FacSimp[Wdddd]]