6.3. Tests

This is a collection of 54 examples, all of which must return 0.

First we add several indices:

In[131]:=

AddIndices[TangentM, {a1, a10, a11, a2, a20, a22, a3, a30, a4, a40, a5, a50, a6, a60, a7, a8, a9, b0, i1, i10, i11, i2, i20, i22, i3, i30, i4, i40, i5, i50, i6, i60, i7, i8, i9}]

Shortcuts:

In[132]:=

inv = RInv[metric] ;

dinv = DualRInv[metric] ;

Test of RiemannToInv and InvToRiemann:

In[134]:=

test[1] = CD[-h] @ CD[-a] @ RiemannCD[a, b, c, d] RiemannCD[-b, -d, e, f] CD[-g] @ CD[-c] @ RiemannCD[-e, -f, g, h] + inv[{0, 2, 2}, 1157] ;

test[2] = RiemannCD[-a, e, f, g] RiemannCD[a, b, c, d] RiemannCD[h, i, j, k] CD[-d][RiemannCD[-h, -i, -j, -k]] CD[-e][RiemannCD[-b, -c, -f, -g]] - inv[{0, 0, 0, 1, 1}, 27015] ;

test[3] = RiemannCD[a, b, c, d] CD[-h] @ CD[-g] @ CD[-c] @ CD[h] @ CD[-f] @ CD[-e] @ CD[-d] @ CD[g][RiemannCD[-a, e, -b, f]] + inv[{0, 8}, 20018] ;

test[4] = epsilonmetric[-b, -d, -g, -h] CD[-c] @ CD[-a] @ CD[-f][RiemannCD[g, f, -e, h]] CD[e][RiemannCD[a, b, c, d]] - dinv[{1, 3}, 914] ;

In[138]:=

RiemannToInv/@Array[test, 4]

Reading InvRules for step 1 and case  {0, 2, 2}

Reading InvRules for step 1 and case  {0, 0, 0, 1, 1}

Reading InvRules for step 1 and case  {0, 8}

Reading DualInvRules for step 1 and case  {1, 3}

Out[138]=

{0, 0, 0, 0}

In[139]:=

InvToRiemann/@Array[test, 4]//NoScalar//ToCanonical

Out[139]=

{0, 0, 0, 0}

More tests of RiemannToInv, with algebraic invariants:

In[140]:=

test[6] := inv[1, 1] * dinv[2, 1] - (RiemannCD[i11, i22, -i11, -i22]) * (RiemannCD[i1, i2, -i1, i3] * RiemannCD[-i2, i4, i5, i6] * epsilonmetric[-i3, -i4, -i5, -i6]) ;

In[144]:=

RiemannToInv/@Array[test, 4, 5]//AbsoluteTiming

Out[144]=

{0.461524 Second, {0, 0, 0, 0}}

In this case we need to guide the computation due to the products of epsilon tensors:

In[145]:=

In[146]:=

test[9]//ExpandGdelta//ContractMetric//RiemannToInv//InvSimplify//Simplify

Out[146]=

0

Tests of RiemannSimplify:

In[147]:=

test[11] := RiemannCD[a1, a2, -a1, a3] * RiemannCD[-a2, a4, -a3, a5] * RiemannCD[-a4, a6, a7, a8] * epsilonmetric[-a5, -a6, -a7, -a8] ;

test[12] := RiemannCD[a1, a2, a3, -a1] * RiemannCD[-a3, a5, -a2, a4] * RiemannCD[-a4, a6, a8, a7] * epsilonmetric[-a5, -a7, -a8, -a6] ;

In[151]:=

RiemannSimplify/@Array[test, 5, 10]//AbsoluteTiming

Out[151]=

{0.434133 Second, {0, 0, 0, 0, 0}}

Tests of the cyclic symmetries:

In[152]:=

test[15] := inv[2, 3] - 1/2 * inv[2, 2] - inv[3, 6] + 1/2 * inv[3, 5] ;

test[16] := -inv[4, 38] + 1/4 * inv[4, 23] - inv[4, 26] + inv[4, 36] ;

test[17] := inv[6, 31] - inv[5, 203] - inv[5, 200] + inv[5, 201] - 1/4 * inv[6, 27] ;

test[18] := -inv[6, 1575] + 3/4 * inv[6, 1219] + 1/2 * inv[6, 1223] + inv[6, 1572] - 3/2 * inv[6, 1221] ;

test[19] := inv[7, 15138] - 1/2 * inv[7, 12749] - inv[6, 1524] + inv[6, 1523] - 1/2 * inv[6, 1161] ;

test[20] := -inv[7, 16207] - 1/4 * inv[7, 12848] + inv[7, 16206] ;

test[22] := dinv[2, 1] + dinv[3, 1] ;

test[23] := -dinv[3, 27] - 1/4 * dinv[3, 14] + 1/2 * dinv[3, 23] + dinv[4, 1] - dinv[4, 3] + 1/2 * dinv[4, 2] - 7 * dinv[4, 9] + dinv[4, 11] - 1/2 * dinv[4, 10] ;

test[24] := dinv[4, 231] + dinv[4, 232] + dinv[5, 1] + dinv[5, 3] - 1/2 * dinv[5, 2] + 10 * dinv[5, 8] + dinv[5, 9] - dinv[5, 10] ;

test[25] := -dinv[5, 2560] + 2 * dinv[5, 2505] - dinv[5, 2507] - dinv[5, 2551] ;

In[163]:=

$InvSimplifyLevel = 2 ;

In[164]:=

InvSimplify/@Array[test, 11, 15]//AbsoluteTiming

Out[164]=

{0.081885 Second, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}

In[165]:=

test[26] = inv[{1, 1, 4}, 15073] + inv[{1, 1, 4}, 15063]/4 - inv[{1, 1, 4}, 15072] ;

test[27] = dinv[{1, 3}, 914] - dinv[{1, 3}, 908]/4 ;

test[28] = inv[{0, 0, 0, 1, 1}, 27015] + 2inv[{0, 0, 0, 1, 1}, 26365] ;

test[29] = inv[{8}, 1116] + inv[{8}, 1092] - inv[{8}, 1115] ;

In[169]:=

InvSimplify/@Array[test, 4, 26]

Reading InvRules for step 2 and case  {1, 1, 4}

Reading InvRules for step 2 and case  {0, 0, 0, 1, 1}

Out[169]=

{0, 0, 0, 0}

Tests of the Bianchi relations:

In[170]:=

test[30] = inv[{1, 1, 4}, 15072] - inv[{1, 1, 4}, 1750] + inv[{1, 1, 4}, 1751] - 2inv[{1, 1, 4}, 1753] - inv[{1, 1, 4}, 1754] ;

test[31] = dinv[{1, 3}, 908] + 4dinv[{1, 3}, 328] - 4dinv[{1, 3}, 332] ;

test[32] = inv[{0, 0, 0, 1, 1}, 26365] + 4inv[{0, 0, 0, 1, 1}, 26327] - 4inv[{0, 0, 0, 1, 1}, 26335] ;

test[33] = inv[{8}, 1092] + inv[{8}, 1090] - inv[{8}, 1091] ;

In[174]:=

$InvSimplifyLevel = 3 ;

In[175]:=

InvSimplify/@Array[test, 4, 30]

Reading InvRules for step 3 and case  {1, 1, 4}

Reading InvRules for step 3 and case  {0, 0, 0, 1, 1}

Out[175]=

{0, 0, 0, 0}

Tests of the commutation relations:

In[176]:=

test[34] = inv[{0, 0, 4}, 70] - inv[{0, 0, 0, 2}, 50] - inv[{0, 0, 1, 1}, 100] ;

test[36] = -dinv[{1, 3}, 11] + dinv[{1, 3}, 10] + dinv[{0, 1, 1}, 2] - dinv[{0, 1, 1}, 4] - 2dinv[{0, 1, 1}, 6] + dinv[{0, 1, 1}, 88] - 2dinv[{0, 1, 1}, 89] ;

test[37] = dinv[{1, 3}, 5] - dinv[{0, 1, 1}, 1] - dinv[{0, 1, 1}, 18]/2 ;

In[180]:=

$InvSimplifyLevel = 4 ;

In[181]:=

InvSimplify/@Array[test, 4, 34]

Reading DualInvRules for step 2 and case  {0, 1, 1}

Reading DualInvRules for step 3 and case  {0, 1, 1}

Reading DualInvRules for step 4 and case  {0, 1, 1}

Out[181]=

{0, 0, 0, 0}

Tests of the dimension dependent relations:

In[182]:=

test[38] := -inv[3, 3] + 1/4 * inv[1, 1]^3 - 2 * inv[3, 1] + 1/4 * inv[1, 1] * inv[2, 2] + 2 * inv[3, 2] - 2 * inv[1, 1] * inv[2, 1] ;

test[42] := -dinv[3, 23] + 1/2 * dinv[3, 13] + dinv[3, 2] - 3/8 * inv[1, 1] * dinv[2, 2] - dinv[4, 2] - 1/2 * inv[1, 1] * dinv[3, 2] ;

In[188]:=

$InvSimplifyLevel = 5 ;

In[189]:=

InvSimplify/@Array[test, 6, 38]//AbsoluteTiming

Out[189]=

{0.081822 Second, {0, 0, 0, 0, 0, 0}}

In[190]:=

test[45] = dinv[{0, 0, 2}, 95] + dinv[{0, 0}, 2] inv[{2}, 1]/4 ;

test[47] = dinv[{0, 1, 1}, 4] + dinv[{0, 1, 1}, 1]/2 + dinv[{0, 1, 1}, 2] - dinv[{0, 1, 1}, 3] ;

In[194]:=

InvSimplify/@Array[test, 4, 44]

Reading InvRules for step 2 and case  {1, 2, 3}

Reading InvRules for step 3 and case  {1, 2, 3}

Reading NEInvRules for step 4 and case  {1, 2, 3}

Reading InvRules for step 5, case  {1, 2, 3}  and dimension 4

Reading DualInvRules for step 2 and case  {0, 0, 2}

Reading DualInvRules for step 3 and case  {0, 0, 2}

Reading DualInvRules for step 4 and case  {0, 0, 2}

Reading DualInvRules for step 5 and case  {0, 0, 2}

Reading InvRules for step 2 and case  {0, 3, 3}

Reading InvRules for step 3 and case  {0, 3, 3}

Reading NEInvRules for step 4 and case  {0, 3, 3}

Reading InvRules for step 5, case  {0, 3, 3}  and dimension 4

Reading DualInvRules for step 5 and case  {0, 1, 1}

Out[194]=

{0, 0, 0, 0}

Test of the signature dependent relations:

In[195]:=

In[196]:=

$InvSimplifyLevel = 6 ;

In[197]:=

test[48]//InvSimplify

Out[197]=

0

In[198]:=

test[50] = inv[{0, 0, 1, 1}, 1104] - dinv[{0, 0}, 2] dinv[{1, 1}, 25]/4 - inv[{0, 0, 1, 1}, 1098]/2 ;

In[202]:=

InvSimplify/@Array[test, 4, 49]

Reading DualInvRules for step 2 and case  {1, 1}

Reading DualInvRules for step 3 and case  {1, 1}

Reading DualInvRules for step 4 and case  {1, 1}

Reading DualInvRules for step 5 and case  {1, 1}

Reading InvRules for step 2 and case  {1, 1, 1, 1}

Reading InvRules for step 3 and case  {1, 1, 1, 1}

Reading InvRules for step 4 and case  {1, 1, 1, 1}

Reading InvRules for step 5, case  {1, 1, 1, 1}  and dimension 4

Reading InvRules for step 6, case  {1, 1, 1, 1}  and dimension 4

Reading DualInvRules for step 5 and case  {1, 3}

Reading InvRules for step 2 and case  {0, 0, 1, 3}

Reading InvRules for step 3 and case  {0, 0, 1, 3}

Reading InvRules for step 4 and case  {0, 0, 1, 3}

Reading InvRules for step 5, case  {0, 0, 1, 3}  and dimension 4

Reading InvRules for step 6, case  {0, 0, 1, 3}  and dimension 4

Reading DualInvRules for step 2 and case  {2, 2}

Reading DualInvRules for step 3 and case  {2, 2}

Reading DualInvRules for step 4 and case  {2, 2}

Reading DualInvRules for step 5 and case  {2, 2}

Reading DualInvRules for step 2 and case  {0, 2}

Reading DualInvRules for step 3 and case  {0, 2}

Reading DualInvRules for step 4 and case  {0, 2}

Reading DualInvRules for step 5 and case  {0, 2}

Reading InvRules for step 2 and case  {0, 0, 2, 2}

Reading InvRules for step 3 and case  {0, 0, 2, 2}

Reading InvRules for step 4 and case  {0, 0, 2, 2}

Out[202]=

{0, 0, 0, 0}

Test of WeylToRiemann:

In[203]:=

In[204]:=

test[53]//WeylToRiemann//Simplify//AbsoluteTiming

Out[204]=

{0.027630 Second, 0}

Test of ContractCurvature:

In[205]:=

test[54] := RiemannCD[c, d, -c, -d] * RiemannCD[a, f, b, -f] * RiemannCD[-a, -b, h, l] * metric[-h, -l] - RicciScalarCD[] * RicciCD[a, b] * RiemannCD[-a, -b, h, l] * metric[-h, -l] ;

In[206]:=

test[54]//ContractCurvature//ContractMetric//AbsoluteTiming

Out[206]=

{0.004365 Second, 0}

Tidy up:

In[207]:=

RemoveIndices[TangentM, {a1, a10, a11, a2, a20, a22, a3, a30, a4, a40, a5, a50, a6, a60, a7, a8, a9, b0, i1, i10, i11, i2, i20, i22, i3, i30, i4, i40, i5, i50, i6, i60, i7, i8, i9}] ;

Remove[test]


Created by Mathematica  (May 16, 2008) Valid XHTML 1.1!