1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939 |
- Tue Jan 5 22:09:49 MET 1999
- REDUCE 3.7, 15-Jan-99 ...
- 1: 1:
- 2: 2: 2: 2: 2: 2: 2: 2: 2:
- 3: 3: % Test of CANTENS.RED
- %
- % Authors: H. Caprasse <hubert.caprasse@ulg.ac.be>
- %
- % Version and Date: Version 1.1, 15 September 1998.
- %----------------------------------------------------------------
- off errcont;
- % Default :
- onespace ?;
- yes
- wholespace_dim ?;
- dim
-
- global_sign ? ;
- 1
-
- signature ?;
- 0
-
- % answers to the 4 previous commands: yes, dim, 1, 0
- wholespace_dim 4;
- 4
-
- signature 1;
- 1
- global_sign(-1);
- -1
- % answers to the three previous commands: 4, 1, (-1)
- % answer to the command below: {}
- show_spaces();
- {}
- % Several spaces:
- off onespace;
- onespace ?;
- no
-
- % answer: no
- show_spaces();
- {}
- define_spaces wholespace={6,signature=1,indexrange=0 .. 5};
- t
- % indexrange command is superfluous since 'wholespace':
- show_spaces();
- {{wholespace,6,signature=1,indexrange=0 .. 5}}
- rem_spaces wholespace;
- t
- define_spaces wholespace={11,signature=1};
- t
-
- define_spaces mink={4,signature=1,indexrange=0 .. 3};
- t
-
- define_spaces eucl={6,euclidian,indexrange=4 .. 9};
- t
-
- show_spaces();
- {{wholespace,11,signature=1},
- {mink,4,signature=1,indexrange=0 .. 3},
- {eucl,6,euclidian,indexrange=4 .. 9}}
- %
- % if input error or modifications necessary:
- %
- define_spaces eucl={7,euclidian,indexrange=4 .. 10};
- *** Warning: eucl cannot be (or is already) defined as space identifier
- t
- %
- % do:
- %
- rem_spaces eucl;
- t
- define_spaces eucl={7,euclidian,indexrange=4 .. 10};
- t
- show_spaces();
- {{wholespace,11,signature=1},
- {mink,4,signature=1,indexrange=0 .. 3},
- {eucl,7,euclidian,indexrange=4 .. 10}}
- % done
- %
- define_spaces eucl1={1,euclidian,indexrange=11 .. 11};
- t
-
- show_spaces();
- {{wholespace,11,signature=1},
- {mink,4,signature=1,indexrange=0 .. 3},
- {eucl,7,euclidian,indexrange=4 .. 10},
- {eucl1,1,euclidian,indexrange=11 .. 11}}
- rem_spaces wholespace,mink,eucl,eucl1;
- t
- show_spaces();
- {}
- %
- % Indices can be made to belong to a subspace or replaced
- % in the whole space:
- define_spaces eucl={3,euclidean};
- t
- show_spaces();
- {{eucl,3,euclidean}}
- mk_ids_belong_space({a1,a2},eucl);
- t
- % a1,a2 belong to the subspace eucl.
- mk_ids_belong_anyspace a1,a2;
- t
- % replaced in the whole space.
- rem_spaces eucl;
- t
- %%
- %% GENERIC TENSORS:
- on onespace;
- wholespace_dim dim;
- dim
- tensor te;
- t
-
- te(3,a,-4,b,-c,7);
- 3 a b 7
- te
- 4 c
-
- te(3,a,{x,y},-4,b,-c,7);
- 3 a b 7
- te (x,y)
- 4 c
- te(3,a,-4,b,{u,v},-c,7);
- 3 a b 7
- te (u,v)
- 4 c
- te({x,y});
- te(x,y)
-
- make_variables x,y;
- t
- te(x,y);
- te(x,y)
- te(x,y,a);
- a
- te (x,y)
-
-
- remove_variables x;
- t
- te(x,y,a);
- x a
- te (y)
-
- remove_variables y;
- t
- %
- % implicit dependence:
- %
- operator op2;
- depend op1,op2(x);
- df(op1,op2(x));
- df(op1,op2(x))
- % the next response is 0:
- df(op1,op2(y));
- 0
- clear op2;
- % case of a tensor:
- operator op1;
- depend te,op1(x);
-
- df(te(a,-b),op1(x));
- a
- df(te ,op1(x))
- b
- % next the outcome is 0:
- df(te(a,-b),op1(y));
- 0
- %
- tensor x;
- t
- depend te,x;
- % outcome is NOT 0:
- df(te(a,-b),x(c));
- a c
- df(te ,x )
- b
- %
- % Substitutions:
- sub(a=-c,te(a,b));
- b
- te
- c
- sub(a=-1,te(a,b));
- b
- te
- 1
-
- % the following operation is wrong:
- sub(a=-0,te(a,b));
- 0 b
- te
-
- % should be made as following to be correct:
- sub(a=-!0,te(a,b));
- b
- te
- 0
-
- % dummy indices recognition
- dummy_indices();
- {}
- te(a,b,-c,-a);
- a b
- te
- c a
- dummy_indices();
- {a}
- te(a,b,-c,-a);
- a b
- te
- c a
- dummy_indices();
- {a}
- % hereunder an error message correctly occurs:
- on errcont;
- te(a,b,-c,a);
- ***** ((c) (a b a)) are inconsistent lists of indices
- off errcont;
- sub(c=b,te(a,b,-c,-a));
- a b
- te
- b a
- dummy_indices();
- {b,a}
- % dummy indices suppression:
- on errcont;
- te(d,-d,d);
- ***** ((d) (d d)) are inconsistent lists of indices
- off errcont;
- dummy_indices();
- {d,b,a}
- rem_dummy_indices d;
- t
- te(d,d);
- d d
- te
- dummy_indices();
- {b,a}
- rem_dummy_indices a,b;
- t
- onespace ?;
- yes
- % case of space of integer dimension:
- wholespace_dim 4;
- 4
- signature 0;
- 0
- % 7 out of range
- on errcont;
- te(3,a,-b,7);
- ***** numeric indices out of range
- off errcont;
- te(3,a,-b,3);
- 3 a 3
- te
- b
- te(4,a,-b,4);
- 4 a 4
- te
- b
- % an 'out-of-range' error is issued:
- on errcont;
- sub(a=5,te(3,a,-b,3));
- ***** numeric indices out of range
- off errcont;
- signature 1;
- 1
- % now indices should run from 0 to 3 => error:
- on errcont;
- te(4,a,-b,4);
- ***** numeric indices out of range
- off errcont;
- % correct:
- te(0,a,-b,3);
- 0 a 3
- te
- b
- %
- off onespace;
- define_spaces wholespace={4,euclidean};
- t
- % We MUST say that te BELONG TO A SPACE, here to wholespace:
- make_tensor_belong_space(te,wholespace);
- wholespace
- on errcont;
- te(a,5,-b);
- ***** numeric indices out of range
- off errcont;
- te(a,4,-b);
- a 4
- te
- b
- rem_spaces wholespace;
- t
- define_spaces wholespace={5,signature=1};
- t
- define_spaces eucl={1,signature=0};
- t
- show_spaces();
- {{wholespace,5,signature=1},
- {eucl,1,signature=0}}
- make_tensor_belong_space(te,eucl);
- eucl
- te(1);
- 1
- te
- % hereunder, an error message is issued:
- on errcont;
- te(2);
- ***** numeric indices out of range
- off errcont;
- % hereunder, an error message should be issued, it is not
- % because no indexrange has been declared:
- te(0);
- 0
- te
- rem_spaces eucl;
- t
- define_spaces eucl={1,signature=0,indexrange=1 .. 1};
- t
- % NOW an error message is issued:
- on errcont;
- te(0);
- ***** numeric indices do not belong to (sub)-space
- off errcont;
- te(1);
- 1
- te
- % again an error message:
- on errcont;
- te(2);
- ***** numeric indices do not belong to (sub)-space
- off errcont;
- %
- rem_dummy_indices a,b,c,d;
- t
- % symmetry properties:
- %
- symmetric te;
- te(a,-b,c,d);
- a c d
- te
- b
- remsym te;
- antisymmetric te;
- te(a,b,-c,d);
- a b d
- - te
- c
- remsym te;
- % mixed symmetries:
- tensor r;
- t
- %
- symtree(r,{!+,{!-,1,2},{!-,3,4}});
- ra:=r(b,a,c,d)$
-
- canonical ra;
- a b c d
- - r
-
- ra:=r(c,d,a,b)$
- canonical ra;
- a b c d
- r
- % here canonical is short-cutted
- ra:=r(b,b,c,a);
- ra := 0
- %
- % symmetrization:
- on onespace;
- symmetrize(r(a,b,c,d),r,permutations,perm_sign);
- a b c d a b d c a c b d a c d b a d b c a d c b b a c d
- r - r - r + r + r - r - r
- b a d c b c a d b c d a b d a c b d c a c a b d c a d b
- + r + r - r - r + r + r - r
- c b a d c b d a c d a b c d b a d a b c d a c b d b a c
- - r + r + r - r - r + r + r
- d b c a d c a b d c b a
- - r - r + r
- canonical ws;
- a b c d a c b d a d b c
- 8*(r - r + r )
- off onespace;
- symmetrize({a,b,c,d},r,cyclicpermlist);
- a b c d b c d a c d a b d a b c
- r + r + r + r
- canonical ws;
- a b c d a d b c
- 2*(r - r )
- rem_tensor r;
- t
- % Declared bloc-diagonal tensor:
- rem_spaces wholespace,eucl;
- t
- define_spaces wholespace={7,signature=1};
- t
- define_spaces mink={4,signature=1,indexrange=0 .. 3};
- t
- define_spaces eucl={3,euclidian,indexrange=4 .. 6};
- t
- show_spaces();
- {{wholespace,7,signature=1},
- {mink,4,signature=1,indexrange=0 .. 3},
- {eucl,3,euclidian,indexrange=4 .. 6}}
- make_tensor_belong_space(te,eucl);
- eucl
- make_bloc_diagonal te;
- t
- mk_ids_belong_space({a,b,c},eucl);
- t
- te(a,b,z);
- a b z
- te
- mk_ids_belong_space({m1,m2},mink);
- t
- te(a,b,m1);
- 0
- te(a,b,m2);
- 0
- mk_ids_belong_anyspace a,b,c,m1,m2;
- t
- te(a,b,m2);
- a b m2
- te
- % how to ASSIGN a particular component ?
- % take the simplest context:
- rem_spaces wholespace,mink,eucl;
- t
- on onespace;
- te({x,y},a,-0)==x*y*te(a,-0);
- a
- te *x*y
- 0
-
- te({x,y},a,-0);
- a
- te *x*y
- 0
-
- te({x,y},a,0);
- a 0
- te (x,y)
-
-
- % hereunder an error message is issued because already assigned:
- on errcont;
- te({x,y},a,-0)==x*y*te(a,-0);
- a
- ***** te *x*y invalid as setvalue kernel
- 0
- off errcont;
- % clear value:
- rem_value_tens te({x,y},a,-0);
- t
- te({x,y},a,-0);
- a
- te (x,y)
- 0
-
- te({x,y},a,-0)==(x+y)*te(a,-0);
- a
- te *(x + y)
- 0
- % A small illustration
- te(1)==sin th * cos phi;
- cos(phi)*sin(th)
-
- te(-1)==sin th * cos phi;
- cos(phi)*sin(th)
- te(2)==sin th * sin phi;
- sin(phi)*sin(th)
- te(-2)==sin th * sin phi;
- sin(phi)*sin(th)
- te(3)==cos th ;
- cos(th)
- te(-3)==cos th ;
- cos(th)
- for i:=1:3 sum te(i)*te(-i);
- 2 2 2 2 2
- cos(phi) *sin(th) + cos(th) + sin(phi) *sin(th)
- rem_value_tens te;
- t
- te(2);
- 2
- te
- let te({x,y},-0)=x*y;
- te({x,y},-0);
- x*y
- te({x,y},0);
- 0
- te (x,y)
-
- te({x,u},-0);
- te (x,u)
- 0
- for all x,a let te({x},a,-b)=x*te(a,-b);
- te({u},1,-b);
- 1
- te *u
- b
- te({u},c,-b);
- c
- te *u
- b
- te({u},b,-b);
- b
- te *u
- b
- te({u},a,-a);
- a
- te (u)
- a
- for all x,a clear te({x},a,-b);
- te({u},c,-b);
- c
- te (u)
- b
- % rule for indices only
- for all a,b let te({x},a,-b)=x*te(a,-b);
- te({x},c,-b);
- c
- te *x
- b
- te({x},a,-a);
- a
- te *x
- a
- % A BUG still exists for -0 i.e. rule does NOT apply:
- te({x},a,-0);
- a
- te (x)
- 0
- % the cure is to use -!0 in this case
- te({x},0,-!0);
- 0
- te *x
- 0
- %
- % local rules:
- %
- rul:={te(~a) => sin a};
- ~a
- rul := {te => sin(a)}
- te(1) where rul;
- sin(1)
- %
- rul1:={te(~a,{~x,~y}) => x*y*sin(a)};
- ~a
- rul1 := {te (~x,~y) => x*y*sin(a)}
-
- %
- te(a,{x,y}) where rul1;
- sin(a)*x*y
- te({x,y},a) where rul1;
- sin(a)*x*y
- %
- rul2:={te(-~a,{~x,~y}) => x*y*sin(-a)};
- rul2 := {te (~x,~y) => x*y*sin( - a)}
- ~a
- %
- te(-a,{x,y}) where rul2;
- - sin(a)*x*y
-
- te({x,y},-a) where rul2;
- - sin(a)*x*y
- %% CANONICAL
- %
- % 1. Coherence of tensorial indices.
- %
- tensor te,tf;
- *** Warning: te redefined as generic tensor
- t
-
- dummy_indices();
- {a,b}
- make_tensor_belong_anyspace te;
- t
- on errcont;
- bb:=te(a,b)*te(-b)*te(b);
- a b b
- bb := te *te *te
- b
- % hereunder an error message is issued:
- canonical bb;
- ***** ((b) (a b b)) are inconsistent lists of indices
- off errcont;
- bb:=te(a,b)*te(-b);
- a b
- bb := te *te
- b
- % notice how it is rewritten by canonical:
- canonical bb;
- a b
- te *te
- b
- %
- dummy_indices();
- {a,b}
- aa:=te(d,-c)*tf(d,-c);
- d d
- aa := te *tf
- c c
- % if a and c are FREE no error message:
- canonical aa;
- d d
- te *tf
- c c
- % do NOT introduce powers for NON-INVARIANT tensors:
- aa:=te(d,-c)*te(d,-c);
- d 2
- aa := (te )
- c
- % Powers are taken away
- canonical aa;
- d
- te
- c
- % A trace CANNOT be squared because powers are removed by 'canonical':
- cc:=te(a,-a)^2$
- canonical cc;
- a
- te
- a
- %
- % Correct writing of the previous squared:
- cc:=te(a,-a)*te(b,-b)$
- canonical cc;
- a b
- te *te
- a b
- % all terms must have the same variance:
- on errcont;
- aa:=te(a,c)+x^2;
- a c 2
- aa := te + x
- canonical aa;
- ***** scalar added with tensor(s)
- aa:=te(a,b)+tf(a,c);
- a b a c
- aa := te + tf
- canonical aa;
- ***** mismatch in free indices : ((a c) (a b))
- off errcont;
- dummy_indices();
- {a,b}
- rem_dummy_indices a,b,c;
- t
- dummy_indices();
- {}
- % a dummy VARIABLE is NOT a dummy INDEX
- dummy_names b;
- t
- dummy_indices();
- {}
- % so, no error message in the following:
- canonical(te(b,c)*tf(b,c));
- b c b c
- te *tf
- % it is an incorrect input for a variable.
- % correct input is:
- canonical(te({b},c)*tf({b},c));
- c c
- te (b)*tf (b)
-
- clear_dummy_names;
- t
- % contravariant indices are placed before covariant ones if possible.
- % i.e. Riemanian spaces by default:
- pp:=te(a,-a)+te(-a,a)+1;
- a a
- pp := te + te + 1
- a a
-
- canonical pp;
- a
- 2*te + 1
- a
- pp:=te(a,-c)+te(-b,b,a,-c);
- b a a
- pp := te + te
- b c c
- canonical pp;
- a b a
- te + te
- c b c
- pp:=te(r,a,-f,d,-a,f)+te(r,-b,-c,d,b,c);
- r d b c r a d f
- pp := te + te
- b c f a
- canonical pp;
- r a b d
- 2*te
- a b
- % here, a case where a normal form cannot be obtained:
- tensor nt;
- t
- a1:=nt(-a,d)*nt(-c,a);
- d a
- a1 := nt *nt
- a c
- a2:=nt(-c,-a)*nt(a,d);
- a d
- a2 := nt *nt
- c a
-
- % obviously, a1-a2 =0, but ....
- canonical(a1-a2);
- d a a d
- - nt *nt + nt *nt
- a c c a
- % does give the same expression with the sign changed.
- % zero is either:
- canonical a1 -a2;
- 0
- % or
- a1 -canonical a2;
- 0
- % below the result is a2:
- canonical a1;
- a d
- nt *nt
- c a
- % below result is a1 again:
- canonical ws;
- d a
- nt *nt
- a c
- % the above manipulations are NOT DONE if space is AFFINE
- off onespace;
- define_spaces aff={dd,affine};
- t
- make_tensor_belong_space(te,aff);
- aff
-
- % dummy indices MUST be declared to belong
- % to a well defined space. here to 'aff':
- mk_ids_belong_space({a,b},aff);
- t
- canonical(te(-a,a));
- a
- te
- a
- canonical(te(-a,a)+te(b,-b));
- a a
- te + te
- a a
- canonical(te(-a,c));
- c
- te
- a
- % put back the system in the previous status:
- make_tensor_belong_anyspace te;
- t
- mk_ids_belong_anyspace a,b;
- t
- rem_spaces aff;
- t
- on onespace;
- %
- % 2. Summations with DELTA tensor.
- %
- make_partic_tens(delta,delta);
- t
- aa:=delta(a,-b)*delta(b,-c)*delta(c,-a) + 1;
- a b c
- aa := delta *delta *delta + 1
- b c a
- % below, answer is dim+1:
- canonical aa;
- dim + 1
- aa:=delta(a,-b)*delta(b,-c)*delta(c,-d)*te(d,e)$
- canonical aa;
- a e
- te
- % 3. Summations with DELTA and ETA tensors.
- make_partic_tens(eta,eta);
- t
- signature 1;
- 1
- aa:=eta(a,b)*eta(-b,-c);
- a b
- aa := eta *eta
- b c
- canonical aa;
- a
- delta
- c
- aa:=eta(a,b)*eta(-b,-c)*eta(c,d);
- a b c d
- aa := eta *eta *eta
- b c
- canonical aa;
- a d
- eta
- aa:=eta(a,b)*eta(-b,-c)*eta(d,c)*te(d,-a) +te(d,d);
- a b c d d d d
- aa := eta *eta *eta *te + te
- b c a
- canonical aa;
- d d
- 2*te
- aa:=delta(a,-b)*eta(b,c);
- a b c
- aa := delta *eta
- b
- canonical aa;
- a c
- eta
- aa:=delta(a,-b)*delta(d,-a)*eta(-c,-d)*eta(b,c);
- a d b c
- aa := delta *delta *eta *eta
- b a c d
- % below the answer is dim:
- canonical aa;
- dim
- aa:=delta(a,-b)*delta(d,-a)*eta(-d,-e)*te(f,g,e);
- a d f g e
- aa := delta *delta *eta *te
- b a d e
- canonical aa;
- f g
- te
- b
- % Summations with the addition of the METRIC tensor:
- make_partic_tens(g,metric);
- t
- g(1,2,{x})==1/4*sin x;
- sin(x)
- --------
- 4
- g({x},1,2);
- sin(x)
- --------
- 4
- aa:=g(a,b)*g(-a,-c);
- a b
- aa := g *g
- a c
-
- canonical aa;
- b
- delta
- c
- aa:=g(a,b)*g(c,d)*eta(-c,-b);
- a b c d
- aa := eta *g *g
- b c
- % answer is g(a,d):
- canonical aa;
- a d
- g
- tensor te;
- *** Warning: te redefined as generic tensor
- t
- aa:=g(a,b)*g(c,d)*eta(-c,-e)*eta(e,f)*te(-f,g);
- e f a b c d g
- aa := eta *eta *g *g *te
- c e f
- canonical aa;
- a b d g
- g *te
- % Summations with the addition of the EPSILON tensor.
- dummy_indices();
- {c,f,b,a}
- rem_dummy_indices a,b,c,f;
- t
- dummy_indices();
- {}
- wholespace_dim ?;
- dim
- signature ?;
- 1
- % define the generalized delta function:
- make_partic_tens(gd,del);
- t
- make_partic_tens(epsilon,epsilon);
- t
- aa:=epsilon(a,b)*epsilon(-c,-d);
- a b
- aa := epsilon *epsilon
- c d
- % Minus sign reflects the chosen signature.
- canonical aa;
- a b
- - gd
- c d
- aa:=epsilon(a,b)*epsilon(-a,-b);
- a b
- aa := epsilon *epsilon
- a b
- canonical aa;
- dim*( - dim + 1)
- aa:=epsilon(a,b,c,d)*epsilon(-a,-b,-c,-e);
- a b c d
- aa := epsilon *epsilon
- a b c e
- canonical aa;
- d 3 2
- delta *( - dim + 6*dim - 11*dim + 6)
- e
- on exdelt;
- % extract delta function down to the bottom:
- aa:=epsilon(a,b,c)*epsilon(-b,-d,-e);
- a b c
- aa := epsilon *epsilon
- b d e
- canonical aa;
- a c a c a c
- delta *delta *dim - 2*delta *delta - delta *delta *dim
- d e d e e d
- a c
- + 2*delta *delta
- e d
- off exdelt;
- % below expressed in terms of 'gd' tensor.
- canonical aa;
- a c
- gd *(dim - 2)
- d e
- rem_dummy_indices a;
- t
- aa:=epsilon(- b,-c)*eta(a,b)*eta(a,c);
- a b a c
- aa := epsilon *eta *eta
- b c
- % answer below is zero:
- canonical aa;
- 0
- aa:=epsilon(a,b,c)*te(-a)*te(-b);
- a b c
- aa := epsilon *te *te
- a b
- % below the result is again zero.
- canonical aa;
- 0
- %
- tensor tf,tg;
- *** Warning: tf redefined as generic tensor
- t
- aa:=epsilon(a,b,c)*te(-a)*tf(-b)*tg(-c)+epsilon(d,e,f)*te(-d)*tf(-e)*tg(-f);
- a b c d e f
- aa := epsilon *te *tf *tg + epsilon *te *tf *tg
- a b c d e f
- % below the result is twice the first term.
- canonical aa;
- a b c
- 2*epsilon *te *tf *tg
- a b c
- aa:=epsilon(a,b,c)*te(-a)*tf(-c)*tg(-b)+epsilon(d,e,f)*te(-d)*tf(-e)*tg(-f);
- a b c d e f
- aa := epsilon *te *tf *tg + epsilon *te *tf *tg
- a c b d e f
- % below the result is zero.
- canonical aa;
- 0
- % An illustration when working inside several spaces.
- rem_dummy_indices a,b,c,d,e,f;
- t
- off onespace;
- define_spaces wholespace={dim,signature=1};
- t
- define_spaces sub4={4,signature=1};
- t
- define_spaces subd={dim-4,signature=0};
- t
- show_spaces();
- {{wholespace,dim,signature=1},
- {sub4,4,signature=1},
- {subd,dim - 4,signature=0}}
- make_partic_tens(epsilon,epsilon);
- *** Warning: epsilon redefined as particular tensor
- t
- make_tensor_belong_space(epsilon,sub4);
- sub4
- make_partic_tens(kappa,epsilon);
- *** Warning: kappa MUST belong to a space
- t
- make_tensor_belong_space(kappa,subd);
- subd
- show_epsilons();
- {{kappa,subd},{epsilon,sub4}}
- mk_ids_belong_space({i,j,k,l,m,n,r,s},sub4);
- t
- mk_ids_belong_space({a,b,c,d,e,f},subd);
- t
- off exdelt;
- aa:=kappa(a,b,c)*kappa(-d,-e,-f)*epsilon(i,j,k,l)*epsilon(-k,-l,-i,-j);
- i j k l a b c
- aa := epsilon *epsilon *kappa *kappa
- i j k l d e f
- canonical aa;
- a b c
- - 24*gd
- d e f
- aa:=kappa(a,b,c)*kappa(-d,-e,-f)*epsilon(i,j,k,l)*epsilon(-m,-n,-r,-s);
- i j k l a b c
- aa := epsilon *epsilon *kappa *kappa
- m n r s d e f
- canonical aa;
- a b c i j k l
- - gd *gd
- d e f m n r s
- end;
- 4: 4: 4: 4: 4: 4: 4: 4: 4:
- Time for test: 320 ms
- 5: 5:
- Quitting
- Tue Jan 5 22:09:52 MET 1999
|