Geometry of spheres

given dimension: construct metric using polar coordinates, compute curvature, check that Riemann curvature equals symmetrized outer product of metric, Ricci is proportional to metric, Ricci scalar is determined by dimension

<<EDCRGTCcode.m

dim=3;
run[dim_]:=(coords=Table[α[k],{k,1,dim}];ansatz=DiagonalMatrix[Table[Product[((Sin[α[k]])^2),{k,1,j-1}],{j,1,dim}]];RGtensors[ansatz,coords];
{Rdddd==Transpose[Outer[Times,gdd,gdd],{1,3,2,4}]-Transpose[Outer[Times,gdd,gdd],{1,4,2,3}]//Simplify,
Rdd==(dim-1)gdd//Simplify,
R==dim(dim-1)//Simplify})

compute away:

run[1]
GUdd

run[2]
GUdd[[1]]//MatrixForm
GUdd[[2]]//MatrixForm

run[3]
GUdd[[1]]//MatrixForm
GUdd[[2]]//MatrixForm
GUdd[[3]]//MatrixForm

run[4]
GUdd[[1]]//MatrixForm
GUdd[[2]]//MatrixForm
GUdd[[3]]//MatrixForm
GUdd[[4]]//MatrixForm

run[5]
GUdd[[1]]//MatrixForm
GUdd[[2]]//MatrixForm
GUdd[[3]]//MatrixForm
GUdd[[4]]//MatrixForm
GUdd[[5]]//MatrixForm

run[6]