~ubuntu-branches/ubuntu/karmic/maxima/karmic

« back to all changes in this revision

Viewing changes to doc/info/Itensor.texi

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2009-07-13 15:38:41 UTC
  • mfrom: (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090713153841-gtux06oun30kuuo7
Tags: 5.17.1-1ubuntu1
* Merge from debian unstable, remaining changes (LP: #296643, LP: #242243):
   - debian/maxima-doc.doc-base.{tips, plotting}:
    + Use .shtml instead of .html to fix lintian errors.
   - debian/maxima-emacs.emacsen-install:
    + Install symlinks for source files rather than copying them.  This
      makes find-function work.
    + Install symlink for *.lisp so that we don't need to add
      /usr/share/emacs/site-lisp/maxima to load-path.
  - debian/maxima-emacs.emacsen-startup:
    + Remove use of /usr/share/emacs/site-lisp/maxima, since this
      causes load-path shadows and is not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
user may find difficulty with the specification of the metric, function
58
58
definition, and the evaluation of differentiated "indexed" objects.
59
59
 
 
60
The @code{itensor} package can carry out differentiation with respect to an indexed
 
61
variable, which allows one to use the package when dealing with Lagrangian
 
62
and Hamiltonian formalisms. As it is possible to differentiate a field
 
63
Lagrangian with respect to an (indexed) field variable, one can use Maxima
 
64
to derive the corresponding Euler-Lagrange equations in indicial form. These
 
65
equations can be translated into component tensor (@code{ctensor}) programs using
 
66
the @code{ic_convert} function, allowing us to solve the field equations in a
 
67
particular coordinate representation, or to recast the equations of motion
 
68
in Hamiltonian form. See @code{einhil.dem} and @code{bradic.dem} for two comprehensive
 
69
examples. The first, @code{einhil.dem}, uses the Einstein-Hilbert action to derive
 
70
the Einstein field tensor in the homogeneous and isotropic case (Friedmann
 
71
equations) and the spherically symmetric, static case (Schwarzschild
 
72
solution.) The second, @code{bradic.dem}, demonstrates how to compute the Friedmann
 
73
equations from the action of Brans-Dicke gravity theory, and also derives
 
74
the Hamiltonian associated with the theory's scalar field.
 
75
 
 
76
@opencatbox
 
77
@category{Tensors} @category{Share packages} @category{Package itensor}
 
78
@closecatbox
 
79
 
60
80
@subsection New tensor notation
61
81
 
62
 
Until now, the @code{itensor} package in Maxima has used a notation that sometimes
 
82
Earlier versions of the @code{itensor} package in Maxima used a notation that sometimes
63
83
led to incorrect index ordering. Consider the following, for instance:
64
84
 
65
85
@example
200
220
(%t11)                        v    - v   ichr2
201
221
                               i,j    %4      i j
202
222
(%i12) ishow(ev(%,ichr2))$
203
 
               %4 %5
204
 
(%t12) v    - g      v   (e p       + e   p     - e p       - e    p
205
 
        i,j           %4     j %5,i    ,i  j %5      i j,%5    ,%5  i j
 
223
                %4 %5
 
224
(%t12) v    - (g      v   (e p       + e   p     - e p       - e    p
 
225
        i,j            %4     j %5,i    ,i  j %5      i j,%5    ,%5  i j
206
226
 
207
 
                                         + e p       + e   p    )/2
 
227
                                         + e p       + e   p    ))/2
208
228
                                              i %5,j    ,j  i %5
209
229
(%i13) iframe_flag:true;
210
230
(%o13)                               true
217
237
(%t15)                        v    - v   ifc2
218
238
                               i,j    %6     i j
219
239
(%i16) ishow(radcan(ev(%,ifc2,ifc1)))$
220
 
             %6 %8                    %6 %8
 
240
             %6 %7                    %6 %7
221
241
(%t16) - (ifg      v   ifb       + ifg      v   ifb       - 2 v
222
 
                    %6    j %8 i             %6    i j %8      i,j
 
242
                    %6    j %7 i             %6    i j %7      i,j
223
243
 
224
 
                                             %6 %8
 
244
                                             %6 %7
225
245
                                        - ifg      v   ifb      )/2
226
 
                                                    %6    %8 i j
 
246
                                                    %6    %7 i j
227
247
(%i17) ishow(canform(s([i,j],[])-s([j,i])))$
228
248
(%t17)                            s    - s
229
249
                                   i j    j i
256
276
indices. Either a single index or a list of indices (which may be
257
277
null) is acceptable input (see the example under @code{covdiff}).
258
278
 
 
279
@opencatbox
 
280
@category{Package itensor}
 
281
@closecatbox
259
282
@end deffn
260
283
 
261
284
@deffn {Function} changename (@var{old}, @var{new}, @var{expr})
266
289
@var{name} with @var{m} covariant and @var{n} contravariant indices will be
267
290
renamed to @var{new}.
268
291
 
 
292
@opencatbox
 
293
@category{Package itensor}
 
294
@closecatbox
269
295
@end deffn
270
296
 
271
297
@deffn {Function} listoftens
285
311
 
286
312
@end example
287
313
 
 
314
@opencatbox
 
315
@category{Package itensor}
 
316
@closecatbox
288
317
@end deffn
289
318
 
290
319
@deffn {Function} ishow (@var{expr})
295
324
separated from the covariant indices by a comma (see the examples
296
325
throughout this document).
297
326
 
 
327
@opencatbox
 
328
@category{Package itensor}
 
329
@closecatbox
298
330
@end deffn
299
331
 
300
332
@deffn {Function} indices (@var{expr})
323
355
illegal expression, its behavior should be considered undefined.
324
356
 
325
357
 
 
358
@opencatbox
 
359
@category{Package itensor}
 
360
@closecatbox
326
361
@end deffn
327
362
 
328
363
@deffn {Function} rename (@var{expr})
386
421
                          %1 %3      %2 %6      %4 r      %5 %7
387
422
@end example
388
423
 
 
424
@opencatbox
 
425
@category{Package itensor}
 
426
@closecatbox
389
427
@end deffn
390
428
 
391
429
@defvr {Option variable} flipflag
401
439
Then sorting occurs after the @code{rename}-ing (see the example
402
440
under @code{rename}).
403
441
 
 
442
@opencatbox
 
443
@category{Package itensor}
 
444
@closecatbox
404
445
@end defvr
405
446
 
406
447
@deffn {Function} defcon (@var{tensor_1})
421
462
@code{contractions} is a list of those indexed objects which have been given
422
463
contraction properties with @code{defcon}.
423
464
 
 
465
@opencatbox
 
466
@category{Package itensor}
 
467
@closecatbox
424
468
@end deffn
425
469
 
426
470
@deffn {Function} remcon (@var{tensor_1}, ..., @var{tensor_n})
429
473
from the @var{tensor_1}, ..., @var{tensor_n}). @code{remcon(all)} removes all contraction
430
474
properties from all indexed objects.
431
475
 
 
476
@opencatbox
 
477
@category{Package itensor}
 
478
@closecatbox
432
479
@end deffn
433
480
 
434
481
@deffn {Function} contract (@var{expr})
441
488
of the terms. The @code{gcd} switch should be @code{false} if GCD
442
489
cancellations are unnecessary.
443
490
 
 
491
@opencatbox
 
492
@category{Package itensor}
 
493
@closecatbox
444
494
@end deffn
445
495
 
446
496
@deffn {Function} indexed_tensor (@var{tensor})
449
499
a built in value already exists as with @code{ichr1}, @code{ichr2},
450
500
@code{icurvature}. See the example under @code{icurvature}.
451
501
 
 
502
@opencatbox
 
503
@category{Package itensor}
 
504
@closecatbox
452
505
@end deffn
453
506
 
454
507
@deffn {Function} components (@var{tensor}, @var{expr})
488
541
 
489
542
@example
490
543
 
 
544
(%i5) lg:-ident(4)$lg[1,1]:1$lg;
 
545
                            [ 1   0    0    0  ]
 
546
                            [                  ]
 
547
                            [ 0  - 1   0    0  ]
 
548
(%o5)                       [                  ]
 
549
                            [ 0   0   - 1   0  ]
 
550
                            [                  ]
 
551
                            [ 0   0    0   - 1 ]
 
552
 
491
553
(%i6) components(g([i,j],[]),lg);
492
554
(%o6)                                done
493
555
(%i7) ishow(g([i,j],[]))$
494
556
(%t7)                                g
495
557
                                      i j
496
 
(%i8) g([3,3],[]);
 
558
(%i8) g([1,1],[]);
497
559
(%o8)                                  1
498
560
(%i9) g([4,4],[]);
499
561
(%o9)                                 - 1
548
610
 
549
611
@end example
550
612
 
 
613
@opencatbox
 
614
@category{Package itensor}
 
615
@closecatbox
551
616
@end deffn
552
617
 
553
618
@deffn {Function} remcomps (@var{tensor})
555
620
Unbinds all values from @var{tensor} which were assigned with the
556
621
@code{components} function.
557
622
 
 
623
@opencatbox
 
624
@category{Package itensor}
 
625
@closecatbox
558
626
@end deffn
559
627
 
560
628
@c NEED LIST OF ARGUMENTS HERE
605
673
The @code{showcomps} command can also display components of a tensor of
606
674
rank higher than 2.
607
675
 
 
676
@opencatbox
 
677
@category{Package itensor}
 
678
@closecatbox
608
679
@end deffn
609
680
 
610
681
@deffn {Function} idummy ()
614
685
which are needed in forming expressions will not conflict with indices
615
686
already in use (see the example under @code{indices}).
616
687
 
 
688
@opencatbox
 
689
@category{Package itensor}
 
690
@closecatbox
617
691
@end deffn
618
692
 
619
693
@defvr {Option variable} idummyx
621
695
 
622
696
Is the prefix for dummy indices (see the example under @code{indices}).
623
697
 
 
698
@opencatbox
 
699
@category{Package itensor}
 
700
@closecatbox
624
701
@end defvr
625
702
 
626
703
@defvr {Option variable} icounter
629
706
Determines the numerical suffix to be used in
630
707
generating the next dummy index in the tensor package.  The prefix is
631
708
determined by the option @code{idummy} (default: @code{%}).
 
709
 
 
710
@opencatbox
 
711
@category{Package itensor}
 
712
@closecatbox
632
713
@end defvr
633
714
 
634
715
@deffn {Function} kdelta (@var{L1}, @var{L2})
645
726
capability. This is strictly considered a programming aid and not meant to
646
727
imply that @code{kdelta([i,j],[])} is a valid tensorial object.
647
728
 
 
729
@opencatbox
 
730
@category{Package itensor}
 
731
@closecatbox
648
732
@end deffn
649
733
 
650
734
@deffn {Function} kdels (@var{L1}, @var{L2})
670
754
 
671
755
@end example
672
756
 
 
757
@opencatbox
 
758
@category{Package itensor}
 
759
@closecatbox
673
760
@end deffn
674
761
 
675
762
@deffn {Function} levi_civita (@var{L})
678
765
consists of an odd permutation, and 0 if some indices in @var{L} are
679
766
repeated.
680
767
 
 
768
@opencatbox
 
769
@category{Package itensor}
 
770
@closecatbox
681
771
@end deffn
682
772
 
683
773
@deffn {Function} lc2kdt (@var{expr})
750
840
        kdelta  ) a
751
841
              %4   j k
752
842
(%i11) ishow(contract(expand(%)))$
753
 
                                  l i      l i
754
 
(%t11)                           a    - a g
 
843
                                  l i    l i  j
 
844
(%t11)                           a    - g    a
 
845
                                              j
755
846
 
756
847
@end example
757
848
 
758
849
 
 
850
@opencatbox
 
851
@category{Package itensor}
 
852
@closecatbox
759
853
@end deffn
760
854
 
761
855
@c HMM, WHICH CATEGORY DOES THIS FALL INTO -- FUNCTION, VARIABLE, OTHER ??
770
864
 
771
865
(%i1) load(itensor);
772
866
(%o1)      /share/tensor/itensor.lisp
773
 
(%i2)  el1:ishow('levi_civita([i,j,k],[])*a([],[i])*a([],[j]))$
 
867
(%i2) el1:ishow('levi_civita([i,j,k],[])*a([],[i])*a([],[j]))$
774
868
                             i  j
775
869
(%t2)                       a  a  levi_civita
776
870
                                             i j k
778
872
                                       i j k
779
873
(%t3)                       levi_civita      a  a
780
874
                                              i  j
781
 
(%i4) ishow(canform(contract(expand(applyb1(el1,lc_l,lc_u)))))$
 
875
(%i4) canform(contract(expand(applyb1(el1,lc_l,lc_u))));
782
876
(%t4)                                  0
783
 
(%i5) ishow(canform(contract(expand(applyb1(el2,lc_l,lc_u)))))$
 
877
(%i5) canform(contract(expand(applyb1(el2,lc_l,lc_u))));
784
878
(%t5)                                  0
785
879
 
786
880
@end example
787
881
 
 
882
@opencatbox
 
883
@category{Package itensor}
 
884
@closecatbox
788
885
@end deffn
789
886
 
790
887
@c HMM, WHICH CATEGORY DOES THIS FALL INTO -- FUNCTION, VARIABLE, OTHER ??
795
892
many expressions more efficiently than the evaluation of @code{levi_civita}.
796
893
For details, see @code{lc_l}.
797
894
 
 
895
@opencatbox
 
896
@category{Package itensor}
 
897
@closecatbox
798
898
@end deffn
799
899
 
800
900
@deffn {Function} canten (@var{expr})
809
909
For this reason, @code{canten} returns an error if @code{allsym} is not
810
910
set to @code{true}.
811
911
 
 
912
@opencatbox
 
913
@category{Package itensor}
 
914
@closecatbox
812
915
@end deffn
813
916
 
814
917
@deffn {Function} concan (@var{expr})
815
918
Similar to @code{canten} but also performs index contraction.
816
919
 
 
920
@opencatbox
 
921
@category{Package itensor}
 
922
@closecatbox
817
923
@end deffn
818
924
 
819
925
@subsection Tensor symmetries
826
932
in these indices. Derivative indices are always taken to be symmetric
827
933
unless @code{iframe_flag} is set to @code{true}.
828
934
 
 
935
@opencatbox
 
936
@category{Package itensor}
 
937
@closecatbox
829
938
@end defvr
830
939
 
831
940
@deffn {Function} decsym (@var{tensor}, @var{m}, @var{n}, [@var{cov_1}, @var{cov_2}, ...], [@var{contr_1}, @var{contr_2}, ...])
881
990
@end example
882
991
 
883
992
 
 
993
@opencatbox
 
994
@category{Package itensor}
 
995
@closecatbox
884
996
@end deffn
885
997
 
886
998
@deffn {Function} remsym (@var{tensor}, @var{m}, @var{n})
887
999
Removes all symmetry properties from @var{tensor} which has @var{m}
888
1000
covariant indices and @var{n} contravariant indices.
 
1001
 
 
1002
@opencatbox
 
1003
@category{Package itensor}
 
1004
@closecatbox
889
1005
@end deffn
890
1006
 
891
1007
@deffn {Function} canform (@var{expr})
 
1008
@deffnx {Function} canform (@var{expr}, @var{rename})
892
1009
Simplifies @var{expr} by renaming dummy
893
1010
indices and reordering all indices as dictated by symmetry conditions
894
1011
imposed on them. If @code{allsym} is @code{true} then all indices are assumed
900
1017
Also see the example under @code{decsym}. Note: @code{canform} may not be able to
901
1018
reduce an expression completely to its simplest form although it will
902
1019
always return a mathematically correct result.
 
1020
 
 
1021
The optional second parameter @var{rename}, if set to @code{false}, suppresses renaming.
 
1022
 
 
1023
@opencatbox
 
1024
@category{Package itensor}
 
1025
@closecatbox
903
1026
@end deffn
904
1027
 
905
1028
@subsection Indicial tensor calculus
917
1040
subscripted by @var{v_i} will be used for the variable of
918
1041
differentiation.  This permits an array of coordinate names or
919
1042
subscripted names like @code{x[1]}, @code{x[2]}, ...  to be used.
 
1043
 
 
1044
A further extension adds the ability to @code{diff} to compute derivatives
 
1045
with respect to an indexed variable. In particular, the tensor package knows
 
1046
how to differentiate expressions containing combinations of the metric tensor
 
1047
and its derivatives with respect to the metric tensor and its first and
 
1048
second derivatives. This capability is particularly useful when considering
 
1049
Lagrangian formulations of a gravitational theory, allowing one to derive
 
1050
the Einstein tensor and field equations from the action principle.
 
1051
 
 
1052
@opencatbox
 
1053
@category{Package itensor}
 
1054
@closecatbox
920
1055
@end deffn
921
1056
 
922
1057
@deffn {Function} idiff (@var{expr}, @var{v_1}, [@var{n_1}, [@var{v_2}, @var{n_2}] ...])
933
1068
@code{2*determinant(g)*ichr2([%i,k],[%i])} where the dummy index @code{%i}
934
1069
is chosen appropriately.
935
1070
 
936
 
 
 
1071
@opencatbox
 
1072
@category{Package itensor}
 
1073
@closecatbox
937
1074
@end deffn
938
1075
 
939
1076
@deffn {Function} liediff (@var{v}, @var{ten})
958
1095
 
959
1096
@end example
960
1097
 
961
 
 
 
1098
@opencatbox
 
1099
@category{Package itensor}
 
1100
@closecatbox
962
1101
@end deffn
963
1102
 
964
1103
@deffn {Function} rediff (@var{ten})
966
1105
Evaluates all occurrences of the @code{idiff} command in the tensorial
967
1106
expression @var{ten}.
968
1107
 
 
1108
@opencatbox
 
1109
@category{Package itensor}
 
1110
@closecatbox
969
1111
@end deffn
970
1112
 
971
1113
@deffn {Function} undiff (@var{expr})
978
1120
in @var{expr} and then carry out the differentiation by saying
979
1121
@code{ev(@var{expr}, idiff)}.
980
1122
 
 
1123
@opencatbox
 
1124
@category{Package itensor}
 
1125
@closecatbox
981
1126
@end deffn
982
1127
 
983
1128
@deffn {Function} evundiff (@var{expr})
1041
1186
                                         2
1042
1187
@end example
1043
1188
 
1044
 
 
 
1189
@opencatbox
 
1190
@category{Package itensor}
 
1191
@closecatbox
1045
1192
@end deffn
1046
1193
 
1047
1194
@deffn {Function} flush (@var{expr}, @var{tensor_1}, @var{tensor_2}, ...)
1048
1195
Set to zero, in
1049
1196
@var{expr}, all occurrences of the @var{tensor_i} that have no derivative indices.
1050
1197
 
 
1198
@opencatbox
 
1199
@category{Package itensor}
 
1200
@closecatbox
1051
1201
@end deffn
1052
1202
 
1053
1203
@deffn {Function} flushd (@var{expr}, @var{tensor_1}, @var{tensor_2}, ...)
1054
1204
Set to zero, in
1055
1205
@var{expr}, all occurrences of the @var{tensor_i} that have derivative indices.
1056
1206
 
 
1207
@opencatbox
 
1208
@category{Package itensor}
 
1209
@closecatbox
1057
1210
@end deffn
1058
1211
 
1059
1212
@deffn {Function} flushnd (@var{expr}, @var{tensor}, @var{n})
1073
1226
(%t3)                               a
1074
1227
                                     i,k r
1075
1228
@end example
 
1229
 
 
1230
@opencatbox
 
1231
@category{Package itensor}
 
1232
@closecatbox
1076
1233
@end deffn
1077
1234
 
1078
1235
@deffn {Function} coord (@var{tensor_1}, @var{tensor_2}, ...)
1083
1240
been done then @code{idiff(x([],[i]),j)} gives @code{kdelta([i],[j])}.
1084
1241
@code{coord} is a list of all indexed objects having this property.
1085
1242
 
 
1243
@opencatbox
 
1244
@category{Package itensor}
 
1245
@closecatbox
1086
1246
@end deffn
1087
1247
 
1088
1248
@deffn {Function} remcoord (@var{tensor_1}, @var{tensor_2}, ...)
1092
1252
that was established by the function @code{coord}.  @code{remcoord(all)}
1093
1253
removes this property from all indexed objects.
1094
1254
 
 
1255
@opencatbox
 
1256
@category{Package itensor}
 
1257
@closecatbox
1095
1258
@end deffn
1096
1259
 
1097
1260
@deffn {Function} makebox (@var{expr})
1100
1263
symbol @code{[]}.  For example, @code{[]p([m],[n])} represents
1101
1264
@code{g([],[i,j])*p([m],[n],i,j)}.
1102
1265
 
 
1266
@opencatbox
 
1267
@category{Package itensor}
 
1268
@closecatbox
1103
1269
@end deffn
1104
1270
 
1105
1271
@deffn {Function} conmetderiv (@var{expr}, @var{tensor})
1123
1289
(%t3)                 - g     ichr2     - g     ichr2
1124
1290
                                   %1 c              %1 c
1125
1291
@end example
 
1292
 
 
1293
@opencatbox
 
1294
@category{Package itensor}
 
1295
@closecatbox
1126
1296
@end deffn
1127
1297
 
1128
1298
@deffn {Function} simpmetderiv (@var{expr})
1212
1382
See also @code{weyl.dem} for an example that uses @code{simpmetderiv}
1213
1383
and @code{conmetderiv} together to simplify contractions of the Weyl tensor.
1214
1384
 
 
1385
@opencatbox
 
1386
@category{Package itensor}
 
1387
@closecatbox
1215
1388
@end deffn
1216
1389
 
1217
1390
@deffn {Function} flush1deriv (@var{expr}, @var{tensor})
1219
1392
Set to zero, in @code{expr}, all occurrences of @code{tensor} that have
1220
1393
exactly one derivative index.
1221
1394
 
 
1395
@opencatbox
 
1396
@category{Package itensor}
 
1397
@closecatbox
1222
1398
@end deffn
1223
1399
 
1224
1400
@subsection Tensors in curved spaces
1232
1408
The variable @code{imetric} (unbound by default), is bound to the metric, assigned by
1233
1409
the @code{imetric(@var{g})} command.
1234
1410
 
 
1411
@opencatbox
 
1412
@category{Package itensor}
 
1413
@closecatbox
1235
1414
@end deffn
1236
1415
 
1237
1416
@deffn {Function} idim (@var{n})
1238
1417
Sets the dimensions of the metric. Also initializes the antisymmetry
1239
1418
properties of the Levi-Civita symbols for the given dimension.
1240
1419
 
 
1420
@opencatbox
 
1421
@category{Package itensor}
 
1422
@closecatbox
1241
1423
@end deffn
1242
1424
 
1243
1425
@deffn {Function} ichr1 ([@var{i}, @var{j}, @var{k}])
1251
1433
To evaluate the Christoffel symbols for a particular metric, the
1252
1434
variable @code{imetric} must be assigned a name as in the example under @code{chr2}.
1253
1435
 
 
1436
@opencatbox
 
1437
@category{Package itensor}
 
1438
@closecatbox
1254
1439
@end deffn
1255
1440
 
1256
1441
@deffn {Function} ichr2 ([@var{i}, @var{j}], [@var{k}])
1261
1446
   ichr2([i,j],[k]) = g    (g      + g      - g     )/2
1262
1447
                             is,j     js,i     ij,s
1263
1448
@end example
 
1449
 
 
1450
@opencatbox
 
1451
@category{Package itensor}
 
1452
@closecatbox
1264
1453
@end deffn
1265
1454
 
1266
1455
@deffn {Function} icurvature ([@var{i}, @var{j}, @var{k}], [@var{h}])
1275
1464
                     + ichr2      ichr2
1276
1465
                            %1 k       i j
1277
1466
@end example
 
1467
 
 
1468
@opencatbox
 
1469
@category{Package itensor}
 
1470
@closecatbox
1278
1471
@end deffn
1279
1472
 
1280
1473
@deffn {Function} covdiff (@var{expr}, @var{v_1}, @var{v_2}, ...)
1324
1517
(%i6)
1325
1518
@end example
1326
1519
 
 
1520
@opencatbox
 
1521
@category{Package itensor}
 
1522
@closecatbox
1327
1523
@end deffn
1328
1524
 
1329
1525
@deffn {Function} lorentz_gauge (@var{expr})
1331
1527
indexed objects in @var{expr} that have a derivative index identical to a
1332
1528
contravariant index.
1333
1529
 
 
1530
@opencatbox
 
1531
@category{Package itensor}
 
1532
@closecatbox
1334
1533
@end deffn
1335
1534
 
1336
1535
@deffn {Function} igeodesic_coords (@var{expr}, @var{name})
1374
1573
 
1375
1574
@end example
1376
1575
 
 
1576
@opencatbox
 
1577
@category{Package itensor}
 
1578
@closecatbox
1377
1579
@end deffn
1378
1580
 
1379
1581
@subsection Moving frames
1419
1621
(%t3)                         v   + icc2     v
1420
1622
                               ,j       %1 j
1421
1623
(%i4) ishow(ev(%,icc2))$
1422
 
                        %1      i           i        i
1423
 
(%t4)                  v   (ifc2     + ichr2    ) + v
1424
 
                                %1 j        %1 j     ,j
 
1624
                               %1     i       i
 
1625
(%t4)                         v   ifc2     + v
 
1626
                                      %1 j    ,j
1425
1627
(%i5) ishow(ev(%,ifc2))$
 
1628
                          %1    i %2                i
 
1629
(%t5)                    v   ifg     ifc1        + v
 
1630
                                         %1 j %2    ,j
 
1631
(%i6) ishow(ev(%,ifc1))$
1426
1632
            %1    i %2
1427
1633
           v   ifg     (ifb        - ifb        + ifb       )
1428
1634
                           j %2 %1      %2 %1 j      %1 j %2     i
1429
 
(%t5)      -------------------------------------------------- + v
 
1635
(%t6)      -------------------------------------------------- + v
1430
1636
                                   2                             ,j
1431
 
(%i6) ishow(ifb([a,b,c]))$
1432
 
                       %5    %4
1433
 
(%t6)               ifr   ifr   (ifri        - ifri       )
1434
 
                       a     b       c %4,%5       c %5,%4
 
1637
(%i7) ishow(ifb([a,b,c]))$
 
1638
                                                   %3    %4
 
1639
(%t7)               (ifri        - ifri       ) ifr   ifr
 
1640
                         a %3,%4       a %4,%3     b     c
1435
1641
 
1436
1642
@end example
1437
1643
 
1441
1647
@example
1442
1648
 
1443
1649
(%i8) block([iframe_bracket_form:false],ishow(ifb([a,b,c])))$
1444
 
                       %7    %6        %6      %7
1445
 
(%t8)              (ifr   ifr     - ifr     ifr  ) ifri
1446
 
                       a     b,%7      a,%7    b       c %6
 
1650
                                %6    %5        %5      %6
 
1651
(%t8)              ifri     (ifr   ifr     - ifr     ifr  )
 
1652
                       a %5     b     c,%6      b,%6    c
1447
1653
 
1448
1654
@end example
1449
1655
 
1454
1660
@code{ifri} are always defined, as is the frame bracket (@code{ifb}), this
1455
1661
function does nothing.
1456
1662
 
 
1663
@opencatbox
 
1664
@category{Package itensor}
 
1665
@closecatbox
1457
1666
@end deffn
1458
1667
 
1459
1668
@defvr {Variable} ifb
1494
1703
 
1495
1704
@end example
1496
1705
 
1497
 
 
 
1706
@opencatbox
 
1707
@category{Package itensor}
 
1708
@closecatbox
1498
1709
@end defvr
1499
1710
 
1500
1711
 
1517
1728
Lastly, of @code{inonmet_flag} is @code{false},
1518
1729
@code{inmc1} will not be present.
1519
1730
 
1520
 
 
 
1731
@opencatbox
 
1732
@category{Package itensor}
 
1733
@closecatbox
1521
1734
@end defvr
1522
1735
 
1523
1736
@defvr {Variable} icc2
1540
1753
Lastly, of @code{inonmet_flag} is @code{false},
1541
1754
@code{inmc2} will not be present.
1542
1755
 
 
1756
@opencatbox
 
1757
@category{Package itensor}
 
1758
@closecatbox
1543
1759
@end defvr
1544
1760
 
1545
1761
@defvr {Variable} ifc1
1559
1775
 
1560
1776
@end example
1561
1777
 
 
1778
@opencatbox
 
1779
@category{Package itensor}
 
1780
@closecatbox
1562
1781
@end defvr
1563
1782
 
1564
1783
@defvr {Variable} ifc2
1576
1795
 
1577
1796
@end example
1578
1797
 
 
1798
@opencatbox
 
1799
@category{Package itensor}
 
1800
@closecatbox
1579
1801
@end defvr
1580
1802
 
1581
1803
@defvr {Variable} ifr
1583
1805
The frame field. Contracts with the inverse frame field (@code{ifri}) to
1584
1806
form the frame metric (@code{ifg}).
1585
1807
 
 
1808
@opencatbox
 
1809
@category{Package itensor}
 
1810
@closecatbox
1586
1811
@end defvr
1587
1812
 
1588
1813
@defvr {Variable} ifri
1591
1816
with the frame metric, it forms the basis of all calculations based on
1592
1817
frames.
1593
1818
 
 
1819
@opencatbox
 
1820
@category{Package itensor}
 
1821
@closecatbox
1594
1822
@end defvr
1595
1823
 
1596
1824
@defvr {Variable} ifg
1598
1826
The frame metric. Defaults to @code{kdelta}, but can be changed using
1599
1827
@code{components}.
1600
1828
 
 
1829
@opencatbox
 
1830
@category{Package itensor}
 
1831
@closecatbox
1601
1832
@end defvr
1602
1833
 
1603
1834
@defvr {Variable} ifgi
1605
1836
The inverse frame metric. Contracts with the frame metric (@code{ifg})
1606
1837
to @code{kdelta}.
1607
1838
 
 
1839
@opencatbox
 
1840
@category{Package itensor}
 
1841
@closecatbox
1608
1842
@end defvr
1609
1843
 
1610
1844
@defvr {Option variable} iframe_bracket_form
1612
1846
 
1613
1847
Specifies how the frame bracket (@code{ifb}) is computed.
1614
1848
 
 
1849
@opencatbox
 
1850
@category{Package itensor}
 
1851
@closecatbox
1615
1852
@end defvr
1616
1853
 
1617
1854
@subsection Torsion and nonmetricity
1635
1872
 
1636
1873
@end example
1637
1874
 
 
1875
@opencatbox
 
1876
@category{Package itensor}
 
1877
@closecatbox
1638
1878
@end defvr
1639
1879
 
1640
1880
 
1653
1893
 
1654
1894
(Substitute @code{ifg} in place of @code{g} if a frame metric is used.)
1655
1895
 
 
1896
@opencatbox
 
1897
@category{Package itensor}
 
1898
@closecatbox
1656
1899
@end defvr
1657
1900
 
1658
1901
@defvr {Variable} inmc2
1673
1916
 
1674
1917
(Substitute @code{ifg} in place of @code{g} if a frame metric is used.)
1675
1918
 
 
1919
@opencatbox
 
1920
@category{Package itensor}
 
1921
@closecatbox
1676
1922
@end defvr
1677
1923
 
1678
1924
@defvr {Variable} ikt1
1692
1938
 
1693
1939
(Substitute @code{ifg} in place of @code{g} if a frame metric is used.)
1694
1940
 
 
1941
@opencatbox
 
1942
@category{Package itensor}
 
1943
@closecatbox
1695
1944
@end defvr
1696
1945
 
1697
1946
@defvr {Variable} ikt2
1709
1958
 
1710
1959
(Substitute @code{ifg} in place of @code{g} if a frame metric is used.)
1711
1960
 
 
1961
@opencatbox
 
1962
@category{Package itensor}
 
1963
@closecatbox
1712
1964
@end defvr
1713
1965
 
1714
1966
@defvr {Variable} itr
1769
2021
 
1770
2022
@end example
1771
2023
 
 
2024
@opencatbox
 
2025
@category{Package itensor}
 
2026
@closecatbox
1772
2027
@end defvr
1773
2028
 
1774
2029
@subsection Exterior algebra
1863
2118
                           i j  k    i  j k    i k  j
1864
2119
@end example
1865
2120
 
 
2121
@opencatbox
 
2122
@category{Package itensor} @category{Operators}
 
2123
@closecatbox
1866
2124
@end defvr
1867
2125
 
1868
2126
@defvr {Operator} |
1899
2157
declared totally antisymmetric in their covariant indices. Otherwise,
1900
2158
the results will be incorrect.
1901
2159
 
 
2160
@opencatbox
 
2161
@category{Package itensor} @category{Operators}
 
2162
@closecatbox
1902
2163
@end defvr
1903
2164
 
1904
2165
@deffn {Function} extdiff (@var{expr}, @var{i})
1930
2191
(%t6)                             v    - v
1931
2192
                                   j,i    i,j
1932
2193
(%i7) ishow(extdiff(a([i,j]),k))$
1933
 
(%t7)                      a      - a      + a
1934
 
                            j k,i    i k,j    i j,k
 
2194
(%t7)                    - (a      - a      + a     )
 
2195
                             k j,i    k i,j    j i,k
 
2196
 
1935
2197
@end example
1936
2198
 
 
2199
@opencatbox
 
2200
@category{Package itensor}
 
2201
@closecatbox
1937
2202
@end deffn
1938
2203
 
1939
2204
@deffn {Function} hodge (@var{expr})
1977
2242
 
1978
2243
@end example
1979
2244
 
 
2245
@opencatbox
 
2246
@category{Package itensor}
 
2247
@closecatbox
1980
2248
@end deffn
1981
2249
 
1982
2250
@defvr {Option variable} igeowedge_flag
1988
2256
When set to @code{true}, differential forms will agree with the notion
1989
2257
of the volume element.
1990
2258
 
 
2259
@opencatbox
 
2260
@category{Package itensor}
 
2261
@closecatbox
1991
2262
@end defvr
1992
2263
 
1993
2264
 
2031
2302
 
2032
2303
NB: This version of the @code{tentex} function is somewhat experimental.
2033
2304
 
 
2305
@opencatbox
 
2306
@category{Package itensor} @category{TeX output}
 
2307
@closecatbox
2034
2308
@end deffn
2035
2309
 
2036
2310
@subsection Interfacing with ctensor
2087
2361
   l, m
2088
2362
@end example
2089
2363
 
 
2364
@opencatbox
 
2365
@category{Package itensor} @category{Package ctensor}
 
2366
@closecatbox
2090
2367
@end deffn
2091
2368
 
2092
2369
@subsection Reserved words