1 /* Copyright (C) 2004 Viktor T. Toth <http://www.vttoth.com/>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be
9 * useful, but WITHOUT ANY WARRANTY; without even the implied
10 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE. See the GNU General Public License for more details.
13 * ITENSOR frames, torsion, and nonmetricity demo
16 if get('itensor,'version)=false then load(itensor);
18 ("In a frame base, partial derivatives do not commute")$
19 idiff(v([i],[]),j,1,k,1)-idiff(v([i],[]),k,1,j,1);
21 ishow(idiff(v([i],[]),j,1,k,1)-idiff(v([i],[]),k,1,j,1))$
23 ("The Christoffel-symbols are replaced by connection coefficients")$
24 ishow(covdiff(v([i],[]),j))$
26 ("Which in turn are the sum of Christoffel-symbols and frame coefficients")$
27 ishow(icc2([i,j],[k]))$
29 ("The latter are defined in terms of the frame bracket and frame metric")$
30 ishow(ifc2([i,j],[k]))$
32 ("The frame bracket has two definitions which are equivalent")$
33 block([iframe_bracket_form:false],ishow(ifb([i,j,k])))$
34 block([iframe_bracket_form:true],ishow(ifb([i,j,k])))$
36 ("To explore torsion, we set up a metric but no contraction properties")$
39 decsym(g,2,0,[sym(all)],[]);
40 decsym(g,0,2,[],[sym(all)]);
41 ("First demonstrate that covariant differentiation commutes for scalars")$
45 ishow(covdiff(covdiff(f([],[]),i),j)-covdiff(covdiff(f([],[]),j),i))$
48 ("Now we introduce torsion")$
50 ishow(covdiff(covdiff(f([],[]),i),j)-covdiff(covdiff(f([],[]),j),i))$
51 exp:ishow(canform(%))$
55 ("Now we're ready to evaluate the contortion coefficients")$
57 exp:ishow(ev(%,ikt1))$
59 ("Noun forms of g are a side effect which we must get rid of")$
60 ishow(subst(g,nounify(g),exp))$
61 exp:ishow(canform(%))$
63 ("We declare itr antisymmetric, and contract g^2 to kdelta")$
64 decsym(itr,2,1,[anti(all)],[]);
66 exp:ishow(canform(exp))$
67 ("And we're quite done")$
70 ("We can verify torsion in a frame base, too")$
72 covdiff(v([i]),j)-covdiff(v([j]),i)$
73 ishow(contract(canform(ev(%,icc2,ifc2,ifc1,ikt2,ikt1,ifg))))$
75 ("Next, we verify the nonmetricity tensor")$
79 ("We need all the metric tensor's contraction properties")$
81 ishow(covdiff(g([i,j],[]),k))$
82 exp:ishow(ev(%,icc2))$
83 ("Now we can evaluate ichr2, inmc1, and simplify")$
84 exp:ishow(canform(contract(rename(expand(ev(exp,ichr2))))))$
85 ("In order to get the expected result:")$
86 ishow(canform(ev(exp,inmc1)))$
88 /* End of demo -- comment line needed by MAXIMA to resume demo menu */