|
From: Viktor T. <vt...@us...> - 2004-11-25 01:49:52
|
Update of /cvsroot/maxima/maxima/doc/info In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19503 Modified Files: Ctensor.texi Tensor.texi Log Message: First round of changes to bring all CTENSOR/ITENSOR documentation up-to-date. Index: Ctensor.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Ctensor.texi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Ctensor.texi 4 Nov 2004 05:12:25 -0000 1.5 +++ Ctensor.texi 25 Nov 2004 01:49:39 -0000 1.6 @@ -6,12 +6,12 @@ @node Introduction to Ctensor, Definitions for Ctensor, Ctensor, Ctensor @section Introduction to Ctensor - - Component Tensor Manipulation Package. To use the CTENSR -package, type TSETUP(); which automatically loads it from within -Maxima (if it is not already loaded) and then prompts the user to -input his coordinate system. The user is first asked to specify the -dimension of the manifold. If the dimension is 2, 3 or 4 then the list -of coordinates defaults to [X,Y], [X,Y,Z] or [X,Y,Z,T] respectively. + - Component Tensor Manipulation Package. To use the CTENSOR +package, type load(ctensor). +To begin an interactive session with CTENSOR, type csetup(). You are +first asked to specify the dimension of the manifold. If the dimension +is 2, 3 or 4 then the list of coordinates defaults to [x,y], [x,y,z] +or [x,y,z,t] respectively. These names may be changed by assigning a new list of coordinates to the variable OMEGA (described below) and the user is queried about this. @@ -29,213 +29,687 @@ solution) as an example. Many of the functions in CTENSR will be displayed for the standard metric as examples. @example -(%i2) TSETUP(); +(%i1) load(ctensor); + +(%o1) /usr/local/lib/maxima/share/tensor/ctensor.mac +(%i2) csetup(); Enter the dimension of the coordinate system: 4; Do you wish to change the coordinate names? -N; +n; Do you want to 1. Enter a new metric? + 2. Enter a metric from a file? + 3. Approximate a metric with a Taylor series? -Enter 1, 2 or 3 1; + Is the matrix 1. Diagonal 2. Symmetric 3. Antisymmetric 4. General Answer 1, 2, 3 or 4 1; -Row 1 Column 1: A; -Row 2 Column 2: X^2; -Row 3 Column 3: X^2*SIN(Y)^2; -Row 4 Column 4: -D; +Row 1 Column 1: +a; +Row 2 Column 2: +x^2; +Row 3 Column 3: +x^2*sin(y)^2; +Row 4 Column 4: +-d; + Matrix entered. Enter functional dependencies with the DEPENDS function or 'N' if none -DEPENDS([A,D],X); +depends([a,d],x); Do you wish to see the metric? -Y; - [ A 0 0 0 ] +y; + [ a 0 0 0 ] [ ] [ 2 ] - [ 0 X 0 0 ] + [ 0 x 0 0 ] [ ] [ 2 2 ] - [ 0 0 X SIN (Y) 0 ] + [ 0 0 x sin (y) 0 ] [ ] - [ 0 0 0 - D ] -Do you wish to see the metric inverse? -N; + [ 0 0 0 - d ] + +(%o2) done +(%i3) christof(mcs); + + a + x +(%t3) mcs = --- + 1, 1, 1 2 a + + 1 +(%t4) mcs = - + 1, 2, 2 x + + 1 +(%t5) mcs = - + 1, 3, 3 x + d + x +(%t6) mcs = --- + 1, 4, 4 2 d + + x +(%t7) mcs = - - + 2, 2, 1 a + + cos(y) +(%t8) mcs = ------ + 2, 3, 3 sin(y) + + 2 + x sin (y) +(%t9) mcs = - --------- + 3, 3, 1 a + +(%t10) mcs = - cos(y) sin(y) + 3, 3, 2 + + d + x +(%t11) mcs = --- + 4, 4, 1 2 a + +(%o11) done @end example + @c end concepts Ctensor @node Definitions for Ctensor, , Introduction to Ctensor, Ctensor -@section Definitions for Ctensor -@c @node CHR1 + +@section Initialization and setup + +csetup +@c @node csetup @c @unnumberedsec phony -@defun CHR1 ([i,j,k]) -yields the Christoffel symbol of the first kind via the -definition -@example - (g + g - g )/2 . - ik,j jk,i ij,k -@end example -@noindent -To evaluate the Christoffel symbols for a particular metric, the -variable METRIC must be assigned a name as in the example under CHR2. +@defun csetup () +A function in the CTENSOR (Component Tensor Manipulation) package +which initializes the package and allows the user to enter a metric +interactively. See CTENSOR for more details. +@end defun + +@c @node cmetric +@c @unnumberedsec phony +@defun cmetric ([dis]) +A function in the CTENSOR (Component Tensor Manipulation) package +that computes the metric inverse and sets up the package for +further calculations. +If @code{cframe_flag} is false, the function computes the inverse metric +ug from the (user-defined) matrix @code{lg}. The metric determinant is +also computed and stored in the variable @code{gdet}. Furthermore, the +package determines if the metric is diagonal and sets the value +of @code{diagmetric} accordingly. If the optional argument @code{dis} +is present and not equal to false, the user is prompted to see +the metric inverse. +If @code{cframe_flag} is true, the function expects that the values of +@code{fri} (the inverse frame matrix) and @code{lfg} (the frame metric) are +defined. From these, the frame matrix @code{fr} and the inverse frame +metric @code{ufg} are computed. @end defun -@c @node CHR2 + +@c @node ct_coordsys @c @unnumberedsec phony -@defun CHR2 ([i,j],[k]) -yields the Christoffel symbol of the second kind -defined by the relation +@defun ct_coordsys (coordinate_system,[extra_args]) +Sets up a predefined coordinate system and metric. The argument +coordinate_system can be one of the following symbols: + +*** TO BE WRITTEN *** + +@end defun + +@c @node init_ctensor +@c @unnumberedsec phony +@defun init_ctensor () +Initializes the CTENSOR package. + +*** TO BE WRITTEN *** +@end defun + + +@section The tensors of curved space + +The main purpose of the CTENSOR package is to compute the tensors +of curved space(time), most notably the tensors used in general +relativity. + +When a metric base is used, CTENSOR can compute the following tensors: + @example - ks - CHR2([i,j],[k]) = g (g + g - g )/2 - is,j js,i ij,s + + lg -- ug + \ \ + lcs -- mcs -- ric -- uric + \ \ \ + \ tracer - ein -- lein + \ + riem -- lriem -- weyl + \ + uriem + + @end example -@end defun -@c @node CHRISTOF + +CTENSOR can also work using moving frames. When @code{cframe_flag} is +set to @code{true}, the following tensors can be calculated: + +@example + + lfg -- ufg + \ + fri -- fr -- lcs -- mcs -- lriem -- ric -- uric + \ | \ \ \ + lg -- ug | weyl tracer - ein -- lein + |\ + | riem + | + \uriem + +@end example + +@c @node christof @c @unnumberedsec phony -@defun CHRISTOF (arg) -A function in the CTENSR (Component Tensor +@defun christof (dis) +A function in the CTENSOR (Component Tensor Manipulation) package. It computes the Christoffel symbols of both -kinds. The arg determines which results are to be immediately +kinds. The argument @code{dis} determines which results are to be immediately displayed. The Christoffel symbols of the first and second kinds are -stored in the arrays LCS[i,j,k] and MCS[i,j,k] respectively and +stored in the arrays @code{lcs[i,j,k]} and @code{mcs[i,j,k]} respectively and defined to be symmetric in the first two indices. If the argument to -CHRISTOF is LCS or MCS then the unique non-zero values of LCS[i,j,k] -or MCS[i,j,k], respectively, will be displayed. If the argument is ALL -then the unique non-zero values of LCS[i,j,k] and MCS[i,j,k] will be -displayed. If the argument is FALSE then the display of the elements -will not occur. The array elements MCS[i,j,k] are defined in such a +@code{christof} is @code{lcs} or @code{mcs} then the unique non-zero values of @code{lcs[i,j,k]} +or @code{mcs[i,j,k]}, respectively, will be displayed. If the argument is @code{all} +then the unique non-zero values of @code{lcs[i,j,k]} and @code{mcs[i,j,k]} will be +displayed. If the argument is @code{false} then the display of the elements +will not occur. The array elements @code{mcs[i,j,k]} are defined in such a manner that the final index is contravariant. +@end defun + +@c @node ricci +@c @unnumberedsec phony +@defun ricci (dis) +A function in the CTENSOR (Component Tensor +Manipulation) package. @code{ricci} computes the covariant (symmetric) +components @code{ric[i,j]} of the Ricci tensor. If the argument @code{dis} is @code{true}, +then the non-zero components are displayed. + +@c @node uricci +@c @unnumberedsec phony +@defun uricci (dis) +Tensor package) This function first computes the +covariant components @code{ric[i,j]} of the Ricci tensor. +Then the mixed Ricci tensor is computed using the +contravariant metric tensor. If the value of the argument @code{dis} +is @code{true}, then these mixed components, @code{uric[i,j]} (the index i is +covariant and the index j is contravariant), will be displayed +directly. Otherwise, @code{ricci(false)} will simply compute the entries +of the array @code{uric[i,j]} without displaying the results. @end defun -@c @node COVDIFF + +*** TO BE WRITTEN *** + +@end defun +@c @node scurvature @c @unnumberedsec phony -@defun COVDIFF (exp,v1,v2,...) -yields the covariant derivative of exp with -respect to the variables vi in terms of the Christoffel symbols of the -second kind (CHR2). In order to evaluate these, one should use -EV(exp,CHR2). +@defun scurvature () + +returns the scalar curvature (obtained by contracting +the Ricci tensor) of the Riemannian manifold with the given metric. @end defun -@c @node CURVATURE +@c @node einstein @c @unnumberedsec phony -@defun CURVATURE ([i,j,k],[h]) -Indicial Tensor Package) yields the Riemann -curvature tensor in terms of the Christoffel symbols of the second -kind (CHR2). The following notation is used: +@defun einstein (dis) +A function in the CTENSOR (Component Tensor +Manipulation) package. @code{einstein} computes the mixed Einstein tensor +after the Christoffel symbols and Ricci tensor have been obtained +(with the functions @code{christof} and @code{ricci}). If the argument @code{dis} is +@code{true}, then the non-zero values of the mixed Einstein tensor @code{ein[i,j]} +will be displayed where @code{j} is the contravariant index. +The variable @code{rateinstein} (default: @code{true} will cause the rational simplification on +these components. If @code{ratfac} (default: @code{false}) is TRUE then the components will +also be factored. + +@end defun +@c @node leinstein +@c @unnumberedsec phony +@defun leinstein (dis) +Covariant Einstein-tensor. + +*** TO BE WRITTEN *** + +@end defun + +@c @node riemann +@c @unnumberedsec phony +@defun riemann (dis) +A function in the CTENSOR (Component Tensor +Manipulation) Package. @code{riemann} computes the Riemann curvature tensor +from the given metric and the corresponding Christoffel symbols. The following +index conventions are used: + @example - h h h %1 h - CURVATURE = - CHR2 - CHR2 CHR2 + CHR2 - i j k i k,j %1 j i k i j,k - h %1 - + CHR2 CHR2 - %1 k i j + l _l _l _l _m _l _m + R[i,j,k,l] = R = | - | + | | - | | + ijk ij,k ik,j mk ij mj ik @end example + +This notation is consistent with the notation used by the ITENSOR +package and its @code{icurvature} function. +If the optional argument @code{dis} is @code{true}, +the non-zero components @code{riem[i,j,k,l]} will be displayed. +As with the Einstein tensor, various switches set by the user +control the simplification of the components of the Riemann tensor. +If @code{ratriemann} (default: @code{true}) is @code{true}, then +rational simplification will be done. If @code{ratfac} (default: +@code{false}) is @code{true} then +each of the components will also be factored. + @end defun -@c @node DIAGMETRIC -@c @unnumberedsec phony -@defvar DIAGMETRIC - default:[] - An option in the CTENSR (Component Tensor -Manipulation) package. If DIAGMETRIC is TRUE special routines compute -all geometrical objects (which contain the metric tensor explicitly) -by taking into consideration the diagonality of the metric. Reduced -run times will, of course, result. Note: this option is set -automatically by TSETUP if a diagonal metric is specified. -@end defvar -@c @node DIM +@c @node lriemann @c @unnumberedsec phony -@defvar DIM - default:[4] - An option in the CTENSR (Component Tensor -Manipulation) package. DIM is the dimension of the manifold with the -default 4. The command DIM:N; will reset the dimension to any other -integral value. +@defun lriemann (dis) +Covariant Riemann-tensor (@code{lriem[]}). -@end defvar -@c @node EINSTEIN +*** TO BE WRITTEN *** + +@end defun + +@c @node uriemann @c @unnumberedsec phony -@defun EINSTEIN (dis) -A function in the CTENSR (Component Tensor -Manipulation) package. EINSTEIN computes the mixed Einstein tensor -after the Christoffel symbols and Ricci tensor have been obtained -(with the functions CHRISTOF and RICCICOM). If the argument dis is -TRUE, then the non-zero values of the mixed Einstein tensor G[i,j] -will be displayed where j is the contravariant index. -RATEINSTEIN[TRUE] if TRUE will cause the rational simplification on -these components. If RATFAC[FALSE] is TRUE then the components will -also be factored. +@defun uriemann (dis) +returns the contravariant components of the Riemann +curvature tensor as array elements @code{uriem[i,j,k,l]}. These are displayed +if @code{dis} is @code{true}. @end defun -@c @node LRICCICOM + +@c @node rinvariant @c @unnumberedsec phony -@defun LRICCICOM (dis) -A function in the CTENSR (Component Tensor -Manipulation) package. LRICCICOM computes the covariant (symmetric) -components LR[i,j] of the Ricci tensor. If the argument dis is TRUE, -then the non-zero components are displayed. +@defun rinvariant () +*** TO BE WRITTEN *** +Tensor package) forms the Kretchmann-invariant (@code{kinvariant}) obtained by +contracting the tensors +@example +lriem[i,j,k,l]*uriem[i,j,k,l]. +@end example + +This object is not automatically simplified since it can be very large. @end defun -@c @node MOTION + +@c @node weyl @c @unnumberedsec phony -@defun MOTION (dis) -A function in the CTENSR (Component Tensor -Manipulation) package. MOTION computes the geodesic equations of -motion for a given metric. They are stored in the array EM[i]. If -the argument dis is TRUE then these equations are displayed. +@defun weyl () +computes the Weyl conformal tensor. If the argument @code{dis} is +@code{true}, the non-zero components @code{weyl[i,j,k,l]} will be displayed to the +user. Otherwise, these components will simply be computed and stored. +If the switch @code{ratweyl} is set to @code{true}, then the components will be +rationally simplified; if @code{ratfac} is @code{true} then the results will be +factored as well. @end defun -@c @node OMEGA + +@section Frame fields + +When the variable @code{cframe_flag} is set to true, the CTENSOR package +performs its calculations using a moving frame. + +@c @node frame_bracket @c @unnumberedsec phony -@defvar OMEGA - default:[] - An option in the CTENSR (Component Tensor -Manipulation) package. OMEGA assigns a list of coordinates to the -variable. While normally defined when the function TSETUP is called, -one may redefine the coordinates with the assignment -OMEGA:[j1,j2,...jn] where the j's are the new coordinate names. A call -to OMEGA will return the coordinate name list. Also see -DESCRIBE(TSETUP); . +@defun frame_bracket (fr,fri,diagframe) +The frame bracket (@code{fb[]}). -@end defvar -@c @node RIEMANN +*** TO BE WRITTEN *** +@end defun + +@section Algebraic classification + +A new feature (as of November, 2004) of CTENSOR is its ability to +compute the Petrov classification of a 4-dimensional spacetime metric. +For a demonstration of this capability, see the file +@code{share/tensor/petrov.dem}. + +@c @node nptetrad @c @unnumberedsec phony -@defun RIEMANN (dis) -A function in the CTENSR (Component Tensor -Manipulation) Package. RIEMANN computes the Riemann curvature tensor -from the given metric and the corresponding Christoffel symbols. If -dis is TRUE, the non-zero components R[i,j,k,l] will be displayed. All -the indicated indices are covariant. As with the Einstein tensor, -various switches set by the user control the simplification of the -components of the Riemann tensor. If RATRIEMAN[TRUE] is TRUE then -rational simplification will be done. If RATFAC[FALSE] is TRUE then -each of the components will also be factored. +@defun nptetrad () +Compute a Newman-Penrose null tetrad (@code{np}) and its inverse (@code{npi}). +*** TO BE WRITTEN *** @end defun -@c @node TRANSFORM + +@c @node psi @c @unnumberedsec phony -@defun TRANSFORM - - The TRANSFORM command in the CTENSR package has been -renamed to TTRANSFORM. +@defun psi (dis) +Compute the five Newman-Penrose coefficients @code{psi[0]}...@code{psi[4]}. + +*** TO BE WRITTEN *** @end defun -@c @node TSETUP + +@c @node petrov @c @unnumberedsec phony -@defun TSETUP () -A function in the CTENSR (Component Tensor Manipulation) -package which automatically loads the CTENSR package from within -Maxima (if it is not already loaded) and then prompts the user to -make use of it. See CTENSOR (nota bene, not CTENSR) for more details. +@defun petrov () +Compute the Petrov classification of the metric characterized by @code{psi[0]}...@code{psi[4]}. + +*** TO BE WRITTEN *** @end defun -@c @node TTRANSFORM + + +@section Torsion and nonmetricity + +*** TO BE WRITTEN - NOT YET IMPLEMENTED *** + + +@section miscellaneous features + +@c @node ctransform @c @unnumberedsec phony -@defun TTRANSFORM (matrix) -A function in the CTENSR (Component Tensor +@defun ctransform (matrix) +A function in the CTENSOR (Component Tensor Manipulation) package which will perform a coordinate transformation upon an arbitrary square symmetric matrix. The user must input the functions which define the transformation. (Formerly called TRANSFORM.) @end defun + +@c @node findde +@c @unnumberedsec phony +@defun findde () +*** TO BE WRITTEN *** +@end defun +@c @node cograd +@c @unnumberedsec phony +@defun cograd () +*** TO BE WRITTEN *** +@end defun +@c @node contragrad +@c @unnumberedsec phony +@defun contragrad () +*** TO BE WRITTEN *** +@end defun +@c @node dscalar +@c @unnumberedsec phony +@defun dscalar () +*** TO BE WRITTEN *** +@end defun +@c @node checkdiv +@c @unnumberedsec phony +@defun checkdiv () +*** TO BE WRITTEN *** +@end defun + +@c @node cgeodesic +@c @unnumberedsec phony +@defun cgeodesic (dis) +A function in the CTENSOR (Component Tensor +Manipulation) package. @code{cgeodesic} computes the geodesic equations of +motion for a given metric. They are stored in the array @code{geod[i]}. If +the argument @code{dis} is @code{true} then these equations are displayed. + +@end defun + + +@c @node bdvac +@c @unnumberedsec phony +@defun bdvac () +*** TO BE WRITTEN *** +@end defun +@c @node invariant1 +@c @unnumberedsec phony +@defun invariant1 () +*** TO BE WRITTEN *** +@end defun +@c @node invariant2 +@c @unnumberedsec phony +@defun invariant2 () +*** TO BE WRITTEN - NOT YET IMPLEMENTED *** +@end defun +@c @node bimetric +@c @unnumberedsec phony +@defun bimetric () +*** TO BE WRITTEN - NOT YET IMPLEMENTED *** +@end defun + +@section Utility functions + +@c @node diagmatrixp +@c @unnumberedsec phony +@defun diagmatrixp () +*** TO BE WRITTEN *** +@end defun +@c @node symmetricp +@c @unnumberedsec phony +@defun symmetricp () +*** TO BE WRITTEN *** +@end defun +@c @node ntermst +@c @unnumberedsec phony +@defun ntermst () +*** TO BE WRITTEN *** +@end defun +@c @node cdisplay +@c @unnumberedsec phony +@defun cdisplay () +*** TO BE WRITTEN *** +@end defun +@c @node deleten +@c @unnumberedsec phony +@defun deleten () +*** TO BE WRITTEN *** +@end defun + +@section Variables used by CTENSOR + + +@c @node dim +@c @unnumberedsec phony +@defvar dim + default:[4] - An option in the CTENSOR (Component Tensor +Manipulation) package. @code{dim} is the dimension of the manifold with the +default 4. The command @code{dim:n}; will reset the dimension to any other +value @code{n}. + +@end defvar +@c @node diagmetric +@c @unnumberedsec phony +@defvar diagmetric + default:@code{false} - An option in the CTENSOR (Component Tensor +Manipulation) package. If @code{diagmetric} is @code{true} special routines compute +all geometrical objects (which contain the metric tensor explicitly) +by taking into consideration the diagonality of the metric. Reduced +run times will, of course, result. Note: this option is set +automatically by @code{csetup()} if a diagonal metric is specified. + +@end defvar + +ctrgsimp + +cframe_flag + +ctayswitch + +gdet + +ratchristof + +@c @node rateinstein +@c @unnumberedsec phony +@defvar rateinstein + default: @code{false} - if @code{true} rational simplification will be +performed on the non-zero components of Einstein tensors; if +@code{ratfac} is @code{true} then the components will also be factored. + +@end defvar + +@end defvar +@c @node ratriemann +@c @unnumberedsec phony +@defvar ratriemann + default: @code{false} - one of the switches which controls +simplification of Riemann tensors; if @code{true}, then rational +simplification will be done; if @code{ratfac} is @code{true} then each of the +components will also be factored. + +@end defvar + +ratweyl + +lfg + +ufg + +riem + +lriem + +uriem + +ric + +uric + +lg + +ug + +weyl + +fb + +kinvariant + +np + +npi + +tensorkill + +@c @node ct_coords +@c @unnumberedsec phony +@defvar ct_coords + default:[] - An option in the CTENSOR (Component Tensor +Manipulation) package. @code{ct_coords} contains a list of coordinates. +While normally defined when the function @code{csetup} is called, +one may redefine the coordinates with the assignment +@code{ct_coords:[j1,j2,...jn]} where the j's are the new coordinate names. +See also @code{csetup}. + +@end defvar + + + +@section Reserved names + +The following names are used internally by the CTENSOR package and +should not be redefined: + +_lg() + +_ug() + +cleanup() + +contract4() + +ctaylor() + +filemet() + +findde1() + +findde2() + +findde3() + +kdelt() + +newmet() + +setflags() + +readvalue() + +resimp() + +sermet() + +txyzsum() + +tmetric() + +triemann() + +tricci() + +trrc() + +yesp() + + +@section Changes + +In November, 2004, the CTENSOR package was extensively rewritten. +Many functions and variables have been renamed in order to make the +package compatible with the commercial version of MACSYMA. + + +@code{vect_coords} Was: COORDINATES + +@code{ctaylor()} Was: DLGTAYLOR() + +@code{lgeod[]} Was: EM + +@code{ein[]} Was: G[] + +@code{ric[]} Was: LR[] + +@code{ricci()} Was: LRICCICOM() + +@code{ctaypov} Was: MINP + +@code{cgeodesic()} Was: MOTION + +@code{ct_coords} Was: OMEGA + +@code{ctayvar} Was: PARAM + +@code{riem[]} Was: R[] + +@code{uriemann()} Was: RAISERIEMANN() + +@code{ratriemann} Was: RATRIEMAN + +@code{uric[]} Was: RICCI[] + +@code{uricci()} Was: RICCICOM() + +@code{cmetric()} Was: SETMETRIC() + +@code{ctaypt} Was: TAYPT + +@code{ctayswitch} Was: TAYSWITCH + +@code{csetup()} Was: TSETUP() + +@code{ctransform()} Was: TTRANSFORM() + +@code{uriem[]} Was: UR[] + +@code{weyl[]} Was: W[] + + + + + + + + + Index: Tensor.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/Tensor.texi,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Tensor.texi 4 Nov 2004 05:12:25 -0000 1.4 +++ Tensor.texi 25 Nov 2004 01:49:39 -0000 1.5 @@ -1,294 +1,456 @@ @menu -* Introduction to Tensor:: -* Definitions for Tensor:: +* Introduction to ITENSOR:: +* Definitions for ITENSOR:: @end menu @node Introduction to Tensor, Definitions for Tensor, Tensor, Tensor @section Introduction to Tensor - Indicial Tensor Manipulation package. It may be loaded by -LOADFILE("itensr"); A manual for the Tensor packages is -available in share/tensor.descr. A demo is available by -DEMO("itenso.dem1"); (and additional demos are in -("itenso.dem2"), ("itenso.dem3") and following). +@code{load(itensor)}. Demos are also available: try @code{demo(itensor)}. - - There are two tensor packages in Maxima, CTENSR and -ITENSR. CTENSR is Component Tensor Manipulation, and may be accessed -with LOAD(CTENSR); . ITENSR is Indicial Tensor Manipulation, and is -loaded by doing LOAD(ITENSR); A manual for CTENSR AND ITENSR is -available from the LCS Publications Office. Request MIT/LCS/TM-167. -In addition, demos exist on the TENSOR; directory under the filenames -CTENSO DEMO1, DEMO2, etc. and ITENSO DEMO1, DEMO2, etc. Do -DEMO("ctenso.dem1"); or DEMO("itenso.dem2"); Send bugs or -comments to RP or TENSOR. + - There are two tensor packages in Maxima, CTENSOR and +ITENSOR. CTENSOR is Component Tensor Manipulation, and may be accessed +with @code{load(ctensor)}. @c end concepts Tensor + @node Definitions for Tensor, , Introduction to Tensor, Tensor -@section Definitions for Tensor -@c @node CANFORM -@c @unnumberedsec phony -@defun CANFORM (exp) -[Tensor Package] Simplifies exp by renaming dummy -indices and reordering all indices as dictated by symmetry conditions -imposed on them. If ALLSYM is TRUE then all indices are assumed -symmetric, otherwise symmetry information provided by DECSYM -declarations will be used. The dummy indices are renamed in the same -manner as in the RENAME function. When CANFORM is applied to a large -expression the calculation may take a considerable amount of time. -This time can be shortened by calling RENAME on the expression first. -Also see the example under DECSYM. Note: CANFORM may not be able to -reduce an expression completely to its simplest form although it will -always return a mathematically correct result. +@section Managing Indexed Objects + +@c @node entertensor +@c @unnumberedsec phony +@defun entertensor +*** TO BE WRITTEN *** @end defun -@c @node CANTEN + +@c @node changename @c @unnumberedsec phony -@defun CANTEN (exp) -[Tensor Package] Simplifies exp by renaming (see RENAME) -and permuting dummy indices. CANTEN is restricted to sums of tensor -products in which no derivatives are present. As such it is limited -and should only be used if CANFORM is not capable of carrying out the -required simplification. +@defun changename +*** TO BE WRITTEN *** +@end defun +@c @node listoftens +@c @unnumberedsec phony +@defun listoftens +*** TO BE WRITTEN *** @end defun -@c @node CARG + +@c @node ishow @c @unnumberedsec phony -@defun CARG (exp) -returns the argument (phase angle) of exp. Due to the -conventions and restrictions, principal value cannot be guaranteed -unless exp is numeric. +@defun ishow +*** TO BE WRITTEN *** +@end defun +@c @node indices +@c @unnumberedsec phony +@defun indices +*** TO BE WRITTEN *** @end defun -@c @node COUNTER + +@c @node rename @c @unnumberedsec phony -@defvar COUNTER - default: [1] determines the numerical suffix to be used in -generating the next dummy index in the tensor package. The prefix is -determined by the option DUMMYX[#]. +@defun rename +*** TO BE WRITTEN *** +@end defun -@end defvar -@c @node DEFCON +@c @node defcon @c @unnumberedsec phony -@defun DEFCON (tensor1,<tensor2,tensor3>) -gives tensor1 the property that the -contraction of a product of tensor1 and tensor2 results in tensor3 -with the appropriate indices. If only one argument, tensor1, is +@defun defcon (tensor1,<tensor2,tensor3>) +gives @code{tensor1} the property that the +contraction of a product of @code{tensor1} and @code{tensor2} results in @code{tensor3} +with the appropriate indices. If only one argument, @code{tensor1}, is given, then the contraction of the product of tensor1 with any indexed -object having the appropriate indices (say tensor) will yield an -indexed object with that name, i.e.tensor, and with a new set of +object having the appropriate indices (say @code{tensor}) will yield an +indexed object with that name, i.e. @code{tensor}, and with a new set of indices reflecting the contractions performed. - For example, if METRIC: G, then DEFCON(G) will implement the + For example, if @code{imetric:g}, then @code{defcon(g)} will implement the raising and lowering of indices through contraction with the metric tensor. - More than one DEFCON can be given for the same indexed object; the + More than one @code{defcon} can be given for the same indexed object; the latest one given which applies in a particular contraction will be used. -CONTRACTIONS is a list of those indexed objects which have been given -contraction properties with DEFCON. +@code{contractions} is a list of those indexed objects which have been given +contraction properties with @code{defcon}. @end defun -@c @node FLUSH + +@c @node remcon @c @unnumberedsec phony -@defun FLUSH (exp,tensor1,tensor2,...) -Tensor Package - will set to zero, in -exp, all occurrences of the tensori that have no derivative indices. +@defun remcon (tensor1,tensor2,...) +removes all the contraction properties +from the @code{tensori}. @code{remcon(all)} removes all contraction properties from +all indexed objects. @end defun -@c @node FLUSHD + +@c @node contract @c @unnumberedsec phony -@defun FLUSHD (exp,tensor1,tensor2,...) -Tensor Package - will set to zero, in -exp, all occurrences of the tensori that have derivative indices. +@defun contract (exp) +*** TO BE WRITTEN *** +@end defun +@c @node indexed_tensor +@c @unnumberedsec phony +@defun indexed_tensor +*** TO BE WRITTEN *** @end defun -@c @node FLUSHND + +@c @node components @c @unnumberedsec phony -@defun FLUSHND (exp,tensor,n) -Tensor Package - will set to zero, in exp, all -occurrences of the differentiated object tensor that have n or more -derivative indices as the following example demonstrates. -@example -(%i1) SHOW(A([I],[J,R],K,R)+A([I],[J,R,S],K,R,S)); - J R S J R -(%o1) A + A - I,K R S I,K R -(%i2) SHOW(FLUSHND(%o1,A,3)); - J R -(%o2) A - I,K R +@defun components +*** TO BE WRITTEN *** +@end defun +@c @node remcomps +@c @unnumberedsec phony +@defun remcomps +*** TO BE WRITTEN *** +@end defun -@end example +@c @node showcomps +@c @unnumberedsec phony +@defun showcomps +*** TO BE WRITTEN *** @end defun -@c @node KDELTA + +@c @node idummy @c @unnumberedsec phony -@defun KDELTA (L1,L2) +@defun idummy () +*** TO BE WRITTEN *** +@end defun + +@c @node idummyx +@c @unnumberedsec phony +@defvar idummyx +*** TO BE WRITTEN *** +@end defvar + +@c @node icounter +@c @unnumberedsec phony +@defvar icounter + default: [1] determines the numerical suffix to be used in +generating the next dummy index in the tensor package. The prefix is +determined by the option @node{idummy} (default: %). +@end defvar + +@c @node kdelta +@c @unnumberedsec phony +@defun kdelta (l1,l2) is the generalized Kronecker delta function defined in -the Tensor package with L1 the list of covariant indices and L2 the -list of contravariant indices. KDELTA([i],[j]) returns the ordinary -Kronecker delta. The command EV(EXP,KDELTA) causes the evaluation of -an expression containing KDELTA([],[]) to the dimension of the +the Tensor package with @code{l1} the list of covariant indices and @code{l2} the +list of contravariant indices. @code{kdelta([i],[j])} returns the ordinary +Kronecker delta. The command @code{ev(exp,kdelta)} causes the evaluation of +an expression containing @code{kdelta([],[])} to the dimension of the manifold. @end defun -@c @node LC + +@c @node kdels @c @unnumberedsec phony -@defun LC (L) +@defun kdels (l1,l2) +*** TO BE WRITTEN *** +@end defun + +@c @node levi_civita +@c @unnumberedsec phony +@defun levi_civita (l) is the permutation (or Levi-Civita) tensor which yields 1 if -the list L consists of an even permutation of integers, -1 if it -consists of an odd permutation, and 0 if some indices in L are +the list @code{l} consists of an even permutation of integers, -1 if it +consists of an odd permutation, and 0 if some indices in @code{l} are repeated. @end defun -@c @node LORENTZ + +@c @node lc_l @c @unnumberedsec phony -@defun LORENTZ (exp) -imposes the Lorentz condition by substituting 0 for all -indexed objects in exp that have a derivative index identical to a -contravariant index. +@defun lc_l +*** TO BE WRITTEN *** +@end defun +@c @node lc_u +@c @unnumberedsec phony +@defun lc_u +*** TO BE WRITTEN *** @end defun -@c @node MAKEBOX + +@c @node canten @c @unnumberedsec phony -@defun MAKEBOX (exp) -will display exp in the same manner as SHOW; however, -any tensor d'Alembertian occurring in exp will be indicated using the -symbol []. For example, []P([M],[N]) represents -G([],[I,J])*P([M],[N],I,J). +@defun canten (exp) +[Tensor Package] Simplifies exp by renaming (see @code{rename}) +and permuting dummy indices. @code{rename} is restricted to sums of tensor +products in which no derivatives are present. As such it is limited +and should only be used if @code{canform} is not capable of carrying out the +required simplification. @end defun -@c @node METRIC + +@section Tensor symmetries + +@c @node decsym @c @unnumberedsec phony -@defun METRIC (G) -specifies the metric by assigning the variable METRIC:G; in -addition, the contraction properties of the metric G are set up by -executing the commands DEFCON(G), DEFCON(G,G,KDELTA). -The variable METRIC, default: [], is bound to the metric, assigned by -the METRIC(g) command. +@defun decsym +*** TO BE WRITTEN *** +@end defun +@c @node remsym +@c @unnumberedsec phony +@defun remsym +*** TO BE WRITTEN *** @end defun -@c @node NTERMSG + +@c @node canform @c @unnumberedsec phony -@defun NTERMSG () -gives the user a quick picture of the "size" of the -Einstein tensor. It returns a list of pairs whose second elements -give the number of terms in the components specified by the first -elements. +@defun canform (exp) +[Tensor Package] Simplifies exp by renaming dummy +indices and reordering all indices as dictated by symmetry conditions +imposed on them. If @code{allsym} is @code{true} then all indices are assumed +symmetric, otherwise symmetry information provided by @code{decsym} +declarations will be used. The dummy indices are renamed in the same +manner as in the @code{rename} function. When @code{canform} is applied to a large +expression the calculation may take a considerable amount of time. +This time can be shortened by calling @code{rename} on the expression first. +Also see the example under @code{decsym}. Note: @code{canform} may not be able to +reduce an expression completely to its simplest form although it will +always return a mathematically correct result. +@end defun +@section Indicial tensor calculus + + +@c @node idiff +@c @unnumberedsec phony +@defun idiff +*** TO BE WRITTEN *** @end defun -@c @node NTERMSRCI + +@c @node liediff @c @unnumberedsec phony -@defun NTERMSRCI () -returns a list of pairs, whose second elements give the -number of terms in the RICCI component specified by the first -elements. In this way, it is possible to quickly find the non-zero -expressions and attempt simplification. +@defun liediff +*** TO BE WRITTEN *** +@end defun +@c @node rediff +@c @unnumberedsec phony +@defun rediff +*** TO BE WRITTEN *** @end defun -@c @node NZETA + +@c @node undiff @c @unnumberedsec phony -@defun NZETA (Z) -returns the complex value of the Plasma Dispersion Function -for complex Z. -@example -NZETAR(Z) ==> REALPART(NZETA(Z)) -@end example -NZETAI(Z) -returns IMAGPART(NZETA(Z)). This function is related to the complex -error function by -@example -NZETA(Z) = %I*SQRT(%PI)*EXP(-Z^2)*(1-ERF(-%I*Z)). -@end example +@defun undiff +*** TO BE WRITTEN *** +@end defun +@c @node evundiff +@c @unnumberedsec phony +@defun evundiff +*** TO BE WRITTEN *** @end defun -@c @node RAISERIEMANN + +@c @node flush @c @unnumberedsec phony -@defun RAISERIEMANN (dis) -returns the contravariant components of the Riemann -curvature tensor as array elements UR[I,J,K,L]. These are displayed -if dis is TRUE. +@defun flush (exp,tensor1,tensor2,...) +Tensor Package - will set to zero, in +exp, all occurrences of the @code{tensori} that have no derivative indices. @end defun -@c @node RATEINSTEIN + +@c @node flushd @c @unnumberedsec phony -@defvar RATEINSTEIN - default: [] - if TRUE rational simplification will be -performed on the non-zero components of Einstein tensors; if -FACRAT:TRUE then the components will also be factored. +@defun flushd (exp,tensor1,tensor2,...) +Tensor Package - will set to zero, in +exp, all occurrences of the @code{tensori} that have derivative indices. -@end defvar -@c @node RATRIEMAN +@end defun + +@c @node flushnd @c @unnumberedsec phony -@defvar RATRIEMAN - - This switch has been renamed RATRIEMANN. +@defun FLUSHND (exp,tensor,n) +Tensor Package - will set to zero, in exp, all +occurrences of the differentiated object tensor that have n or more +derivative indices as the following example demonstrates. +@example +(%i1) ishow(a([i],[J,r],k,r)+a([i],[j,r,s],k,r,s)); + j r s j r +(%o1) a + a + i,k r s I,k r +(%i2) ishow(flushnd(%o1,a,3)); + j r +(%o2) a + i,k r -@end defvar -@c @node RATRIEMANN + +@end example +@end defun + +@c @node coord @c @unnumberedsec phony -@defvar RATRIEMANN - default: [] - one of the switches which controls -simplification of Riemann tensors; if TRUE, then rational -simplification will be done; if FACRAT:TRUE then each of the -components will also be factored. +@defun coord +*** TO BE WRITTEN *** +@end defun +@c @node remcoord +@c @unnumberedsec phony +@defun remcoord +*** TO BE WRITTEN *** +@end defun -@end defvar -@c @node REMCON +@c @node makebox @c @unnumberedsec phony -@defun REMCON (tensor1,tensor2,...) -removes all the contraction properties -from the tensori. REMCON(ALL) removes all contraction properties from -all indexed objects. +@defun makebox (exp) +will display exp in the same manner as SHOW; however, +any tensor d'Alembertian occurring in exp will be indicated using the +symbol []. For example, @code{[]p([m],[n])} represents +@code{g([],[i,j])*p([m],[n],i,j)}. @end defun -@c @node RICCICOM + +@c @node conmetderiv @c @unnumberedsec phony -@defun RICCICOM (dis) -Tensor package) This function first computes the -covariant components LR[i,j] of the Ricci tensor (LR is a mnemonic for -"lower Ricci"). Then the mixed Ricci tensor is computed using the -contravariant metric tensor. If the value of the argument to RICCICOM -is TRUE, then these mixed components, RICCI[i,j] (the index i is -covariant and the index j is contravariant), will be displayed -directly. Otherwise, RICCICOM(FALSE) will simply compute the entries -of the array RICCI[i,j] without displaying the results. +@defun conmetderiv +*** TO BE WRITTEN *** +@end defun +@c @node flush1deriv +@c @unnumberedsec phony +@defun flush1deriv +*** TO BE WRITTEN *** +@end defun + +@section Tensors in curved spaces + +@c @node imetric +@c @unnumberedsec phony +@defun imetric (g) +specifies the metric by assigning the variable @code{imetric:g} in +addition, the contraction properties of the metric G are set up by +executing the commands @code{defcon(g),defcon(g,g,kdelta)}. +The variable @code{imetric}, default: [], is bound to the metric, assigned by +the @code{imetric(g)} command. @end defun -@c @node RINVARIANT + +@c @node ichr1 @c @unnumberedsec phony -@defun RINVARIANT () -Tensor package) forms the invariant obtained by -contracting the tensors +@defun ichr1 ([i,j,k]) +yields the Christoffel symbol of the first kind via the +definition @example -R[i,j,k,l]*UR[i,j,k,l]. + (g + g - g )/2 . + ik,j jk,i ij,k @end example +@noindent +To evaluate the Christoffel symbols for a particular metric, the +variable @code{imetric} must be assigned a name as in the example under CHR2. -This object is not +@end defun -automatically simplified since it can be very large. +@c @node ichr2 +@c @unnumberedsec phony +@defun ichr2 ([i,j],[k]) +yields the Christoffel symbol of the second kind +defined by the relation +@example + ks + ichr2([i,j],[k]) = g (g + g - g )/2 + is,j js,i ij,s +@end example +@end defun +@c @node icurvature +@c @unnumberedsec phony +@defun icurvature ([i,j,k],[h]) +Indicial Tensor Package) yields the Riemann +curvature tensor in terms of the Christoffel symbols of the second +kind (@code{ichr2}). The following notation is used: +@example + h h h %1 h + icurvature = - ichr2 - ichr2 ichr2 + ichr2 + i j k i k,j %1 j i k i j,k + h %1 + + ichr2 ichr2 + %1 k i j +@end example @end defun -@c @node SCURVATURE + +@c @node covdiff @c @unnumberedsec phony -@defun SCURVATURE () -returns the scalar curvature (obtained by contracting -the Ricci tensor) of the Riemannian manifold with the given metric. +@defun covdiff (exp,v1,v2,...) +yields the covariant derivative of exp with +respect to the variables vi in terms of the Christoffel symbols of the +second kind (@code{ichr2}). In order to evaluate these, one should use +@code{ev(exp,ichr2)}. @end defun -@c @node SETUP + +@c @node lorentz_gauge @c @unnumberedsec phony -@defun SETUP () -this has been renamed to TSETUP(); Sets up a metric for -Tensor calculations. +@defun lorentz_gauge (exp) +imposes the Lorentz condition by substituting 0 for all +indexed objects in exp that have a derivative index identical to a +contravariant index. @end defun -@c @node WEYL -@c @unnumberedsec phony -@defun WEYL (dis) -computes the Weyl conformal tensor. If the argument dis is -TRUE, the non-zero components W[I,J,K,L] will be displayed to the -user. Otherwise, these components will simply be computed and stored. -If the switch RATWEYL is set to TRUE, then the components will be -rationally simplified; if FACRAT is TRUE then the results will be -factored as well. +@c @node igeodesic_coords +@c @unnumberedsec phony +@defun igeodesic_coords +*** TO BE WRITTEN *** @end defun + +@section Moving frames + +ifb + +icc1 + +icc2 + +ifc1 + +ifc2 + +ifr + +ifri + +@section Torsion + + +inmc1 + +inmc2 + +inm + +ikt1 + +ikt2 + +itr + + +@section Interfacing with CTENsOR + +ic_convert + +@section Reserved Words + +indices2 + +conti + +covi + +name + +concan + +deri + +irpmon + +%c + +lc0 + |