%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% Ricci %
% Version 1.2 %
% %
% User's manual %
% %
% Run with LaTeX %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\documentstyle{article}
\hbadness 10000
\newcommand{\R}{\mbox{\bf R}}
\newcommand{\C}{\mbox{\bf C}}
\newcommand{\Alt}{\mathop{\mbox{Alt}}\nolimits}
\newcommand{\Sym}{\mathop{\mbox{Sym}}\nolimits}
\newcommand{\crn}[2]{{\vcenter{\vbox{\hbox{\kern#2pt
\vrule width.#2pt height#1pt}\hrule height.#2pt}}}}
\newcommand{\intprod}{\mathbin{\mathchoice\crn54\crn54\crn{3.75}3\crn{2.5}2}}
\newcommand{\hop}[1]{\hfill#1\nopagebreak \vskip0.1cm \nopagebreak}
\setlength{\parindent}{0pt}
\setlength{\parskip}{.06 in}
\pagestyle{headings}
\sloppy
\begin{document}
%
% **********************************
% ********** TITLE PAGE **********
% **********************************
%
\thispagestyle{empty}
%
\vfill
\begin{center}
{\huge\bf
Ricci\\[1cm]
\LARGE \bf
A Mathematica package\\
for doing tensor calculations\\
in differential geometry\\[1cm]
User's Manual\\[2cm]}
\Large \sc
Version 1.2\\[4cm]
\large \sc
By John M. Lee\\
assisted by Dale Lear and John Roth
\end{center}
\vfill
%
\newpage
%
% **************************************
% ********** COPYRIGHT PAGE **********
% **************************************
%
\begin{center}
\LARGE
Ricci\\[0.2cm]
\large
A Mathematica package for doing tensor calculations\\
in differential geometry\\[0.2cm]
User's Manual\\[.7cm]
Version 1.2\\[.7cm]
By John M. Lee\\
assisted by Dale Lear and John Roth\\[1.5cm]
\small
Copyright \copyright 1992--1995 John M. Lee\\
All rights reserved\\[.4cm]
Development of this software was supported in part\\
by NSF grant DMS-9101832\\[.4cm]
{\it Mathematica} is a registered trademark of Wolfram Research, Inc.\\[.4cm]
\end{center}
{\small
This software package and its accompanying documentation are provided as
is, without guarantee of support or maintenance. The copyright holder
makes no express or implied warranty of any kind with respect to this
software, including implied warranties of merchantability or fitness for a
particular purpose, and is not liable for any damages resulting in any way
from its use.
\vspace{.2cm}
Everyone is granted permission to copy, modify and redistribute this
software package and its accompanying documentation, provided that:
\begin{enumerate}
\item All copies contain this notice in the main program file and in the
supporting documentation.
\item All modified copies carry a prominent notice stating who made the
last modification and the date of such modification.
\item No charge is made for this software or works derived from it, with
the exception of a distribution fee to cover the cost of materials
and/or transmission.\\[.1cm]
\begin{center}
\renewcommand{\tabcolsep}{0pt}
\begin{tabular}{l}
John M. Lee\\
Department of Mathematics, GN-50\\
University of Washington\\
Seattle, WA 98195
\end{tabular}\\
\begin{tabular}{l@{\hskip 1ex}l}
Internet: &\verb#lee@math.washington.edu#\\
Fax: &206-543-0397
\end{tabular}
\end{center}
\end{enumerate}
}
%
\newpage
%
% *****************************************
% ********** TABLE OF CONTENTS **********
% *****************************************
%
\tableofcontents
%
%
% ********************************
% ********** OVERVIEW **********
% ********************************
%
\newpage
\section{Introduction}
\label{Introduction-section}
\subsection{Overview}
\label{Overview-subsection}
Ricci is a Mathematica package for doing symbolic tensor computations that
arise in differential geometry. It supports:
\begin{itemize}
\item Tensor expressions with and without indices
\item The Einstein summation convention
\item Correct manipulation of dummy indices
\item Mathematical notation with upper and lower indices
\item Automatic calculation of covariant derivatives
\item Automatic application of tensor symmetries
\item Riemannian metrics and curvatures
\item Differential forms
\item Any number of vector bundles with user-defined characteristics
\item Names of indices indicate which bundles they refer to
\item Complex bundles and tensors
\item Conjugation indicated by barred indices
\item Connections with and without torsion
\end{itemize}
Ricci is named after Gregorio Ricci-Curbastro (1853-1925), who invented the
tensor calculus (what M. Spivak calls ``the debauch of indices'').
This manual describes the capabilities and functions provided by Ricci. To
use Ricci and this manual, you should be familiar with Mathematica, and
with the basic objects of differential geometry (manifolds, vector bundles,
tensors, connections, and covariant derivatives). Chapter
\ref{Reference-section} contains a complete reference list of all the Ricci
commands, functions, and global variables. Most of the important Ricci
commands are described in some detail in the main text, but there are a few
things that are explained only in Chapter \ref{Reference-section}.
I would like to express my gratitude to my collaborators on this project:
Dale Lear, who wrote the first version of the software and contributed
uncountably many expert design suggestions; John Roth, who reworked some of
the most difficult sections of code; Jay Coskey and Pm Weizenbaum, who
contributed invaluable editorial assistance with this manual; the National
Science Foundation and the University of Washington, who provided generous
financial support for the programming effort; and all those mathematicians
who tried out early versions of this software and contributed suggestions
for improvement.
\subsection{Obtaining and using Ricci}
\label{Obtaining-section}
Ricci requires Mathematica version 2.0 or greater. The source takes
approximately 278K bytes of disk storage, including about 49K bytes of
on-line documentation. I have tested the package on a DEC Alpha system,
where it runs reasonably fast and seems to require about 6 or 7 megabytes
of memory. I don't have any idea how it will run on other systems, but the
Alpha is a pretty fast machine, so I expect that Ricci will be very slow on
some platforms.
The source files for Ricci are available to the public free of charge,
either via the World-Wide Web from {\tt
http://www.math.washington.edu/\~{}lee/Ricci/} or by anonymous
ftp from {\tt math.washington.edu}, in
directory {\tt pub/Ricci}.
You'll need to download the Ricci source file {\tt Ricci.m} and put it in a
directory that is accessible to Mathematica. (You may need to change the
value of Mathematica's {\tt \$Path} variable in your initialization file to
make sure that Mathematica can find the Ricci files---see the documentation
for the version of Mathematica that you're using.) Once you've
successfully transferred all the Ricci files to your own system, start up
Mathematica and load the Ricci package by typing {\tt <}.
\subsection{A brief look at Ricci}
\label{Brief-subsection}
To give you a quick idea what typical Ricci input and output look like, here
are a couple of examples. Suppose alpha and beta are 1-tensors. Ricci can
manipulate tensor products and wedge products:
\vbox{\begin{verbatim}
In[4]:= TensorProduct[alpha,beta]
Out[4]= alpha (X) beta
In[5]:= Wedge[alpha,beta]
Out[5]= alpha ^ beta
\end{verbatim}}
and exterior derivatives:
\vbox{\begin{verbatim}
In[6]:= Extd[%]
Out[6]= d[alpha] ^ beta - d[beta] ^ alpha
\end{verbatim} }
To express tensor components with indices, you just type the indices in
brackets immediately after the tensor name. Lower and upper indices are
typed as {\tt L[i]} and {\tt U[i]}, respectively; in output form they
appear as subscripts and superscripts. Indices that result from covariant
differentiation are typed in a second set of brackets. For example, if
{\tt alpha} is a 1-tensor, you indicate the components of {\tt alpha} and
its first covariant derivative as follows:
\vbox{\begin{verbatim}
In[7]:= alpha [L[i]]
Out[7]= alpha
i
\end{verbatim}}
\vbox{\begin{verbatim}
In[8]:= alpha [L[i]] [L[j]]
Out[8]= alpha
i; j
\end{verbatim} }
Ricci always uses the Einstein summation convention: any index
that appears as both a lower index and an upper index in the same term is
considered to be implicitly summed over, and the metric is used to raise and
lower indices. For example, if the metric is named {\tt g}, the components
of the inner product
of {\tt alpha} and {\tt beta} can be expressed in either of the following
ways:
\vbox{
\begin{verbatim}
In[9]:= alpha[L[k]] beta[U[k]]
k
Out[9]= alpha beta
k
\end{verbatim} }
\vbox{
\begin{verbatim}
In[10]:= g[U[i],U[j]] alpha[L[i]] beta[L[j]]
i j
Out[10]= alpha beta g
i j
\end{verbatim} }
Ricci's simplification commands can recognize the equality of two terms,
even when their dummy indices have different names. For example:
\vbox{\begin{verbatim}
In[11]:= %9 + %10
i j k
Out[11]= alpha beta g + alpha beta
i j k
In[12]:= TensorSimplify[%]
i
Out[12]= 2 alpha beta
i
\end{verbatim} }
You can take a covariant derivative of this last expression just by putting
another index in brackets after it:
\vbox{\begin{verbatim}
In[13]:= % [L[j]]
i i
Out[13]= 2 (alpha beta + alpha beta )
i ;j i ;j
\end{verbatim} }
The remainder of this manual will introduce you more thoroughly to the
capabilities of Ricci.
% ************************************
% ********** RICCI BASICS **********
% ************************************
\newpage
\section{Ricci Basics}
\label{Basics-section}
There are four kinds of objects used by Ricci: bundles, indices, constants,
mathematical functions, and tensors. This chapter describes these objects,
and then describes how to construct simple tensor expressions. The last
section in the chapter describes how to save your work under Ricci.
\subsection{Bundles}
\label{Bundles-subsection}
In Ricci, the tensors you manipulate are considered to be sections of one
or more vector bundles. Before defining tensors, you must define each
bundle you will use by calling the {\tt DefineBundle} command. When you
define a bundle, you must specify the bundle's name, its dimension, the
name of its metric, and the index names you will use to refer to the
bundle. You may also specify (either explicitly or by default) whether the
bundle is real or complex, the name of the tangent bundle of its underlying
manifold, and various properties of the bundle's default metric,
connection, and frame.
The simplest case is when there is only one bundle, the tangent bundle of
the underlying manifold. For example, the command
\begin{verbatim}
In[2]:= DefineBundle[ tangent, n, g, {i,j,k} ]
\end{verbatim}
defines a real vector bundle called {\tt tangent}, whose dimension is
{\tt n}, and whose metric is to be called {\tt g}. The index names {\tt i},
{\tt j}, and {\tt k} refer to this bundle. If any expression requires
more than three tangent indices, Ricci generates index names of the form
{\tt k1}, {\tt k2}, {\tt k3}, etc. If the bundle is one-dimensional,
there can only be one index name.
Every bundle must have a metric, which is a nondegenerate inner product on
the fibers. By default, Ricci assumes the metric is positive-definite, but
you can override this assumption by adding the option {\tt PositiveDefinite
-> False} to your {\tt DefineBundle} call. The metric name you specify in
your {\tt DefineBundle} call is automatically defined by Ricci as a
symmetric, covariant 2-tensor associated with this bundle.
By default, Ricci assumes all bundles to be real. You may define a complex
bundle by including the option {\tt Type -> Complex} in your {\tt
DefineBundle} call. For example,
suppose you also need a
complex two-dimensional bundle called {\tt fiber}. You can define it as
follows:
\begin{verbatim}
In[3]:= DefineBundle[ fiber, 2, h, {a,b,c}, Type -> Complex]
\end{verbatim}
This specifies that {\tt fiber}'s metric is to be called {\tt h}, and that
the index names {\tt a}, {\tt b}, and {\tt c} refer to {\tt fiber}.
The fifth argument in the example above, {\tt Type -> Complex}, is a
typical example of a Ricci option. Like options for built-in Mathematica
functions, options for Ricci functions are typed after the required
arguments, and are always of the form {\tt optionname -> value}. This
option specifies that {\tt fiber} is to be a complex bundle.
Any time you define a complex bundle, you also get its conjugate bundle.
In this case the conjugate bundle is referred to as {\tt Conjugate[fiber]};
the barred versions of the indices {\tt a}, {\tt b}, and
{\tt c} will refer to this conjugate bundle.
Mathematically, the conjugate bundle is defined abstractly as follows.
If $V$ is a complex $n$-dimensional vector bundle, let $J\colon V\to V$ denote
the complex structure map of $V$---the real-linear endomorphism
obtained by multiplying by $i = \sqrt{-1}.$ If $\C V$ denotes the
complexification of $V,$ i.e., the tensor product (over \R ) of $V$ with
the complex numbers, then $J$ extends naturally to a complex-linear
endomorphism of $\C V$. $\C V$ decomposes into a direct sum
$\C V = V' \oplus V'',$ where $V'$, $V''$ are the $i$ and $(-i)$-eigenspaces
of $J$, respectively. $V'$ is naturally isomorphic to $V$ itself.
By convention, the conjugate bundle is defined by $\overline V = V''$.
The metric on a complex bundle is automatically defined as a 2-tensor with
Hermitian symmetries. In Ricci, this is implemented as follows.
A Hermitian tensor $h$ on a complex bundle
is a real, symmetric, complex-bilinear
2-tensor on the direct sum of the bundle with its conjugate, with the
additional property that $h_{a b} = h_{\bar a\bar b} = 0$. Thus the only
nonzero components of $h$ are those of the form
$$
h_{a\bar b} = h_{\bar b a} = \overline{h_{b \bar a}}.
$$
(It is done this way because Ricci's index conventions require that all
tensors be considered to be complex-multilinear.) To obtain the usual
sesquilinear form on a complex bundle $V$, you apply the metric
to a pair of vectors $x, \overline y$, where $x, y
\in V$. In Ricci's input form, this inner product would be denoted by {\tt
Inner[~x, Conjugate[y]~]}.
For every bundle you define, you must specify, either explicitly or by
default, the name of the tangent bundle of the underlying manifold. Ricci
needs this information, for example, when generating indices for covariant
derivatives. By default, the first bundle you define (or the direct sum of
this bundle and its conjugate if the bundle is complex) is assumed to be
the underlying tangent bundle for all subsequent bundles. If you want to
override this behavior, you can either give a value to the global variable
{\tt \$DefaultTangentBundle} before defining bundles, or explicitly include
the {\tt TangentBundle} option in each call to {\tt DefineBundle}. See the
Reference List, Chapter \ref{Reference-section}, for more details.
Another common type of bundle is a tangent bundle with a Riemannian metric.
The {\tt DefineBundle} option {\tt MetricType -> Riemannian} specifies that
the bundle is a Riemannian tangent bundle. Riemannian metrics are
described in Section \ref{Riemannian-subsection}.
There are other options you can specify in the {\tt DefineBundle} call,
such as {\tt FlatConnection}, {\tt TorsionFree}, {\tt OrthonormalFrame},
{\tt CommutingFrame}, {\tt PositiveDefinite}, and {\tt ParallelFrame}. If
you decide to change any of these options after the bundle has already been
defined, you can call {\tt Declare}. See the Reference List, Chapter
\ref{Reference-section}, for a complete description of {\tt DefineBundle}
and {\tt Declare}.
\subsection{Indices}
\label{Indices-subsection}
The components of tensors are represented by upper and lower indices.
Ricci adheres to the Einstein index conventions, as follows. For any
vector bundle $V$, sections of $V$ itself are considered as contravariant
1-tensors, while sections of the dual bundle $V^*$ are considered as
covariant 1-tensors. The components of contravariant tensors have upper
indices, while the components of covariant tensors have lower indices.
Higher-rank tensors may have both upper and lower indices. Indices are
distinguished both by their horizontal positions and by their vertical
positions; the altitude of each index indicates whether that index is
covariant or contravariant. Any index that appears twice in the same term
must appear once as an upper index and once as a lower index, and the term
is understood to be summed over that index. (Indices associated with
one-dimensional bundles are an exception to this rule; see Section
\ref{One-subsection} on one-dimensional bundles below.)
In input form and in Ricci's internal representation, indices have the form
{\tt L[name]} for a lower index and {\tt U[name]} for an upper index.
Barred indices (for complex bundles only) are typed in input form as {\tt
LB[name]} and {\tt UB[name]}; they are represented internally by {\tt
L[name[Bar]]} and {\tt U[name[Bar]]}. In output form, upper and lower
indices are represented by superscripts and subscripts, with or without
bars. This special formatting can be turned off by setting {\tt
\$TensorFormatting=False}.
Every index name must be associated with a bundle. This association is
established either by listing the index name in the call to {\tt DefineBundle},
as in the examples above, or by calling {\tt DefineIndex}. You can create new
names without calling {\tt DefineIndex} just by appending digits to an
already-defined index name. For example, if index {\tt j} is associated with
bundle {\tt x}, then so are {\tt j1}, {\tt j25}, etc.
\subsection{Constants}
\label{Constants-subsection}
In the Ricci package, a constant is any expression that is constant with
respect to covariant differentiation in all directions. You can define a
symbol to be a constant by calling {\tt DefineConstant}:
\begin{verbatim}
In[10]:= DefineConstant[ c ]
\end{verbatim}
This defines {\tt c} to be a real constant (the default), and ensures that
covariant derivatives of {\tt c}, such as {\tt c[L[i]]}, are interpreted as
{\tt 0}. To define a complex constant, use
\begin{verbatim}
In[11]:= DefineConstant[ d, Type -> Complex ]
\end{verbatim}
If a constant is real, you may specify that it has other attributes by
giving a {\tt Type} option consisting of one or more keywords in a list,
such as {\tt Type -> \{Positive,Real\}}. The complete list of allowable
{\tt Type} keywords for constants is {\tt Complex}, {\tt Real}, {\tt
Imaginary}, {\tt Positive}, {\tt Negative}, {\tt NonPositive}, {\tt
NonNegative}, {\tt Integer}, {\tt Odd}, and {\tt Even}. The {\tt Type}
option controls how the constant behaves with respect to conjugation,
exponentiation, and logarithms.
After a constant has been defined, you can change its {\tt Type} option by
calling {\tt Declare}, as in the following example:
\begin{verbatim}
In[12]:= Declare[ d, Type -> {NonNegative,Real} ]
\end{verbatim}
In the Ricci package, any expression that does not contain explicit tensors
is assumed to be a constant for the purposes of covariant differentiation,
so in some cases it is not necessary to call {\tt DefineConstant}.
However, if you attempt to insert indices into a symbol {\tt c} that has
not been defined as either a constant or a tensor, you will get output that
looks like {\tt c[L[i],L[j]]}, indicating that Ricci does not know how to
interpret {\tt c}. For this reason, as well as to tell Ricci what type of
constant {\tt c} is, it is always a good idea to define your constants
explicitly.
Note that constants are not given Mathematica's {\tt Constant} attribute,
for the following reason. Some future version of Ricci may allow tensors
depending on parameters such as {\tt t}; in this case, {\tt t} will be
considered a constant from the point of view of covariant differentiation,
but may well be non-constant in expressions such as {\tt D[f[t],t]}.
You can test whether a tensor expression is constant or not by applying the
Ricci function {\tt ConstantQ}.
\subsection{Tensors}
\label{Tensors-subsection}
The most important objects that Ricci uses in calculations are tensors.
Ricci can handle tensors of any rank, and associated with any vector bundle
or direct sum or tensor product of vector bundles. Scalar functions are
represented by 0-tensors; other objects such as vector fields, differential
forms, metrics, and curvatures are represented by higher-rank tensors.
Tensors are created by the {\tt DefineTensor} command. For example, to
create a 1-tensor named {\tt alpha} you could type:
\begin{verbatim}
In[6]:= DefineTensor[ alpha, 1 ]
\end{verbatim}
This creates a real tensor of rank one, which is associated with the
current default tangent bundle, usually the first bundle you defined. All
tensors are assumed by default to be covariant; thus the tensor {\tt alpha}
defined above can be thought of as a covector field or 1-form. To define a
contravariant 1-tensor (i.e., a vector field), you could type:
\begin{verbatim}
In[7]:= DefineTensor[ v, 1, Variance -> Contravariant ]
\end{verbatim}
To create a scalar function, you simply define a tensor of rank 0:
\begin{verbatim}
In[8]:= DefineTensor[ u, 0, Type -> {NonNegative, Real} ]
\end{verbatim}
The {\tt Type} option of {\tt DefineTensor} controls how the tensor behaves
with respect to conjugation, exponentiation, and logarithms. For a rank-0
tensor, its value can be either a single keyword or a list of keywords as
in the example above. The complete list of allowable {\tt Type} keywords
for 0-tensors is {\tt Complex}, {\tt Real}, {\tt Imaginary}, {\tt
Positive}, {\tt Negative}, {\tt NonPositive}, and {\tt NonNegative}. For
higher-rank tensors, the {\tt Type} option can be {\tt Real}, {\tt
Imaginary}, or {\tt Complex}. The default is always {\tt Real}. If you
include one of the keywords indicating positivity or negativity, you may
leave out {\tt Real}, which is assumed.
For higher-rank tensors, you can specify tensor symmetries using the
{\tt Symmetries} option. For example, to define a symmetric covariant
2-tensor named {\tt h}, type:
\begin{verbatim}
In[9]:= DefineTensor[ h, 2, Symmetries -> Symmetric ]
\end{verbatim}
Other common values for the {\tt Symmetries} option are {\tt Alternating}
(or, equivalently, {\tt Skew}) and {\tt NoSymmetries} (the default).
To associate a tensor with a bundle other than the default tangent bundle,
use the {\tt Bundle} option:
\vbox{ \begin{verbatim}
In[10]:= DefineTensor[ omega, 2, Bundle -> fiber,
Type -> Complex,
Variance -> {Contravariant,Covariant} ]
\end{verbatim} }
This specifies that {\tt omega} is a complex 2-tensor on the bundle named
{\tt fiber}, which is contravariant in the first index and covariant in
the second. If the value of the {\tt Variance} option is a list, as in the
example above, the length of the list must be equal to the rank of the tensor,
and each entry specifies the variance of the corresponding index position.
The {\tt Bundle} option may also be typed as a list of bundle names: this
means that the tensor is associated with the direct sum of all the bundles in
the list. Any time you insert an index into a tensor that does not belong to
one of the bundles with which the tensor is associated, you get 0.
After a tensor has been defined, you can change certain of its options,
such as {\tt Type} and {\tt Bundle}, by calling {\tt Declare}. For
example, to change the 0-tensor {\tt u} defined above to be a complex-valued
function, you could type:
\begin{verbatim}
In[11]:= Declare[ u, Type -> Complex ]
\end{verbatim}
Internally, Ricci represents tensors in the form
\begin{verbatim}
Tensor[ name, {i,j,...}, {k,l,...} ]
\end{verbatim}
where {\tt i, j,...} are the tensor indices, and {\tt k, l,...} are indices
resulting from covariant differentiation. In input form, you represent
an unindexed tensor just by typing its name. Indices are inserted by
typing them in brackets after the tensor name, while differentiated indices
go inside a second set of brackets.
A tensor of rank $k$ should be thought of as having $k$ ``index slots''. Each
index slot is associated with a bundle or list of bundles (specified in the
{\tt DefineTensor} command); if an inserted index is not associated with one
of the bundles for that slot, the result is 0. Once all index slots are
full, indices resulting from covariant differentiation can be typed in a
second set of brackets. For 0-tensors, all indices are assumed to result
from differentiation. For example, suppose {\tt eta} is a 2-tensor and
{\tt u} is a 0-tensor (i.e., a scalar function). Table 1 shows the
input, internal, and output forms for various tensor expressions
involving {\tt eta} and {\tt u}.
\setlength{\tabcolsep}{.6ex}
\begin{table}[hbt]
\begin{tabular}{|l|l|l|}
\hline
\multicolumn{1}{|c|}{\sc input}&
\multicolumn{1}{|c|}{\sc internal}&
\multicolumn{1}{|c|}{\sc output}\\ \hline\hline
\verb#eta#&
\verb#Tensor[eta,{},{}]#&
\begin{tabular}{l}
\verb# #\\
\verb#eta#\\
\verb# #\\
\end{tabular}\\ \hline
\verb#eta [L[i],U[j]]#&
\verb#Tensor[eta,{L[i],U[j]},{}]#&
\begin{tabular}{l}
\verb# j# \\
\verb#eta# \\
\verb# i#\\
\end{tabular}\\ \hline
\verb#eta [L[i],U[j]] [L[k]]#&
\verb#Tensor[eta,{L[i],U[j]},{L[k]}]#&
\begin{tabular}{l}
\verb# j#\\
\verb#eta#\\
\verb# i ;k#\\
\end{tabular}\\ \hline
\verb#u#&
\verb#Tensor[u,{},{}]#&
\begin{tabular}{l}
\verb# #\\
\verb#u#\\
\verb# #\\
\end{tabular}\\ \hline
\verb#u [L[a],L[b]]#&
\verb#Tensor[u,{},{L[a],L[b]}]#&
\begin{tabular}{l}
\verb# #\\
\verb#u#\\
\verb# ;a b#\\
\end{tabular}\\ \hline
\end{tabular}
\caption{Input, internal, and output forms for tensors}
\end{table}
The conjugate of a complex tensor without indices is represented in input
form by {\tt Conjugate[name]}; you can type indices in brackets following
this expression just as for ordinary tensors, as in {\tt Conjugate[name]
[L[i],L[j]]}. In internal form, a conjugate tensor looks just as in Table
1, except that the name is replaced by the special form {\tt name[Bar]}.
In output form, the conjugate of a tensor is represented by a bar over the
name.
Indices in any slot can be upper or lower. A metric with lower indices
represents the components of the metric on the bundle itself, and a metric
with upper indices represents the components of the inverse matrix, which
can be interpreted invariantly as the components of the metric on the dual
bundle. For any other tensor, if an index is inserted that is not at the
``natural altitude'' for that slot (based on the {\tt Variance} option when
the tensor was defined), it is assumed to have been raised or lowered by
means of the metric. For example, if {\tt a} is a covariant 1-tensor, then
the components of {\tt a} ordinarily have lower indices. A component with
an upper index is interpreted as follows:
\vbox{\begin{verbatim}
i i j
a = g a
j
\end{verbatim}}
As explained above, components of tensors ordinarily have lower indices in
covariant slots, and upper indices in contravariant slots. Ricci always
assumes there is a default local basis (or ``moving frame'') for each
bundle you define, and components of tensors are understood to be computed
with respect to this basis. The default contravariant basis vectors (i.e.,
basis vectors for the bundle itself) are referred to as {\tt Basis[L[i]]},
and the default covariant basis vectors (representing the dual basis for
the dual bundle) as {\tt Basis[U[i]]}. (You may specify different names to
be used in input and output forms by using the {\tt BasisName} and {\tt
CoBasisName} options of {\tt DefineBundle}.)
Note that the index conventions for basis vectors
are opposite those for components: this is so that the expansion of tensors
in terms of basis vectors will be consistent with the summation convention.
The Ricci function {\tt BasisExpand} can be used to expand any tensor
expression in terms of the default basis. For example:
\vbox{\begin{verbatim}
In[13]:= BasisExpand[alpha]
k3
Out[13]= alpha Basis
k3
\end{verbatim}}
\subsection{Mathematical functions}
\label{MathFunctions-subsection}
If $u$ is a scalar function (0-tensor), you may form other scalar functions
by applying real- or complex-valued mathematical functions such as {\tt
Log} or {\tt Sin} to $u$. This is indicated in Ricci's input form and
output form simply by typing {\tt Log[u]} or {\tt Sin[u]}. You may also
define your own mathematical functions and use them in tensor expressions.
In order for Ricci to correctly interpret an expression such as {\tt f[u]},
it must be told that {\tt f} is a mathematical function, and what its
characteristics are. You do this by calling {\tt DefineMathFunction}. For
example, to define {\tt f} as a complex-valued function of one variable,
you could type:
\begin{verbatim}
In[14]:= DefineMathFunction[ f, Type->Complex ]
\end{verbatim}
The {\tt Type} option determines how the function behaves with respect to
conjugation, exponentiation, and logarithms. The default is {\tt Real},
which means that the function is always assumed to take real values.
Other common options are {\tt Type -> \{Positive,Real\}}, {\tt Type ->
\{NonNegative,Real\}}, and {\tt Type -> Automatic}, which means that {\tt
Conjugate[f[x]] = f[Conjugate[x]]}.
Ricci automatically calls {\tt DefineMathFunction} for the Mathematica
functions {\tt Log}, {\tt Sin}, {\tt Cos}, {\tt Tan}, {\tt Sec}, {\tt Csc},
and {\tt Cot}. If you wish to use any other built-in mathematical
functions in tensor expressions, you must call {\tt DefineMathFunction}
yourself.
\subsection{Basic tensor expressions}
\label{TensorExpressions-subsection}
Tensor expressions are built up from tensors and constants, using the
arithmetic operations {\tt Plus}, {\tt Times}, and {\tt Power}, the
Mathematica operators {\tt Conjugate}, {\tt Re}, and {\tt Im}, scalar
mathematical functions, and the Ricci product, contraction, symmetrization,
and differentiation operators described below.
Tensor expressions can be generally divided into three classes: {\it pure
tensor expressions}, without any indices, in which tensor names are
combined using arithmetic operations and tensor operators such as {\tt
TensorProduct} and {\tt Extd}; {\it component expressions}, in which all
index slots are filled, derivatives are indicated by components of
covariant derivatives, and tensor components are combined using only
arithmetic operations; and {\it mixed tensor expressions}, in which some
but not all index slots are filled, and which usually arise when
expressions of the preceding two types are combined. Component expressions
are considered to have rank 0 when they are acted upon by Ricci's tensor
operators. In most cases, Ricci handles all three kinds of expressions in
a uniform way, but there are some operations, such as computing components
of covariant derivatives, that require component expressions.
You may insert indices into any pure or mixed tensor expression, thereby
converting it to a component expression, by typing the indices in brackets
after the expression, as in {\tt x[L[i],U[j]]}, which is a shorthand input
form for the explicit Ricci function {\tt InsertIndices[ x, \{L[i],L[j]\}
]}. For most tensor expressions, the number of indices inserted must be
equal to the rank of the tensor expression. (The only exception is product
tensors, described in Section \ref{Products-subsection} below.) For
example, if {\tt alpha} and {\tt beta} are 1-tensors, their tensor product,
indicated by {\tt TensorProduct[alpha,beta]}, is a 2-tensor, so you can
insert two indices:
\vbox{
\begin{verbatim}
In[12]:= TensorProduct[alpha,beta] [L[i],L[j]]
Out[12]= alpha beta
i j
\end{verbatim} }
If {\tt x} is a scalar (rank 0) expression, it can be converted to a component
expression by inserting zero indices, as in {\tt InsertIndices[x,\{\}]} or
{\tt x[]}, or by typing {\tt BasisExpand[x]}.
For example, {\tt Inner[alpha,beta]} represents the
inner product of {\tt alpha} and {\tt beta}:
\vbox{ \begin{verbatim}
In[13]:= Inner[alpha,beta]//BasisExpand
k1
Out[13]= alpha beta
k1
\end{verbatim} }
If you type indices in brackets after a component expression (one in which
all index slots are already filled), you get components of covariant
derivatives. Thus:
\vbox{
\begin{verbatim}
In[14]:= %13 [L[j]]
k1 k1
Out[14]= alpha beta + alpha beta
;j k1 k1 ;j
\end{verbatim} }
If you type indices in brackets after a scalar (rank-0) expression that is
not a component expression (i.e., has unfilled index slots), it is first
converted to a component expression before covariant derivatives are taken.
The Ricci functions that can be used to
construct tensor expressions are described in later chapters.
\subsection{Saving your work}
\label{RicciSave-subsection}
Ricci provides a function called {\tt RicciSave} for saving all the
definitions you have made during your current Mathematica session. The
command
\begin{verbatim}
RicciSave["filename"]
\end{verbatim}
writes your definitions in the file called {\tt filename} in Mathematica
input form. {\tt RicciSave} also writes the current definitions of Ricci's
predefined tensors {\tt Basis}, {\tt Curv}, {\tt Tor}, {\tt Conn}, and {\tt
Kronecker} (in case you have defined any relations involving them), and of
its global variables (those whose names start with {\tt \$}). Any previous
contents of {\tt filename} are erased. You can read the definitions back
in by typing {\tt <}. For example:
\vbox{
\begin{verbatim}
In[19]:= Inner[a,b]
Out[19]=
In[20]:= % // BasisExpand
k5 k6
Out[20]= a b
k5 k6
\end{verbatim} }
\subsection{HodgeInner}
\label{HodgeInner-subsection}
{\tt HodgeInner} is the inner product ordinarily used for differential
forms. This differs from the usual inner product by a constant factor,
determined by the global variable {\tt \$WedgeConvention}. It is defined
in such a way that, if $e^i$ are orthonormal 1-forms, then the
$k$-forms
$$
e^{i_1} \wedge \dots \wedge e^{i_k}, \quad i_1 < \dots < i_k
$$
are orthonormal. In output form, {\tt HodgeInner[alpha,beta]} appears as
{\tt <>}.
\subsection{Int}
\label{Int-subsection}
If {\tt v} is a vector field and {\tt alpha} is a differential form,
{\tt Int[v,alpha]} represents interior multiplication of {\tt v} into
{\tt alpha} (usually denoted $i_{\textstyle v}\alpha$ or $v\intprod\alpha$),
with a normalization factor depending on {\tt \$WedgeConvention},
chosen so that {\tt Int[~v,~\_~]} is an antiderivation.
More generally, if {\tt alpha} and {\tt beta} are any alternating tensor
expressions with {\tt Rank[alpha]} $\leq$ {\tt Rank[beta]}, then
{\tt Int[alpha,beta]} represents the generalized interior product of
{\tt alpha} into {\tt beta} (sometimes denoted $\alpha\vee\beta$).
{\tt Int[~alpha,~\_~]} is defined as the
adjoint (with respect to the Hodge inner product) of wedging with {\tt alpha}
on the left: if {\tt alpha}, {\tt beta}, and {\tt gamma} are alternating
tensors of ranks $a$, $b$, and $a+b$, respectively, then
\vbox{ \begin{verbatim}
<> = <>.
alpha
\end{verbatim} }
\subsection{Alt}
\label{Alt-subsection}
If {\tt x} is any tensor expression, {\tt Alt[x]} is the alternating part
of {\tt x}. If {\tt x} is already alternating, then {\tt Alt[x] = x}.
Note that {\tt Alt} expects its argument to be a pure or mixed tensor
expression. This means that you must apply {\tt Alt} {\it before} you insert
indices. If {\tt Alt} is applied to a component expression, it does
nothing, because a component expression is considered to have rank 0.
\subsection{Sym}
\label{Sym-subsection}
If {\tt x} is any tensor expression, {\tt Sym[x]} is the symmetric part
of {\tt x}. If {\tt x} is already symmetric, then {\tt Sym[x] = x}.
Note that {\tt Sym} expects its argument to be a pure or mixed tensor
expression. This means that you must apply {\tt Sym} {\it before} you insert
indices. If {\tt Sym} is applied to a component expression, it does
nothing, because a component expression is considered to have rank 0.
% ***********************************
% ********** DERIVATIVES **********
% ***********************************
\newpage
\section{Derivatives}
\label{Derivatives-section}
This chapter describes the differentiation operators provided by Ricci.
The operators {\tt Del}, {\tt Div}, {\tt Grad}, {\tt Extd}, {\tt ExtdStar},
and {\tt Lie} below are Ricci ``primitives''; after some simplification,
they are maintained unevaluated until you insert indices. The rest of the
operators described here are immediately transformed into expressions
involving the primitive operators.
\subsection{Del}
\label{Del-subsection}
The basic differentiation operator in Ricci is {\tt Del}. If {\tt x} is a
tensor expression, {\tt Del[x]} represents the total covariant derivative
of {\tt x}. ({\tt Del} stands for the mathematical symbol
``$\nabla$''.) If {\tt x} is a tensor of rank $k$, {\tt Del[x]} is a tensor of
rank $k+1$. If {\tt x} is a section of bundle $b$, {\tt Del[x]} is a
section of the tensor product of $b$ with its underlying (co)tangent
bundle. The extra index slot resulting from differentiation is always the
last one, and is always covariant.
When you insert indices into {\tt Del[x]}, you get components of the
covariant derivative of {\tt x}. For example, suppose {\tt a} is a
2-tensor:
\vbox{\begin{verbatim}
In[21]:= Del[a]
Out[21]= Del[a]
In[22]:= % [L[i],L[j],L[k]]
Out[22]= a
i j ;k
\end{verbatim} }
The operator {\tt Del} can also be used to take the covariant derivative of a
tensor with respect to a specific vector. If {\tt v} is a 1-tensor
expression, {\tt Del[v,x]} represents the covariant derivative of {\tt x} in
the direction {\tt v}; this is the contraction of {\tt v} with the last
index of {\tt Del[x]}:
\vbox{
\begin{verbatim}
In[23]:= Del[v,a]
Out[23]= Del [a]
v
In[24]:= % [L[i],L[j]]
k5
Out[24]= a v
i j ;k5
\end{verbatim} }
Here {\tt v} can be a contravariant or covariant 1-tensor; if it is covariant,
it is converted to a vector field by means of the metric. If {\tt u} is a
scalar function (i.e., a 0-tensor), then {\tt Del[v,u]} is just the ordinary
directional derivative of {\tt u} in the direction {\tt v}.
If {\tt v} is a contravariant basis vector such as {\tt Basis[L[i]]}, Ricci
uses a special shorthand output form for {\tt Del[v,a]}:
\vbox{ \begin{verbatim}
In[25]:= Del[ Basis[L[i]], a ]
Out[25]= Del [a]
i
\end{verbatim} }
{\bf WARNING:} Some authors use a notation such as $\nabla_i a_{jk}$
to refer to the $(j,k,i)$-component of the total covariant derivative
$\nabla a$. This is {\it not}\/ consistent with Ricci's convention;
to Ricci, the expression
\vbox{ \begin{verbatim}
Del [a ]
i j k
\end{verbatim} }
is the directional derivative of the {\it component} $a_{jk}$ in
the $i$-direction. It is not the component of a tensor; it differs
from the component $a_{jk;i}$ by terms involving the
connection coefficients.
\subsection{CovD}
\label{CovD-subsection}
If {\tt x} is a component expression, the {\tt L[i]} component of the
covariant derivative of {\tt x} is represented in input form either by {\tt
CovD[x,\{L[i]\}]} or by the abbreviated form {\tt x[L[i]]}. Multiple
covariant derivatives are indicated by {\tt CovD[x,\{L[i],L[j],...\}]} or
{\tt x[L[i],L[j],...]}. If {\tt x} is a scalar expression with some
unfilled index slots, Ricci automatically inserts indices to convert it to
a component expression before taking covariant derivatives. Ricci
automatically expands covariant derivatives of sums, products, and powers.
For example:
\vbox{\begin{verbatim}
In[26]:= (1 + a[L[i]] b[U[i]]) ^ 2
i 2
Out[26]= (1 + a b )
i
In[27]:= % [L[j]]
i i k6
Out[27]= 2 (a b + a b ) (1 + a b )
i ;j i ;j k6
\end{verbatim} }
\subsection{Div}
\label{Div-subsection}
{\tt Div[x]} represents the divergence of the tensor expression {\tt x}.
This is just the covariant derivative of {\tt x} contracted on its last two
indices. If {\tt x} is a $k$-tensor, {\tt Div[x]} is a $(k-1)$-tensor.
Ricci assumes that the last index of {\tt x} is associated with the
underlying tangent bundle of {\tt x}'s bundle.
For example, suppose {\tt a} is a 2-tensor:
\vbox{\begin{verbatim}
In[28]:= Div[a] [L[i]]
k8
Out[28]= a
i k8 ;
\end{verbatim}}
{\tt Div} is the formal adjoint of {\tt -Del}.
\subsection{Grad}
\label{Grad-subsection}
If {\tt x} is any tensor expression, {\tt Grad[x]} is the gradient of
{\tt x}. It is the same as {\tt Del[x]}, except that the last index is
converted to contravariant by means of the metric. If {\tt x} is a
scalar function (0-tensor), then {\tt Grad[x]} is a vector field.
\subsection{Laplacian}
\label{Laplacian-subsection}
{\tt Laplacian[x]} is the covariant Laplacian of the tensor expression {\tt
x}. There are two common conventions in use for the Laplacian, and both
are supported by Ricci. Which convention is in effect is controlled by the
value of the global variable {\tt \$LaplacianConvention}. When {\tt
\$LaplacianConvention = DivGrad} (the default), {\tt Laplacian[x]} is
automatically replaced by {\tt Div[Grad[x]]}. If {\tt
\$LaplacianConvention} is set to {\tt PositiveSpectrum}, then {\tt
Laplacian[x]} is replaced by {\tt -Div[Grad[x]]}.
\subsection{Extd}
\label{Extd-subsection}
{\tt Extd[x]} represents the exterior derivative of the differential form
{\tt x}. In output form, {\tt Extd[x]} appears as {\tt d[x]}.
Ricci automatically expands exterior derivatives of sums, scalar multiples,
powers, and wedge products.
{\bf WARNING:} It is tempting to type {\tt d[x]} in input form. Because
the symbol {\tt d} has not been defined as a Ricci function, Ricci simply
returns {\tt d[x]} unevaluated. You may not be able to tell immediately
from Ricci's output that it is not interpreting {\tt d[x]} as exterior
differentiation, unless you happen to notice that it has not expanded
derivatives of sums or products that appear in the argument to {\tt d}.
\subsection{ExtdStar}
\label{ExtdStar-subsection}
{\tt ExtdStar} is the formal adjoint of {\tt Extd} with respect to the
Hodge inner product. It is used in constructing the Laplace-Beltrami
operator, described in Section \ref{LaplaceBeltrami-subsection} below. If
{\tt x} is a differential $k$-form, {\tt ExtdStar[x]} is a $(k-1)$-form.
In output form, {\tt ExtdStar} appears as shown here:
\vbox{\begin{verbatim}
In[29]:= ExtdStar[alpha]
*
Out[29]= d [alpha]
\end{verbatim} }
\subsection{LaplaceBeltrami}
\label{LaplaceBeltrami-subsection}
{\tt LaplaceBeltrami[x]} is the Laplace-Beltrami operator $\Delta = dd^* + d^*d$
applied to {\tt x},
which is assumed to be a differential form. It is automatically replaced
by {\tt Extd[ExtdStar[x]] + ExtdStar[Extd[x]]}.
\subsection{Lie}
\label{Lie-subsection}
If {\tt v} is a vector field (i.e., a contravariant 1-tensor) and {\tt x}
is any tensor expression, {\tt Lie[v,x]} represents the Lie derivative of
{\tt x} with respect to {\tt v}. When {\tt v} and {\tt x} are both vector
fields, {\tt Lie[v,x]} is their Lie bracket, and Ricci puts {\tt v} and
{\tt x} in lexical order using the skew-symmetry of the Lie bracket.
Lie derivatives of differential forms are not automatically expanded in
terms of exterior derivatives and interior multiplication, because there
may be some situations in which you do not want this transformation to take
place. You can cause them to be expanded by applying the rule {\tt LieRule}:
\vbox{
\begin{verbatim}
In[13]:= Lie[v,beta]
Out[13]= Lie [beta]
v
In[14]:= % /. LieRule
Out[14]= d[Int [beta]] + Int [d[beta]]
v v
\end{verbatim} }
% *************************************************************************
% ********** TENSOR SIMPLIFICATION AND TRANSFORMATION COMMANDS **********
% *************************************************************************
\newpage
\section{Simplifying and Transforming Expressions}
\label{Simplification-section}
This chapter describes commands that can be used to simplify tensor
expressions, or to perform various transformations such as expanding
covariant derivatives in terms of ordinary directional derivatives or {\it
vice versa}.
The commands in this chapter that take only one argument can be
applied only to selected terms of an expression. For example, {\tt
TensorSimplify[x,n]} simplifies only term {\tt n}, leaving the rest of the
expression unchanged. {\tt TensorSimplify[x,\{n1,n2,n3,...\}]} simplifies
terms {\tt n1}, {\tt n2}, {\tt n3}, \ldots , combining terms if possible,
but leaving the rest of {\tt x} unchanged. The Reference List, Chapter
\ref{Reference-section}, describes which commands accept this syntax.
\subsection{TensorSimplify}
\label{TensorSimplify-subsection}
The most general simplification command provided by Ricci is {\tt
TensorSimplify}. {\tt TensorSimplify[x]} attempts to put an indexed tensor
expression {\tt x} into a canonical form. The rules applied by
TensorSimplify may not always result in the simplest-looking expression,
but two component expressions that are mathematically equal will usually be
identical after applying {\tt TensorSimplify}.
{\tt TensorSimplify} expands products and powers of tensors, uses metrics
to raise and lower indices, tries to rename all dummy indices in a
canonical order, and collects all terms containing the same tensor factors
but different constant factors. When there are two or more dummy index
pairs in a single term, {\tt TensorSimplify} tries exchanging names of
dummy indices in pairs, and chooses the lexically smallest expression that
results. This algorithm may not always recognize terms that are equal
after more complicated rearranging of dummy index names; an alternative
command, {\tt SuperSimplify}, works harder to get a canonical expression,
at the cost of much slower execution.
{\tt TensorSimplify} makes only those simplificatons that arise from the
routine changing of dummy index names and the application of symmetries and
algebraic rules that the user could easily check. More complicated
simplifications, such as those that arise from the Bianchi identities or
from commuting covariant derivatives, are done only when you request them.
The basic reason for this distinction is so that you will not be confronted
by a mystifyingly drastic and unxplainable simplification. To reorder
covariant derivatives, that is, the ones that come after ``;'', use {\tt
OrderCovD} or {\tt CovDSimplify}. To apply Bianchi identities, apply one
of the rules {\tt BianchiRules}, {\tt FirstBianchiRule}, {\tt
SecondBianchiRule}, or {\tt ContractedBianchiRules}.
{\tt TensorSimplify} calls {\tt CorrectAllVariances}, {\tt TensorExpand}, {\tt
AbsorbMetrics}, {\tt PowerSimplify}, {\tt RenameDummy}, {\tt OrderDummy},
and {\tt CollectConstants}. Any of these commands can be used individually
to provide more control over the simplification process.
\subsection{SuperSimplify}
\label{SuperSimplify-subsection}
{\tt SuperSimplify[x]} does the same job as {\tt TensorSimplify[x]}, but
works harder at renaming dummy index pairs to find the lexically smallest
version of the expression. If there are two or more dummy index pairs in
any term of {\tt x} that refer to the same bundle, {\tt SuperSimplify} tries
renaming the dummy indices in all possible permutations, and chooses the
lexically smallest result. If there are $k$ dummy index pairs per term, the
time taken by {\tt SuperSimplify} is proportional to $k!$, while the time
taken by {\tt TensorSimplify} is proportional to $k^2$. Thus
{\tt SuperSimplify} can be {\it very}\/ slow, especially when there are more
than about 4 dummy pairs. This command should be used sparingly, only when
you suspect that some terms are equal but {\tt TensorSimplify} has not made
them look the same.
\subsection{TensorExpand}
\label{TensorExpand-subsection}
{\tt TensorExpand[x]} expands products and positive integral powers in
{\tt x}, just as {\tt Expand} does, but maintains correct dummy index
conventions and does not expand constant factors.
{\tt TensorExpand} is
called automatically by {\tt TensorSimplify}.
\subsection{AbsorbMetrics}
\label{AbsorbMetrics-subsection}
{\tt AbsorbMetrics[x]} causes any metric components that appear contracted
with other tensors in {\tt x} to be used to raise or lower indices; the
metric components themselves are eliminated from the expression. For
example:
\vbox{ \begin{verbatim}
j k
Out[29]= a g
i j
In[29]:= AbsorbMetrics[%]
k
Out[30]= a
i
\end{verbatim} }
{\tt AbsorbMetrics} is called automatically by {\tt TensorSimplify}.
\subsection{RenameDummy}
\label{RenameDummy-subsection}
{\tt RenameDummy[x]} changes the names of dummy indices in {\tt x} to
standard names, choosing index names in alphabetical order from the list
associated with the appropriate bundle, and skipping those names that
already appear in {\tt x} as free indices. When the list of index names is
exhausted, computer-generated names of the form {\tt k}$n$ are used, where
{\tt k} is the last index name in the list and $n$ is an integer. {\tt
RenameDummy} does not try to make the ``best'' choice of index names for
the expression; use {\tt OrderDummy} to do that.
{\tt RenameDummy} is called automatically by {\tt TensorSimplify}.
\subsection{OrderDummy}
\label{OrderDummy-subsection}
{\tt OrderDummy[x]} attempts to put the dummy indices occurring in the
tensor expression {\tt x} in a ``canonical form''. All pairs of dummy
indices are ordered so that the lower member appears first whenever
possible. Then {\tt OrderDummy} tries various permutations of the dummy
index names in each term of {\tt x}, searching for the lexically smallest
version of the expression among all equivalent versions. {\tt OrderDummy}
has an option called {\tt Method}, which controls how hard it works to
find the best arrangement of dummy index names. See the Reference List,
Chapter \ref{Reference-section},
for details.
{\tt OrderDummy} is called automatically by {\tt TensorSimplify}.
\subsection{CollectConstants}
\label{CollectConstants-subsection}
{\tt CollectConstants[x]} groups together terms in the tensor expression
{\tt x} having the same tensor factors but different constant factors, and
performs some simplification on
the constant factors.
{\tt CollectConstants} is called automatically by {\tt TensorSimplify}.
\subsection{FactorConstants}
\label{FactorConstants-subsection}
{\tt FactorConstants[x]} applies the Mathematica function {\tt Factor} to
the constant factor in each term of {\tt x}.
\subsection{SimplifyConstants}
\label{SimplifyConstants-subsection}
{\tt SimplifyConstants[x]} applies the Mathematica function {\tt Simplify}
to the constant factor in each term of {\tt x}.
\subsection{BasisExpand}
\label{BasisExpand-subsection}
If {\tt x} is any tensor expression, {\tt BasisExpand[x]} expands all
tensors in {\tt x} into component expressions multiplied by the default
basis vectors and covectors. For example, suppose {\tt a} is a 2-tensor:
\vbox{\begin{verbatim}
In[34]:= BasisExpand[2 a]
k1 k2
Out[34]= 2 a Basis (X) Basis
k1 k2
\end{verbatim} }
Because of the limitations of the index notation, there is no provision for
expanding tensors automatically with respect to any basis other than the
default one; you can usually accomplish the same thing by using {\tt
DefineRule} to create transformation rules between the default basis and
other bases.
If {\tt x} is a scalar (rank 0) expression, {\tt BasisExpand[x]} causes
all index slots to be filled, thus converting {\tt x} to a component
expression.
\subsection{BasisGather}
\label{BasisGather-subsection}
Sometimes you may want to convert a component expression for a tensor back
to pure tensor form. {\tt BasisGather} allows you to do this. For example,
we can undo the effect of {\tt BasisExpand} in {\tt Out[34]} above:
\begin{verbatim}
In[35]:= BasisGather[%34,a]
Out[35]= 2 a
\end{verbatim}
The second argument to {\tt BasisGather} can in principle be any tensor
expression, although {\tt BasisGather} may not recognize the basis
expansion of complicated expressions. It works best if you apply
{\tt TensorExpand} (or {\tt TensorSimplify}) before applying
{\tt BasisGather}. You can gather several tensor expressions at once by
putting a list of expressions in the second argument.
\subsection{CovDExpand}
\label{CovDExpand-subsection}
{\tt CovDExpand[x]} expands all covariant derivatives in {\tt x} into
ordinary directional derivatives and connection components. Directional
derivatives of components of tensors are represented by expressions like
{\tt Del[ Basis[L[i]], a[L[j],L[k]] ]}. For example:
\vbox{ \begin{verbatim}
Out[35]= a
j k ;i
In[36]:= CovDExpand[%]
k3 k4
Out[36]= Del [a ] - a Conn - a Conn
i j k k3 k j i j k4 k i
\end{verbatim} }
Here {\tt Conn} represents the coefficients of the default connection with
respect to the default basis. See Section \ref{Connections-subsection},
``Connections, torsion, and curvature'', for more information.
\subsection{ProductExpand}
\label{ProductExpand-subsection}
{\tt ProductExpand[x]} expands symmetric
products and wedge products of 1-tensors that occur in {\tt x}, and rewrites
them in terms of tensor products. For example, assuming {\tt
\$WedgeConvention = Alt}, you would get the following result:
\vbox{\begin{verbatim}
i j
Out[5]= Basis ^ Basis
In[6]:= %//ProductExpand
1 i j 1 j i
Out[6]= - Basis (X) Basis - - Basis (X) Basis
2 2
\end{verbatim}}
You can reverse the effect of {\tt ProductExpand} by applying {\tt Alt} to
an alternating tensor expression, or {\tt Sym} to a symmetric expression;
these operators replace tensor products by wedge or symmetric
products.
\subsection{PowerSimplify}
\label{PowerSimplify-subsection}
{\tt PowerSimplify[x]} performs various simplifications on powers that appear
in {\tt x}, such as transforming \verb#a^p b^p# to \verb#(a b)^p#, and
\verb#(a^b)^c# to \verb#a^(b c)# when possible, and expanding and
collecting constants in expressions that appear as base or exponent of a
power.
{\tt PowerSimplify} is called automatically by {\tt TensorSimplify}.
\subsection{CorrectAllVariances}
\label{CorrectAllVariances-subsection}
{\tt CorrectAllVariances[x]} changes the variances (upper to lower or lower to
upper) of all indices occurring in {\tt x} whose variances are not correct for
their positions, by inserting appropriate metric coefficients. For
example, suppose {\tt v} is a vector field (i.e., a contravariant
1-tensor):
\vbox{\begin{verbatim}
j
Out[41]= v
i ; k
In[42]:= CorrectAllVariances[%]
j k4 k3
Out[42]= g g v
i k3 ;k4 k
\end{verbatim}}
\subsection{NewDummy}
\label{NewDummy-subsection}
{\tt NewDummy[x]} replaces all dummy index pairs in {\tt x} with
computer-generated dummy index names of the form {\tt k}$n$, where
{\tt k} is the last name in the list of indices associated with the
appropriate bundle, and $n$ is a unique integer. This is sometimes useful
when you want to insert an index with the same name as a dummy name that
appears in {\tt x}. For example, suppose {\tt a} is a 2-tensor. After
applying {\tt TensorSimplify}, the output from {\tt BasisExpand[a]} becomes:
\vbox{ \begin{verbatim}
i j
Out[31]= a Basis (X) Basis
i j
\end{verbatim} }
If you want the $(i,k)$-component of this expression, you cannot just type
{\tt \%[L[i],L[k]]}, because {\tt i} would then appear twice as a lower
index---once in the output expression {\tt Out[31]}, and once in the
inserted index. The correct procedure is to use {\tt NewDummy}:
\vbox{\begin{verbatim}
In[32]:= NewDummy[%] [L[i],L[k]]
Out[33]= a
i k
\end{verbatim} }
\subsection{CommuteCovD}
\label{CommuteCovD-subsection}
{\tt CommuteCovD[ x, L[i], L[j] ]} changes all adjacent occurrences in the
tensor expression {\tt x} of indices
{\tt L[i],L[j]} (in the given order) after the ``;'' to
{\tt L[j],L[i]} by adding appropriate curvature and torsion terms.
For example, suppose {\tt a} is a 2-tensor on a Riemannian tangent bundle
(assuming {\tt \$RiemannConvention = SecondUp}):
\vbox{ \begin{verbatim}
Out[35]= a
i j ;k l
In[36]:= CommuteCovD[ %, L[k], L[l] ]
l1 l2
Out[36]= a + a Rm + a Rm
i j ;l k l1 j i k l i l2 j k l
\end{verbatim} }
\subsection{OrderCovD}
\label{OrderCovD-subsection}
{\tt OrderCovD[x]} puts all derivative indices (those appearing after ``;'')
in the tensor expression {\tt x} into lexical order, by adding appropriate
curvature and torsion terms. {\tt OrderCovD} is used by
{\tt CovDSimplify}.
\subsection{CovDSimplify}
\label{CovDSimplify-subsection}
{\tt CovDSimplify[x]} attempts to simplify {\tt x} as much as possible,
putting all dummy indices in lexical order, including those that result
from differentiation. {\tt CovDSimplify} calls {\tt TensorSimplify}, then
{\tt OrderCovD}, then {\tt TensorSimplify} again. For very complicated
expressions, it is probably more efficient to use the other simplification
commands individually.
\subsection{LowerAllIndices}
\label{LowerAllIndices-subsection}
{\tt LowerAllIndices[x]} converts all upper indices in {\tt x} (except
those appearing on {\tt Basis} covectors or metrics) to lower indices by
inserting metrics as needed.
\subsection{TensorCancel}
\label{TensorCancel-subsection}
{\tt TensorCancel[x]} attempts to simplify products and quotients of tensor
expressions by combining and canceling factors that are equal even though
they have different dummy index names. For example:
\vbox{ \begin{verbatim}
i 3 j -1
Out[37]= (1 + u u ) (1 + u u )
;i ; ;j ;
In[38]:= TensorCancel[%]
i 2
Out[38]= (1 + u u )
;i ;
\end{verbatim} }
% ********************************************************
% ********** DEFINING RELATIONS BETWEEN TENSORS ********
% ********************************************************
\newpage
\section{Defining Relations Between Tensors}
\label{Defining-section}
Because the internal and external forms of tensors differ, you should never
use the name of a tensor on the left-hand side of an assignment or rule,
such as {\tt a=b}, {\tt a:=b}, {\tt a->b}, or {\tt a:>b}. Ricci provides
two commands, {\tt DefineRelation} and {\tt DefineRule}, to create such
assignments and rules. This is a common source of error. To emphasize:
\begin{center}
\framebox{ \parbox{4.5in}{
{\sc Never use the name of a tensor on the left-hand side of an
assignment or rule; use} {\tt DefineRelation} {\sc or} {\tt DefineRule}
{\sc instead.}}}
\end{center}
\subsection{DefineRelation}
\label{DefineRelation-subsection}
If you want to cause one tensor always to be replaced by some other tensor
expression, or to be replaced only when certain indices are inserted, you
can use {\tt DefineRelation}. The basic syntax is shown by the following
example:
\vbox{\begin{verbatim}
In[39]:= DefineRelation[ a, 2 b ]
Relation defined.
In[40]:= a[L[i],L[j]]
Out[40]= 2 b
i j
\end{verbatim} }
This use of {\tt DefineRelation} specifies that every occurrence of the
tensor {\tt a} should be replaced by {\tt 2 b}. The replacement specified
in such a call to {\tt DefineRelation} is made whether or not indices are
inserted into {\tt a}.
The first argument to {\tt DefineRelation} must be a single tensor, with or
without indices; it cannot be a more complicated expression. (The
principal reason is that Mathematica requires every relation to be
associated with a specific symbol, and Ricci's philosophy is to associate your
definitions only with your own symbols, so that they can all be saved by
Ricci. If you tried to define a relation involving a complicated tensor
expression, it would have to be associated with a Ricci or system function.)
You can use {\tt DefineRule}, described below, to define transformation
rules whose left-hand sides are arbitrary tensor expressions.
You can cancel any relation created by {\tt DefineRelation} by calling
{\tt UndefineRelation}. The single argument to {\tt UndefineRelation}
must be exactly the same as the first argument in the corresponding call
to {\tt DefineRelation}. For example:
\begin{verbatim}
In[41]:= UndefineRelation[a]
Relation undefined.
\end{verbatim}
You can also use {\tt DefineRelation} to replace a tensor only when it
appears with certain indices. For example, suppose {\tt e} is a 3-tensor:
\begin{verbatim}
In[42]:= DefineRelation[ e[L[i],U[i],L[j]], v[L[j]] ]
Relation defined.
\end{verbatim}
This tells Ricci that the indexed version of {\tt e} is to be replaced by
{\tt v} when the first two indices of {\tt e} are contracted with each
other. (Note that you do {\it not} use underscores in the dummy index
names for {\tt DefineRelation}, as you would in defining a relation
directly with Mathematica.) The replacement takes place regardless of the
actual names of the indices or whether they are upper or lower, provided
the corresponding indices refer to the same bundles as {\tt i} and {\tt j}.
For example:
\vbox{\begin{verbatim}
In[43]:= e[U[j],L[j],L[k]]
Out[43]= v
k
\end{verbatim} }
In general, the relation created by {\tt DefineRelation} recognizes any
equivalent relations resulting from raising and lowering indices, changing
index names, conjugation, and inserting extra indices, provided that all
indices refer to the same bundles as the corresponding indices that were
used in the call to {\tt DefineRelation}. It does not recognize relations
resulting from symmetries, however---you must define all such equivalent
relations explicitly.
You can specify that the relation should be applied only under certain
conditions by giving {\tt DefineRelation} a third argument, which is a
True/False condition that must be satisfied before the relation is applied.
The condition may refer to the index names used in the first argument. For
example, suppose {\tt u} is a scalar function on a Riemannian tangent
bundle, and you would like the first and second covariant derivatives of
{\tt u} always to be placed in lexical order (this is not done
automatically by Ricci). You could define the following conditional
relation:
\vbox{ \begin{verbatim}
In[44]:= DefineRelation[u[L[i],L[j]], u[L[j],L[i]],
!IndexOrderedQ[{L[i],L[j]}]]
Relation defined.
In[45]:= u[L[j],L[i]]
Out[45]= u
;i j
\end{verbatim} }
\subsection{DefineRule}
\label{DefineRule-subsection}
Sometimes you may want to define a transformation rule that is not applied
automatically, but only when you request it. Such transformations are done
in Mathematica via rules. The Ricci function {\tt DefineRule} allows you
to define rules whose left-hand sides involve tensors.
For example, here's how to define rules that replace the tensor {\tt a}
by {\tt 2 b} and {\it vice versa}\/:
\vbox{\begin{verbatim}
In[52]:= DefineRule[ atob, a, 2 b]
Rule defined.
In[53]:= DefineRule[ btoa, b, a/2]
Rule defined.
In[54]:= a[L[i],L[j]]
Out[54]= a
i j
In[55]:= % /. atob
Out[55]= 2 b
i j
\end{verbatim}}\vbox{\begin{verbatim}
In[56]:= % /. btoa
Out[56]= a
i j
\end{verbatim} }
{\tt DefineRule} has another advantage over {\tt DefineRelation}: the
left-hand side of the transformation rule defined by {\tt DefineRule} can
be any tensor expression, not just a single tensor with or without indices.
Thus, suppose you want to convert the inner product of {\tt a} and
{\tt b} to 0 wherever it occurs. You could define the following rules:
\begin{verbatim}
In[57]:= DefineRule[ ortho, Inner[a,b], 0]
Rule defined.
In[58]:= DefineRule[ ortho, a[L[i],L[j]] b[U[i],U[j]], 0]
Rule defined.
\end{verbatim}
The symbol {\tt ortho} is now a list containing these two transformation rules.
The first rule transforms the pure-tensor expression for {\tt } to 0,
while the second rule takes care of the component expression. Here's how
it works:
\vbox{\begin{verbatim}
In[60]:= a[L[j],L[k]] b[U[j],U[k]]
j k
Out[60]= a b
j k
In[61]:= % /. ortho
Out[61]= 0
\end{verbatim} }
Each time you call {\tt DefineRule}, the new transformation rule you give is
appended to a list containing ones already defined under the same name. To
start over from scratch, you can include the option {\tt NewRule -> True}
(or just execute the assignment {\tt ortho=.}).
The rule created by {\tt DefineRule} recognizes any equivalent
substitutions resulting from raising and lowering indices and changing index
names. In addition, if the second argument is a single tensor name with or
without indices, it recognizes equivalent substitutions resulting from
conjugation and inserting extra indices.
% ****************************************
% ********** SPECIAL FEATURES **********
% ****************************************
\newpage
\section{Special Features}
\label{Special-section}
\subsection{One-dimensional bundles}
\label{One-subsection}
One-dimensional bundles receive special treatment in Ricci. Since there is
only one basis element, Ricci uses only one index name for all indices
referring to the bundle. This is the only case in which an index can
legitimately appear more than once as a lower or upper index in the same
term.
When you define a one-dimensional bundle, you may only give one index name.
When Ricci generates dummy indices for the bundle, it uses only this index
name instead of generating unique names.
If you define a one-dimensional bundle with the option
{\tt OrthonormalFrame -> True}, the metric coefficient with respect to the
default basis is always equal to 1. {\tt TensorSimplify} then puts
all indices associated with this bundle at their natural altitude, as
specified in the corresponding call to {\tt DefineTensor}.
\subsection{Riemannian metrics}
\label{Riemannian-subsection}
You specify that a bundle is a tangent bundle with a Riemannian metric by
including the option {\tt MetricType -> Riemannian} in your call to
{\tt DefineBundle}. This automatically causes the torsion of the default
connection to be set to 0, and defines the Riemannian, Ricci, and scalar
curvature tensors. By default, these are named {\tt Rm}, {\tt Rc}, and
{\tt Sc}; you may give them any names you wish by including the
{\tt DefineBundle} options {\tt RiemannTensor -> name},
{\tt RicciTensor -> name}, and {\tt ScalarCurv -> name}.
If you define more than one Riemannian tangent bundle, you must give
different names to the curvatures on different bundles.
On a Riemannian tangent bundle, curvature components are automatically
converted to components of the Riemannian curvature tensor, and
contractions of the curvature tensor are automatically converted to the
Ricci or scalar curvature as appropriate. The first and second Bianchi
identities, however, are not automatically applied; you can specifically
apply them using the Ricci rules {\tt FirstBianchiRule}, {\tt
SecondBianchiRule}, {\tt ContractedBianchiRules}, and {\tt BianchiRules},
described in the Reference List, Chapter \ref{Reference-section}.
There are two common sign conventions in use for indices of the Riemannian
curvature tensor. Ricci supports both; you can control which one is used
for any particular Riemannian tangent bundle either by setting the global
variable {\tt \$RiemannConvention} or by including the {\tt
RiemannConvention} option in the call to {\tt DefineBundle}. See {\tt
DefineBundle} in the Reference List, Chapter
\ref{Reference-section}, for details.
You may convert components of the Riemannian, Ricci, and scalar curvature
tensors of a Riemannian tangent bundle to connection components
(Christoffel symbols) and their derivatives by applying the Ricci rule {\tt
CurvToConnRule}. Connection components, in turn, can be converted to
expressions involving directional derivatives of the metric components by
applying {\tt ConnToMetricRule}. (Note, however, that the latter rule
applies only to bundles that have been given the option {\tt
CommutingFrame -> True}, since this is the only case in which the
connection components can be expressed purely in terms of derivatives of
the metric.)
\subsection{Matrices and 2-tensors}
\label{Matrices-subsection}
Because every bundle has a default metric, any 2-tensor on a given bundle
can be interpreted as a linear endomorphism of the bundle. Ricci supports
various matrix computations with such tensors.
The basic operation is matrix multiplication, which is indicated by
{\tt Dot}. For example, if {\tt a} and {\tt b} are 2-tensors, then
{\tt a.b} or {\tt Dot[a,b]} represents their matrix product. If {\tt v}
is a 1-tensor, {\tt a.v} represents the matrix {\tt a} acting on the vector
{\tt v}. Because the metric is used automatically to raise and lower
indices, no distinction is made between row and column vectors, or between
covariant and contravariant tensors, for this purpose.
The identity matrix on any bundle can be represented by the tensor
{\tt Kronecker}, whose components are the Kronecker delta symbols. Ricci
automatically recognizes some basic relations involving multiplication by
{\tt Kronecker}, such as {\tt a.Kronecker = Kronecker.a = a}.
The inverse of any 2-tensor expression {\tt a} is represented by
{\tt Inverse[a]}. When you insert indices into an inverse tensor, Ricci
in effect creates a new tensor whose name is {\tt Inverse[a]}. For example:
\vbox{\begin{verbatim}
In[66]:= Inverse[a]
-1
Out[66]= a
In[67]:= % [U[i],U[j]]
-1 i j
Out[67]= (a )
\end{verbatim} }
Ricci recognizes that multiplication by the inverse of a tensor yields the
identity tensor, whether as components or as pure tensors:
\vbox{\begin{verbatim}
In[68]:= a . b . Inverse[b]
Out[68]= a
In[69]:= a[L[i],L[j]] Inverse[a] [U[j],U[k]]
k
Out[69]= Kronecker
i
\end{verbatim} }
You can express the trace of a 2-tensor (with respect to the default
metric) by {\tt Tr[a]}, its transpose by {\tt Transpose[a]}, and its
determinant by {\tt Det[a]}. When you insert indices into {\tt Tr[a]} or
{\tt Transpose[a]}, Ricci computes the components explicitly in terms of
the components of {\tt a}. For {\tt Det}, however, there is no
straighforward way to express the determinant of a matrix using the index
conventions, so {\tt Det[a]} is maintained unevaluated. Ricci's
differentiation commands compute derivatives of {\tt Det[a]} in terms of
derivatives of components of {\tt a} and {\tt Inverse[a]}.
\subsection{Product tensors}
\label{Product-subsection}
It often happens that a tensor is associated with the tensor product of two
or more bundles. In Ricci, such a tensor is called a {\it product tensor}.
A product tensor is defined by giving a list of positive integers as the
rank of the tensor in the {\tt DefineTensor} command. The rank of the
tensor is the sum of all the numbers in the list; each number in the list
corresponds to a group of indices, which can have its own symmetries and
can be associated to a separate bundle or direct sum of bundles. Indices
can be inserted into a product tensor ``one group at a time'': for example,
if {\tt t} is a product tensor whose rank is specified as \{2,3\}, you can
insert either two or five indices. Once the first two indices are
inserted, the resulting expression is considered to be a 3-tensor, with the
symmetries and bundles associated with the second group of indices.
The {\tt Bundle} and {\tt Symmetries} options of {\tt DefineTensor} have
special interpretations for product tensors.
\begin{itemize}
\item {\tt Bundle -> \{bundle1,bundle2,...\}}: the list of bundles must be the
same length as the list of ranks. Each bundle in the list is associated
with the corresponding set of index slots. Other forms are
{\tt Bundle -> bundle}, which means that all indices are associated with
the same bundle, and {\tt Bundle -> \{\{b1,b2\},\{b3,b4\},...\}}, which means
that each set of index slots is associated with a direct sum of bundles.
\item {\tt Symmetries -> \{sym1,sym2,...\}}: again, the list of symmetries
must be the same length as the list of ranks. Each symmetry applies to the
corresponding set of index slots. The only other acceptable form for
product tensors is {\tt Symmetries -> NoSymmetries}, which is the default.
\end{itemize}
One common use of product tensors is in defining arbitrary connections and
their curvatures. In fact, the built-in tensors {\tt Conn} and {\tt Curv}
are defined as product tensors.
For example, the following command defines a rank-4 tensor whose first two
index slots refer to the sum of {\tt fiber} and its conjugate, and whose
last two refer to {\tt tangent}. It is skew-symmetric in the last two indices,
with no symmetries in the first two. It is contravariant in the second index
and covariant in the other three.
\vbox{ \begin{verbatim}
In[62]:= DefineTensor[
omega, {2,2},
Bundle -> { {fiber,Conjugate[fiber]}, tangent },
Symmetries -> {NoSymmetries,Skew},
Variance -> {Co,Con,Co,Co} ]
\end{verbatim} }
When you insert indices into this tensor, you may either insert the first
two indices only, or insert all four at once. (There is no provision for
inserting only the last two indices.)
When the first two indices
are inserted, the result is a skew-symmetric covariant 2-tensor associated
with the {\tt tangent} bundle. For example, assuming index names {\tt a},
{\tt b}, {\tt c} are associated with {\tt fiber}:
\vbox{\begin{verbatim}
In[5]:= omega[L[a],U[b]]
b
Out[5]= omega
a
In[6]:= %//BasisExpand
b k6 k7
Out[6]= omega Basis ^ Basis
a k6 k7
\end{verbatim} }
Another way to use a product tensor is to represent a section of $\mathop{Hom}
(a,b)$, where $a$ and $b$ are vector bundles. Suppose you define a tensor {\tt
hom} as follows:
\vbox{\begin{verbatim}
In[35]:= DefineTensor[hom, {1,1}, Bundle -> {b,a},
Variance -> {Con,Co}]
\end{verbatim} }
Then {\tt hom} is a section of $b\otimes a^*$, or equivalently a
homomorphism from $a$ to $b$.
\subsection{Connections, torsion, and curvature}
\label{Connections-subsection}
Ricci assumes that every bundle comes with a default connection that is
compatible with its metric. (This assumption is forced by the limitations
of the index convention, since the notation for components of covariant
derivatives gives no indication what connection is being used.)
The name for the default connection on any bundle is {\tt Conn}. {\tt Conn}
is a product tensor of rank \{2,1\}, whose first two indices can come from any
bundle, and whose third index is associated with the underlying tangent
bundle of the first two. When you insert the first two indices, you get an
entry of the matrix of connection 1-forms corresponding to the default
basis, defined by the relation:
$$
\nabla {\it Basis}_i = {\it Basis}_j \otimes {\it Conn}_i{}^j.
$$
When you insert the third index, you get the connection
coefficients (Christoffel symbols) for the default connection with respect
to the default basis. These are defined by:
$$
\nabla_{\textstyle{\it Basis}_k} {\it Basis_i} =
{\it Conn}_i{}^j{}_k {\it Basis}_j.
$$
For example, suppose that indices {\tt a}, {\tt b}, {\tt c} refer to the
bundle {\tt fiber}, and {\tt i}, {\tt j}, {\tt k} refer to the
underlying tangent bundle. The connection 1-forms of {\tt fiber}
would be expressed as:
\vbox{ \begin{verbatim}
b
Out[15]= Conn
a
In[16]:= BasisExpand[%]
b k8
Out[16]= Conn Basis
a k8
\end{verbatim} }
Because the default metric on any bundle is assumed to be compatible with
its metric, the coefficients of the metric satisfy the compatibility
equation
$$
d(g_{ij}) = {\it Conn}_{ij} + {\it Conn}_{ji},
$$
where the second index of ${\it Conn}$ has been lowered by the metric.
This relation is not applied automatically by Ricci, but you can force
Ricci to replace derivatives of the metric by connection forms by applying
the rule {\tt CompatibilityRule}.
A connection on the tangent bundle of a manifold may or may not have
torsion. Ricci assumes that connections are torsion-free, unless you
specify that a particular connection may have non-vanishing torsion by
adding the option {\tt TorsionFree -> False} to the {\tt DefineBundle}
command when the bundle is created. The name of the torsion tensor on any
bundle is {\tt Tor}. It is a product tensor of rank \{1,2\}, whose first
index can be associated with any (subbundle of a) tangent bundle, and whose
last two are associated with the full underlying tangent bundle (or
bundles, if the tangent bundle is a direct sum). It is skew-symmetric in
its last two indices. The torsion is defined by
$$
\nabla_j {\it Basis}_k - \nabla_k {\it Basis}_j-
[{\it Basis}_j,{\it Basis}_k] = {\it Tor}^i{}_{jk}
{\it Basis}_i.
$$
When the first index is inserted, {\tt Tor[U[i]]} represents the torsion
2-form associated with the basis 1-form {\tt Basis[U[i]]}.
The first structure equation relates the exterior derivatives of basis
covectors on the tangent bundle to the connection and torsion forms. Ricci
does not perform this transformation automatically, but you can cause it to
be performed by applying {\tt FirstStructureRule}:
\vbox{ \begin{verbatim}
i
Out[36]= d[Basis ]
In[37]:= % /. FirstStructureRule
1 i k6 i
Out[37]= - Tor + Basis ^ Conn
2 k6
\end{verbatim} }
The $1/2$ appears because, by Ricci's default wedge product convention and
index conventions, the basis expansion of {\tt Tor[U[i]]} has to be
\vbox{ \begin{verbatim}
i j k i j k
Tor Basis (X) Basis = Tor Basis ^ Basis
j k j k
\end{verbatim} }
without the factor of $1/2$ that appears in the standard notation
used in many differential geometry texts. The $1/2$ does not
appear in the output from {\tt FirstStructureRule} when
{\tt \$WedgeConvention = Det}, because in that case,
\vbox{ \begin{verbatim}
i j k 1 i j k
Tor Basis (X) Basis = - Tor Basis ^ Basis
j k 2 j k
\end{verbatim} }
The curvature associated with the default connection is called {\tt Curv}.
This is a product tensor of rank \{2,2\}, which is skew-symmetric in both
pairs of indices (because the default connection is always assumed to be
compatible with the metric). The first two indices of {\tt Curv} can refer
to any bundle, and the last two refer to its underlying tangent bundle.
When you insert the first two indices, you get the matrix of curvature
2-forms associated with the standard basis. When all four indices are
inserted, you get the components of the curvature tensor, defined by
$$
\nabla_i \nabla_j {\it Basis_k} -
\nabla_j \nabla_i {\it Basis_k} -
\nabla_{\textstyle[{\it Basis}_i,{\it Basis}_j]} {\it Basis}_k =
{\it Curv}_k{}^l{}_{ij}{\it Basis}_l.
$$
The second structure equation relates the exterior derivatives of the
connection forms to curvature forms. Like the first structure equation, it
is applied only when you specifically request it by applying
{\tt SecondStructureRule}:
\vbox{ \begin{verbatim}
j k j
Out[15]= d[Conn ] - Conn ^ Conn
i i k
In[16]:= % /. SecondStructureRule //TensorSimplify
1 j
Out[16]= - Curv
2 i
\end{verbatim} }
As described above for {\tt Tor}, the factor $1/2$ appears when
{\tt \$WedgeConvention = Alt}, but not when {\tt \$WedgeConvention = Det}.
You can cause components of the curvature tensor {\tt Curv} to be expanded
in terms of components of {\tt Conn} and their directional derivatives by
applying the Ricci rule {\tt CurvToConnRule}.
You can apply all three structure equations ({\tt CompatibilityRule}, {\tt
FirstStructureRule}, and {\tt SecondStructureRule}) at once by using the
rule {\tt StructureRules}.
If an expression involving derivatives of connection forms is converted to
a component expression, the derivatives of the connection coefficients are
maintained in a form such as
\vbox{\begin{verbatim}
j
Del [Conn ]
k i
\end{verbatim}}
since ``covariant derivatives'' of connection coefficients make no
invariant sense. This is the only instance in which Ricci does not by
default express components of derivatives in terms of covariant
derivatives.
\subsection{Non-default connections and metrics}
\label{Non-default-subsection}
You may want to compute covariant derivatives with respect to a connection
or a metric other than the default one on a given bundle. Many of Ricci's
differentiation commands accept the {\tt Connection} option to indicate
that covariant derivatives are to be taken with respect to a non-default
connection. Ordinarily, the value of the {\tt Connection} option should be
an expression of the form {\tt Conn + diff}, where {\tt diff} is a 3-tensor
expression that represents the ``difference tensor'' between the given
connection and the default connection. For example, suppose {\tt diff} is
a 3-tensor:
\vbox{\begin{verbatim}
In[23]:= Del[a, Connection -> Conn + diff]
(Conn + diff)
Out[23]= Del [a]
In[24]:= %[L[i],L[j],L[k]]
k36 k37
Out[24]= a - a diff - a diff
i j ;k k36 j i k i k37 j k
\end{verbatim} }
Notice that the components are expanded in terms of covariant derivatives
of {\tt a} (with respect to the default connection) and components of {\tt diff}.
You can also call {\tt CovD} with the
{\tt Connection} option. For example, the following input expression results
in the same output as {\tt Out[24]} above:
\begin{verbatim}
In[25]:= CovD[ a[L[i],L[j]], {L[k]}, Connection -> Conn + diff]
\end{verbatim}
Other operators that accept the {\tt Connection} option are {\tt Div},
{\tt Grad}, and {\tt Laplacian}.
On a Riemannian tangent bundle, you can also specify that operations are to
be computed with respect to a metric other than the default one. This is
done by adding the {\tt Metric} option to the appropriate Ricci function.
For example, suppose {\tt h} is a symmetric 2-tensor. To compute the
covariant derivative of the tensor {\tt a} with respect to the metric
{\tt h}, you could use
\vbox{ \begin{verbatim}
In[60]:= Del[ a , Metric -> h]
(h)
Out[60]= Del [a]
\end{verbatim} }
When you insert indices, the components of this expression are computed in
terms of covariant derivatives of {\tt a} and {\tt h} (with respect to the
default metric). Other differentiation operators that accept the {\tt
Metric} option are {\tt Grad}, {\tt Div}, {\tt ExtdStar}, {\tt Laplacian},
{\tt LaplaceBeltrami}, and {\tt CovD}.
Ricci can explicitly compute the Riemannian, Ricci, and scalar curvatures
of a non-default metric {\tt h}. These are indicated by the expressions
{\tt RiemannTensor[h]}, {\tt RicciTensor[h]}, and {\tt ScalarCurv[h]},
respectively. When you insert indices into these, you get expressions for
the curvatures in terms of the curvatures of the default metric and
covariant derivatives of {\tt h}. You can also refer to the Levi-Civita
connection of a non-default metric by {\tt LeviCivitaConnection[h]}; this
produces a 3-tensor that is suitable as an input to the {\tt Connection}
option of the differentiation functions as described above.
% *******************************************************************
% ********** REFERENCE LIST OF RICCI FUNCTIONS, OPTIONS, **********
% ********** AND OBJECTS **********
% *******************************************************************
\newpage
\section{Reference List}
\label{Reference-section}
\subsection{Ricci commands and functions}
\label{Command-section}
The list below describes all Ricci functions that are accessible to users.
All the essential information about each function is collected here in
brief form, including a list of all available options. The numbers at the
right-hand sides of the function descriptions refer to section numbers in
the main text where these functions are described. (Some less often used
functions are documented only here in the Reference List.)
For more information and examples on how to use the most common commands,
see the main text. For descriptions of Ricci's global variables (symbols
starting with \verb#$#), see the end of this chapter.
\begin{list}{}{}
\item[\tt AbsorbMetrics] \hop{\ref{AbsorbMetrics-subsection}}
{\tt AbsorbMetrics[x]} simplifies x by eliminating any metrics that are
contracted with other tensors, and using them instead to raise or lower
indices. {\tt AbsorbMetrics[x,n]} or {\tt AbsorbMetrics[x,\{n1,n2,...\}]}
applies {\tt AbsorbMetrics} only to term {\tt n} or to terms {\tt
n1,n2,...} of {\tt x}.
{\samepage
Option:\nopagebreak
\begin{itemize}
\item {\tt Mode -> All} or {\tt NoOneDims}. {\tt NoOneDims} indicates that
metrics associated with one-dimensional bundles should not be absorbed,
unless they are paired with other metrics. This option exists mainly for
internal use by {\tt TensorSimplify}, so that it can control the order in
which different metrics are absorbed. Default is {\tt All}.
\end{itemize}
}
See also {\tt TensorSimplify}, {\tt LowerAllIndices}, {\tt
CorrectAllVariances}.
\item[\tt Alt\hfill ] \hop{\ref{Alt-subsection}}
{\tt Alt[x]} is the alternating part of the tensor expression {\tt x}. If
{\tt x} is alternating, then {\tt Alt[x] = x}.
{\tt Alt} is also a value for the global variable {\tt \$WedgeConvention}.
See also {\tt Sym}, {\tt Wedge}, {\tt \$WedgeConvention}.
\item[\tt Alternating] \hop{\ref{Tensors-subsection}}
{\tt Alternating} is a value for the {\tt Symmetries} option of
{\tt DefineTensor}.
\item[\tt Any\hfill ] \hop{\ref{Bundles-subsection}}
{\tt Any} can be used as a value for the {\tt Bundle} option of the
{\tt DefineTensor} command. {\tt Bundle -> Any} means that indices from
any bundle can be inserted.
\item[\tt Bar\hfill ]
\hop{\ref{Indices-subsection}, \ref{Tensors-subsection}}
{\tt Bar} is an internal symbol used by Ricci for representing conjugates
of tensors and indices. The internal form for a barred index is {\tt
L[i[Bar]]} or {\tt U[i[Bar]]}. In input form, these can be abbreviated
{\tt LB[i]} and {\tt UB[i]}. The internal form for the conjugate of a
tensor is {\tt Tensor[name[Bar],\{...\},\{...\}]}. In input form, this is
typed {\tt Conjugate[name]~[...]~[...]}. See also {\tt Tensor}, {\tt
Conjugate}, {\tt L}, {\tt U}, {\tt LB}, {\tt UB}.
\item[\tt Basis]
\hop{\ref{Tensors-subsection}, \ref{BasisExpand-subsection}}
{\tt Basis} is the name used for generic basis vectors and covectors for
any bundle. Basis vectors are generated automatically by {\tt
BasisExpand}. For example, if index name {\tt i} is associated with
bundle {\tt b}, then {\tt Basis[L[i]]} and {\tt Basis[U[i]]} represent
contravariant and covariant basis elements for {\tt b} (i.e., basis
elements for {\tt b} and its dual), respectively; {\tt Basis[LB[i]]} and
{\tt Basis[UB[i]]} represent basis elements for the conjugate bundle {\tt
Conjugate[b]} and its dual.
{\tt Basis} is defined by Ricci as a product tensor of rank \{1,1\}, with the
special option {\tt Bundle -> Same}: this means that the first index can
be associated with any bundle, but when a second index is inserted, it
must be associated with the same bundle as the first, or else the result
is 0. If you insert an index into {\tt Basis[L[i]]} or {\tt
Basis[U[i]]}, you get Kronecker delta coefficients, metric coefficients
(which result from lowering or raising an index on the Kronecker delta),
or 0 as appropriate. See also {\tt BasisExpand}, {\tt BasisName}, {\tt
CoBasisName}, {\tt Kronecker}.
\item[\tt BasisExpand]
\hop{\ref{Tensors-subsection}, \ref{BasisExpand-subsection}}
{\tt BasisExpand[x]} expands all tensors appearing in {\tt x} into
component expressions multiplied by basis vectors and covectors, {\tt
Basis[L[i]]} and {\tt Basis[U[j]]}. {\tt BasisExpand[x,n]} or {\tt
BasisExpand[x,\{n1,n2,...\}]} applies {\tt BasisExpand} only to term {\tt
n} or to terms {\tt n1,n2,...} of {\tt x}. {\tt BasisExpand} also inserts
indices into all unfilled index slots, so it can be used to turn a scalar
tensor expression into a component expression. See also {\tt Basis}, {\tt
BasisGather}, {\tt CovDExpand}, {\tt ProductExpand}.
\item[\tt BasisGather] \hop{\ref{BasisExpand-subsection}}
{\tt BasisGather[x,y]} attempts to recognize the basis expression for {\tt
y} in {\tt x}, and replaces it by {\tt y}. {\tt BasisGather[~x,
\{y1,y2,...\}~]} does the same thing for several expressions at once. In
effect, {\tt BasisGather} is a partial inverse for {\tt BasisExpand}. See
also {\tt BasisExpand}.
\item[\tt BasisName] \hop{\ref{Tensors-subsection}}
{\tt BasisName -> name} is an option for {\tt DefineBundle}. It specifies
the name to be used in input and output form for the basis vectors for the
bundle being defined.
\item[\tt BianchiRules] \hop{\ref{Riemannian-subsection}}
{\tt BianchiRules[L[i],L[j],L[k]]}~is a rule that converts Riemannian
curvature tensors containing the indices {\tt L[i]}, {\tt L[j]}, {\tt L[k]}
in order to two-term sums, using the first and second Bianchi identities.
The three indices may be upper indices, lower indices, or a combination.
The first Bianchi rule is applied to any tensor with with {\tt Symmetries
-> RiemannSymmetries}; the second is applied only to tensors that have been
defined as Riemannian curvature tensors by {\tt DefineBundle}.
{\sc examples:}
\vbox{ \begin{verbatim}
i
Out[16]= Rm
j k l
In[17]:= % /. BianchiRules[L[j],L[k],L[l]]
i i
Out[17]= Rm - Rm
k j l l j k
\end{verbatim}}\vbox{ \begin{verbatim}
m
Out[20]= Rm
i j k l ;
In[21]:= %/.BianchiRules[L[k],L[l],U[m]]
m m
Out[21]= Rm - Rm
i j k ;l i j l ;k
\end{verbatim} }
See also {\tt DefineBundle}, {\tt FirstBianchiRule}, {\tt
SecondBianchiRule}, {\tt ContractedBianchiRules}.
\item[\tt Bundle] \hop{\ref{Tensors-subsection}}
{\tt Bundle -> name} is a {\tt DefineTensor} option, specifying the name of
the bundle or bundles the tensor is to be associated with.
The function {\tt Bundle[i]} returns the name of the bundle associated with
the index {\tt i}.
\item[\tt BundleDummy] \hop{}
{\tt BundleDummy[bundle]} returns the symbol that is used for
computer-generated dummy indices associated with the bundle. This is the
last index name in the list {\tt BundleIndices[bundle]}. For most bundles,
new dummy indices are of the form {\tt k}$n$, where {\tt
k=BundleDummy[bundle]} and $n$ is an integer. For one-dimensional bundles,
$n$ is omitted. See also {\tt BundleIndices}, {\tt DefineBundle}.
\item[\tt BundleIndices] \hop{}
{\tt BundleIndices[bundle]} returns a list of the index names currently
associated with bundle. See also {\tt BundleDummy}, {\tt DefineBundle}.
\item[\tt BundleQ] \hop{}
{\tt BundleQ[x]} returns {\tt True} if {\tt x} is the name of a bundle,
and {\tt False} otherwise. See also {\tt DefineBundle}.
\item[\tt Bundles] \hop{}
The function {\tt Bundles[x]} returns a list of the bundles associated with
each index position in the tensor expression {\tt x}; each entry in the list
is a sublist giving the allowed bundles for that index position. If you
insert an index that is not associated with one of the bundles
corresponding to that index position, the expression gives 0. See also
{\tt DefineTensor}, {\tt Variance}.
\item[\tt Co\hfill ] \hop{\ref{Tensors-subsection}}
{\tt Co} is an abbreviation for {\tt Covariant}.
\item[\tt CoBasisName] \hop{\ref{Tensors-subsection}}
{\tt CoBasisName -> name} is an option for {\tt DefineBundle}. It
specifies the name to be used in input and output form for the basis
covectors for the bundle being defined.
\item[\tt CollectConstants] \hop{\ref{CollectConstants-subsection}}
{\tt CollectConstants[x]} groups together terms in the tensor expression
{\tt x} having the same tensor factors but different constant factors.
{\tt CollectConstants[x,n]} or {\tt CollectConstants[x,\{n1,n2,...\}]}
applies {\tt CollectConstants} only to term {\tt n} or to terms {\tt
n1,n2,...} of {\tt x}. The constant factors are simplified somewhat: if a
constant factor is not too complicated ({\tt LeafCount[c]} $\leq$ 50),
Ricci factors the constant. For larger constant expressions, it applies
the Mathematica function {\tt Together}. See also {\tt TensorSimplify},
{\tt FactorConstants}, {\tt SimplifyConstants}, {\tt ConstantFactor}, {\tt
TensorFactor}.
\item[\tt CommuteCovD] \hop{\ref{CommuteCovD-subsection}}
{\tt CommuteCovD[ x, L[i], L[j] ]} changes all adjacent occurrences of
indices {\tt L[i],L[j]} after the ``;'' to {\tt L[j],L[i]} by adding
appropriate curvature and torsion terms. The second and third arguments
may be upper or lower indices. See also {\tt OrderCovD}, {\tt
CovDSimplify}.
\item[\tt CommutingFrame] \hop{\ref{Bundles-subsection}}
{\tt CommutingFrame} is a {\tt DefineBundle} option. Default is {\tt
True}.
\item[\tt CompatibilityRule] \hop{\ref{Connections-subsection}}
{\tt CompatibilityRule} is a rule that transforms derivatives of metric
components into connection coefficients, using the fact that the default
connection is compatible with the metric, which is expressed by
$$
d(g_{ij}) = {\it Conn}_{ij} + {\it Conn}_{ji}.
$$
See also {\tt FirstStructureRule}, {\tt SecondStructureRule},\\
{\tt StructureRules}.
\item[\tt Complex] \hop{\ref{Bundles-subsection},
\ref{Constants-subsection},
\ref{Tensors-subsection},
\ref{TensorExpressions-subsection}}
Ricci recognizes {\tt Complex} as a value for the {\tt Type} option of
\linebreak {\tt DefineConstant}, {\tt DefineTensor}, {\tt
DefineBundle}, and {\tt DefineMathFunction}.
\item[\tt Con\hfill ] \hop{\ref{Tensors-subsection}}
{\tt Con} is an abbreviation for {\tt Contravariant}.
\item[\tt Conjugate] \hop{\ref{Bundles-subsection},
\ref{Indices-subsection}, \ref{Tensors-subsection},
\ref{TensorExpressions-subsection}}
The Ricci package modifies the Mathematica function {\tt Conjugate} to
handle tensor expressions and indices. The behavior of a tensor, constant,
index, bundle, or mathematical function under conjugation is determined by
the {\tt Type} option specified when the object is defined.
In input form, you indicate the conjugate of tensor {\tt t} by typing
{\tt Conjugate[t]}; you may follow this with one or more sets of indices
in brackets, as in {\tt Conjugate[t] [L[i],L[j]]}. You indicate the
conjugate of an index {\tt L[i]} or {\tt U[i]} by typing {\tt LB[i]} or
{\tt UB[i]}. To indicate the conjugate of bundle {\tt b}, type
{\tt Conjugate[b]}. You can compute the conjugate of any tensor
expression {\tt x} by typing {\tt Conjugate[x]}.
In output form, conjugates of tensors, bundles, and
indices appear as barred symbols.
The behavior of tensors and indices under conjugation is determined by the
{\tt Type} options specified when the tensor and its associated bundles are
defined. For example, assume {\tt a}, {\tt b}, and {\tt c} are 2-tensors
of types {\tt Real}, {\tt Complex}, and {\tt Imaginary}, respectively.
Assume {\tt i} is an index associated with a real bundle, and {\tt p} is an
index associated with a complex bundle:
\vbox{ \begin{verbatim}
Conjugate[a ] = a _
i p i p
_
Conjugate[b ] = b _
i p i p
Conjugate[c ] = -c _
i p i p
\end{verbatim} }
See also {\tt Re}, {\tt Im}, {\tt DefineTensor}, {\tt DefineConstant}, {\tt
DefineBundle}, {\tt Declare}.
\item[\tt Conn]
\hop{\ref{Connections-subsection}, \ref{Non-default-subsection}}
{\tt Conn} is the name used for the generic connection forms for the
default connection on any bundle. It is defined as a product tensor of
rank \{2,1\} and variance \{{\tt Covariant}, {\tt Contravariant}, {\tt
Covariant}\}. When the first two indices are inserted, it represents an
entry of the matrix of connection 1-forms associated with the default
basis. When all three indices are inserted, it represents the Christoffel
symbols of the default connection relative to the default basis. The upper
index is the second one, and the index representing the direction in which
the derivative is taken is the third one. Thus the Christoffel symbol
$\Gamma_{ij}^k$ is represented by
\vbox{\begin{verbatim}
k
Conn [L[j],U[k],L[i]] --> Conn
j i
\end{verbatim}}
See also {\tt Curv}, {\tt Tor}, {\tt Curvature}, {\tt Connection}, {\tt
LeviCivitaConnection}, {\tt CovDExpand}, {\tt ConnToMetricRule}, {\tt
CurvToConnRule}.
\item[\tt Connection] \hop{\ref{Non-default-subsection}}
{\tt Connection -> cn} is an option for {\tt Del}, {\tt CovD}, {\tt Div},
{\tt Grad}, and {\tt Laplacian}. It specifies that covariant
derivatives are to be taken with respect to the connection {\tt cn}
instead of the default connection.
\item[\tt ConnToMetricRule] \hop{\ref{Riemannian-subsection}}
{\tt ConnToMetricRule} is a rule that causes indexed components of the
default connection {\tt Conn} on a Riemannian tangent bundle to be
converted to expressions involving directional derivatives of the metric
coefficients. This rule applies only to fully-indexed connection
components whose indices all refer to a single Riemannian tangent bundle
with the option {\tt CommutingFrame -> True}. See also {\tt
CurvToConnRule}, {\tt Conn}, {\tt DefineBundle}.
\item[\tt ConstantFactor] \hop{}
{\tt ConstantFactor[x]} returns the product of all the constant factors
in {\tt x}, which should be a monomial. See also {\tt TensorFactor},
{\tt CollectConstants}.
\item[\tt ConstantQ] \hop{\ref{Constants-subsection}}
{\tt ConstantQ[x]} returns {\tt True} if there are no explicit tensors in
{\tt x}, and {\tt False} otherwise. See also {\tt DefineConstant}.
\item[\tt ContractedBianchiRules] \hop{\ref{Riemannian-subsection}}
{\tt ContractedBianchiRules} is a rule that simplifies contracted covariant
derivatives of the Riemannian and Ricci curvature tensors using contracted
versions of the second Bianchi identity. For example (assuming {\tt
\$RiemannConvention = SecondUp}, which is the default),
\vbox{ \begin{verbatim}
l
Out[3]= Rm
i j k l ;
In[4]:= % /. ContractedBianchiRules
Out[4]= -Rc + Rc
i k ;j j k ;i
\end{verbatim}}
Similarly,
\vbox{\begin{verbatim}
j
Out[5]= Rc
i j ;
In[6]:= % /. ContractedBianchiRules
1
Out[6]= - Sc
2 ;i
\end{verbatim} }
See also {\tt BianchiRules}, {\tt FirstBianchiRule}, {\tt
SecondBianchiRule}.
\item[\tt Contravariant] \hop{\ref{Tensors-subsection}}
{\tt Contravariant} is a value for the {\tt Variance} option of
{\tt DefineTensor}, and may be abbreviated {\tt Con}. If an index slot is
{\tt Contravariant}, indices in that slot are upper by default. See also
{\tt DefineTensor}.
\item[\tt CorrectAllVariances] \hop{\ref{CorrectAllVariances-subsection}}
{\tt CorrectAllVariances[x]} changes the variances (upper to lower or lower
to upper) of indices in {\tt x} whose variances are not correct for their
positions, by inserting appropriate metric coefficients. {\tt
CorrectAllVariances[x,n]} or {\tt CorrectAllVariances[x,\{n1,n2,...\}]}
applies {\tt CorrectAllVariances} only to term {\tt n} or to terms {\tt
n1,n2,...} of {\tt x}.
{\samepage
Option:\nopagebreak
\begin{itemize}
\item {\tt Mode -> All} or {\tt OneDims}. {\tt OneDims} indicates that
only one-dimensional indices and indices that appear inside of differential
operators such as {\tt Del} or {\tt Extd} should be corrected. This option
exists mainly for internal use by {\tt TensorSimplify}. Default is {\tt
All}.
\end{itemize}
}
See also {\tt TensorSimplify}, {\tt LowerAllIndices}, {\tt AbsorbMetrics}.
\item[\tt Covariant] \hop{\ref{Tensors-subsection}}
{\tt Covariant} is a value for the {\tt Variance} option of {\tt
DefineTensor}, and may be abbreviated {\tt Co}. If an index slot is {\tt
Covariant}, indices in that slot are lower by default. See also {\tt
DefineTensor}.
\item[\tt CovD] \hop{\ref{CovD-subsection}}
If {\tt x} is a rank-0 tensor expression, then {\tt CovD[ x, \{L[i],L[j]\}
]} is the component of the covariant derivative of {\tt x} in the {\tt
L[i],L[j]} directions. If {\tt x} has any unfilled index slots, then it is
first converted to a component expression by generating dummy indices if
necessary before the covariant derivative is computed. The shorthand input
form {\tt x[ L[i], L[j] ]} is automatically converted to {\tt CovD[ x,
\{L[i],L[j]\} ]} if {\tt x} has rank 0. In output form, covariant
derivatives of a tensor are represented by subscripts following a semicolon.
Options (for the explicit form {\tt CovD[x,\{L[i],L[j]\}]} only):\nopagebreak
\begin{itemize}
\item {\tt Connection -> cn} specifies that covariant derivatives are to
be taken with respect to the connection {\tt cn} instead of the default
connection. Ordinarily, {\tt cn} should be an expression of the form
{\tt Conn + diff}, where {\tt diff} is a 3-tensor expression
representing the ``difference tensor'' between the default connection and
{\tt cn}.
\item {\tt Metric -> g}: a symmetric 2-tensor expression, indicating that
the covariant derivatives are to be taken with respect to the Levi-Civita
connection of {\tt g} instead of the default metric for {\tt x}'s bundle
(which is assumed to be Riemannian).
\end{itemize}
See also {\tt Del}, {\tt InsertIndices}, {\tt CovDExpand}.
\item[\tt CovDExpand] \hop{\ref{CovDExpand-subsection}}
{\tt CovDExpand[x]} converts all components of covariant derivatives in
{\tt x} to ordinary directional derivatives and connection coefficients.
{\tt CovDExpand[x,n]} or {\tt CovDExpand[x,\{n1,n2,...\}]} applies {\tt
CovDExpand} only to term {\tt n} or to terms {\tt n1,n2,...} of {\tt x}.
Directional derivatives with respect to basis elements are represented by
{\tt Del[ Basis[L[i]],...]}. For example:
\vbox{ \begin{verbatim}
k1
v // CovDExpand --> Del [v ] - Conn v
i ;j j i j i k1
\end{verbatim} }
Ordinary directional derivatives can be converted back to covariant
derivatives by calling {\tt BasisExpand}. See also {\tt BasisExpand}, {\tt
Del}, {\tt Conn}.
\item[\tt CovDSimplify] \hop{\ref{CovDSimplify-subsection}}
{\tt CovDSimplify[x]} attempts to simplify {\tt x} as much as possible by
ordering all dummy indices, including those that occur after the ``;'' in
component expressions. {\tt CovDSimplify[x,n]} or {\tt
CovDSimplify[x,\{n1,n2,...\}]} applies {\tt CovDSimplify} only to term {\tt
n} or to terms {\tt n1,n2,...} of {\tt x}. {\tt CovDSimplify} first calls
{\tt TensorSimplify}, then {\tt OrderCovD}, then {\tt TensorSimplify}
again. See also {\tt OrderCovD}, {\tt CommuteCovD}, {\tt TensorSimplify},
{\tt SuperSimplify}.
\item[\tt Curv] \hop{\ref{Connections-subsection},
\ref{Non-default-subsection}}
{\tt Curv} is the generic curvature tensor associated with the default
connection on any bundle. It is generated when covariant derivatives are
commuted, and when {\tt SecondStructureRule} is applied to derivatives of
connection forms. {\tt Curv} is a product tensor with rank \{2,2\}, which
is {\tt Alternating} in its first two and last two indices. Inserting the
first two indices yields the matrix of curvature 2-forms associated with
the default basis. Inserting all four indices yields the coefficients of
the curvature tensor. See also {\tt Conn}, {\tt Curvature}, {\tt
CurvToConnRule}.
\item[\tt Curvature] \hop{\ref{Connections-subsection}}
{\tt Curvature[cn]} is the curvature tensor associated to the connection
{\tt cn}. Ordinarily, {\tt cn} should be an expression of the form
{\tt Conn + diff}, where {\tt diff} is a 3-tensor expression representing
the ``difference tensor'' between the default connection and {\tt cn}.
See also {\tt Conn}, {\tt Curv}, {\tt CurvToConnRule}.
\item[\tt CurvToConnRule] \hop{\ref{Riemannian-subsection},
\ref{Connections-subsection}}
{\tt CurvToConnRule} is a rule that converts components of curvature
tensors (including Riemann, Ricci, and scalar curvature tensors for
Riemannian tangent bundles) to expressions involving connection
coefficients and their covariant derivatives. It is a partial inverse for
{\tt SecondStructureRule}. See also {\tt Curv}, {\tt Conn}, {\tt
ConnToMetricRule}, {\tt SecondStructureRule}.
\item[\tt Declare] \hop{\ref{Bundles-subsection},
\ref{Constants-subsection}, \ref{Tensors-subsection}}
{\tt Declare[ name, options ]} can be used to change certain options for
previously-defined Ricci objects. {\tt Declare[ \{name1,name2,...\},
options ]} changes options for several names at once; all names in the list
are given the same options. The first argument, {\tt name}, must be the
name of a bundle, constant, index, tensor, or mathematical function that
was previously defined by a call to {\tt DefineBundle}, {\tt
DefineConstant}, {\tt DefineIndex}, {\tt DefineTensor}, or {\tt
DefineMathFunction}. The allowable options depend on what type of object
is given as the first argument; the meanings of the options are the same as
in the corresponding {\tt Define} command. Any options not listed
explicitly in the call to {\tt Declare} are left unchanged.
\begin{itemize}
\item {\it Constant:}
If {\tt name} is a symbolic constant, only the {\tt Type} option is
allowed. It overrides any {\tt Type} specification given when {\tt
DefineConstant} was called.
\item {\it Index:}
If {\tt name} is an index name, the only allowable option is {\tt
TeXFormat}.
\item {\it Bundle:}
If {\tt name} is a bundle name, the allowable options are {\tt
FlatConnection}, {\tt ParallelFrame}, {\tt OrthonormalFrame}, {\tt
PositiveDefinite}, {\tt CommutingFrame}, and {\tt TorsionFree}.
\item {\it Tensor:}
If {\tt name} is a tensor name, the allowable options are {\tt Type}, {\tt
TeXFormat}, and
{\tt Bundle}.
\item {\it Math function:}
If {\tt name} is the name of a mathematical function, the only allowable
option is {\tt Type}.
\end{itemize}
See also {\tt DefineBundle}, {\tt DefineConstant},
{\tt DefineIndex}, {\tt DefineTensor}, {\tt DefineMathFunction}.
\item[\tt DefineBundle] \hop{\ref{Bundles-subsection}, \ref{One-subsection}}
{\tt DefineBundle[ name, dim, metric, \{indices\} ]} defines a bundle.
\begin{itemize}
\item {\tt name}: A symbol that uniquely identifies the bundle.
\item {\tt dim}: The dimension of the bundle. Can be a positive integer,
a symbolic constant, or any constant expression.
\item {\tt metric}: A name for the bundle's metric. The metric is
automatically defined by {\tt DefineBundle} as a {\tt Symmetric} or
{\tt Hermitian} 2-tensor. It is assumed to be compatible with the
bundle's default connection.
\item \{{\tt indices}\}: A list of index names to be associated with the
bundle. If only one index name is given, the braces may be omitted. For
one-dimensional bundles, only one index name is allowed. For
higher-dimensional bundles, additional indices can be added to the list
at any time by calling {\tt DefineIndex}.
\end{itemize}
Options: \nopagebreak
\begin{itemize}
\item {\tt Type -> Complex} or {\tt Real}. Default is {\tt Real}.
If {\tt Complex}, the conjugate bundle is referred to as
{\tt Conjugate[name]}, and is associated with barred indices.
\item {\tt TangentBundle -> bundle}. Specifies the name of the
underlying tangent bundle for the bundle being defined. This can be a
list of bundles, representing the direct sum of the bundles in the list.
The default is the value of {\tt \$DefaultTangentBundle} if defined,
otherwise this bundle itself (or the direct sum of this bundle and its
conjugate if the bundle is complex). If {\tt \$DefaultTangentBundle} has
not been given a value the first time {\tt DefineBundle} is called, it is
set to the first bundle defined (and its conjugate if it is a complex
bundle).
\item {\tt FlatConnection -> True} or {\tt False}. {\tt True} means the
default connection on this bundle has curvature equal to 0. The default
is {\tt False}.
\item {\tt ParallelFrame -> True} or {\tt False}. {\tt True} means the
default basis elements have vanishing covariant derivatives, so the
connection and curvature forms are set equal to 0. This option forces
{\tt FlatConnection -> True}. The default is {\tt False}.
\item {\tt OrthonormalFrame -> True} or {\tt False}. {\tt True} means the
metric coefficients with respect to the default basis are always assumed
to be constants. For one-dimensional bundles, the metric coefficient is
explicitly set to 1. The default is {\tt False}.
\item {\tt CommutingFrame -> True} or {\tt False}. This option is
meaningful only for tangent bundles or their subbundles. {\tt True}
means the default basis for this bundle consists of commuting vector
fields (as is the case, for example, when coordinate vector fields are
used). This option causes the connection coefficients for this bundle to
be symmetric in their two lower indices, and Lie brackets of basis
vectors to be replaced by zero.
\item {\tt PositiveDefinite -> True} or {\tt False}. {\tt True} means the
bundle's metric is positive definite. {\tt False} means no assumption
is made about the sign of the metric. This affects the simplification
of complex powers and logarithms of inner products with respect to the
metric. The default is {\tt True}.
\item {\tt TorsionFree -> True} or {\tt False}. {\tt False} means that the
default connection on this bundle may have nonvanishing torsion; this
makes sense only for tangent bundles or their subbundles. The default is
{\tt True}.
\item {\tt BasisName -> name}. Specifies a name to be used in input,
output, and \TeX\ forms for the default basis vectors for this bundle.
The default name is {\tt Basis}. Basis vectors are always represented
internally by the name {\tt Basis}. Covariant basis vectors can be
named independently by the {\tt CoBasisName} option.
\item {\tt CoBasisName -> name}. Specifies a name to be used in input,
output, and \TeX\ forms for the default covariant basis vectors for
this bundle. The default is the name given in the {\tt BasisName}
option, or {\tt Basis} if {\tt BasisName} is also omitted. Basis
covectors are always represented internally by the name {\tt Basis}.
\item {\tt MetricType -> Riemannian} or {\tt Normal}. The default is
{\tt Normal}, which means that the bundle's metric has no special
properties. If {\tt Riemannian} is specified, this bundle is assumed
to be a Riemannian tangent bundle, and {\tt DefineBundle} automatically
defines the Riemannian, Ricci, and scalar curvature tensors.
Contractions of the Riemannian and Ricci curvatures are automatically
converted to Ricci and scalar curvatures, respectively. To apply other
identities, use {\tt FirstBianchiRule}, {\tt SecondBianchiRule}, {\tt
ContractedBianchiRules}, or {\tt BianchiRules}.
When you specify {\tt MetricType -> Riemannian}, you may also give the
{\tt RiemannTensor}, {\tt RicciTensor}, {\tt ScalarCurv}, and {\tt
RiemannConvention} options below.
\item {\tt RiemannTensor -> name}: a name to be given to the Riemannian
curvature tensor for this bundle. This tensor is automatically defined
as a real, covariant 4-tensor with {\tt Symmetries ->
RiemannSymmetries}. This option takes effect only if {\tt MetricType
-> Riemannian} is specified. The default is {\tt Rm}.
\item {\tt RicciTensor -> name}: a name to be given to the Ricci tensor for
this bundle. This tensor is automatically defined as a real, covariant,
symmetric 2-tensor. This option takes effect only if {\tt MetricType
-> Riemannian} is specified. The default is {\tt Rc}.
\item {\tt ScalarCurv -> name}: a name to be given to the scalar curvature
function for this bundle. This tensor is automatically defined as a
real 0-tensor. This option takes effect only if {\tt MetricType
-> Riemannian} is specified. The default is {\tt Sc}.
\item {\tt RiemannConvention -> SecondUp} or {\tt FirstUp}: determines
the sign convention used for the Riemannian curvature tensor for this
bundle. This option takes effect only if {\tt MetricType -> Riemannian}
is specified. The default is {\tt SecondUp}, or the value of the global
variable {\tt \$RiemannConvention} if it has been set. The meaning of
this option is indicated by the relations below. (Note that the Riemann
curvature tensor is always defined as a {\it covariant} 4-tensor, so all
four of its indices are normally down. It is done this way so that all
index positions are equivalent for the purpose of applying symmetries of
the curvature tensor. The {\tt RiemannConvention} option controls only
the sign of the curvature components.)
{\samepage
{\tt RiemannConvention -> FirstUp}:
$$(\nabla_X \nabla_Y - \nabla_Y \nabla_X - \nabla_{[X,Y]})Z
= X^i Y^j Z^k g^{\ell m}{\it Rm}_{mkij} {\it Basis}_\ell$$
$${\it Rm}^k{}_{ikj} = {Rc}_{ij}$$}%
{\samepage
{\tt RiemannConvention -> SecondUp}:
$$(\nabla_X \nabla_Y - \nabla_Y \nabla_X - \nabla_{[X,Y]})Z
= X^i Y^j Z^k g^{\ell m}{\it Rm}_{kmij} {\it Basis}_\ell$$
$${\it Rm}_i{}^k{}_{kj} = {Rc}_{ij}$$}%
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
See also {\tt DefineTensor}, {\tt DefineIndex}, {\tt UndefineBundle}, {\tt
Declare}.
\item[\tt DefineConstant] \hop{\ref{Constants-subsection}}
{\tt DefineConstant[c]} defines the symbol {\tt c} to be a constant with
respect to differentiation in all space variables. The notation {\tt
c[~L[i]~]} is always interpreted as a covariant derivative of {\tt c}, and
thus 0; and {\tt Conjugate[c]} is replaced by {\tt c} if the constant is
{\tt Real}, and by {\tt -c} if it is {\tt Imaginary}.
Options: \nopagebreak
\begin{itemize}
\item {\tt Type -> type}. This can be a single
keyword or a list of keywords, chosen from among {\tt Complex},~ {\tt
Real}, {\tt Imaginary}, {\tt Positive}, {\tt Negative}, {\tt NonPositive},
{\tt NonNegative}, {\tt Integer}, {\tt Odd}, or {\tt Even}. Determines how
the constant behaves under conjugation, exponentiation, and logarithms.
Default is {\tt Real}.
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
See also {\tt Conjugate}, {\tt UndefineConstant}, {\tt Declare}.
\item[\tt DefineIndex] \hop{\ref{Bundles-subsection},
\ref{Indices-subsection}}
{\tt DefineIndex[ \{i,j,k\}, bundle ]} causes the index names {\tt i},
{\tt j}, {\tt k} to be associated with bundle.
\begin{itemize}
\item The first argument must be a symbol or list of symbols. One or
more of these may have already been defined as indices, as long as they
are associated with the same bundle as specified in this command.
\item The second argument must be the name of a bundle.
\end{itemize}
Options: \nopagebreak
\begin{itemize}
\item {\tt TeXFormat -> "texformat"}. Determines how the index appears
in {\tt TeXForm} output. Default is the index name itself. This should
be specified only when one single index is being defined. Note that, as
in all Mathematica strings, backslashes must be typed as double
backslashes; thus to get an index name to appear as $\beta$ in \TeX\
output, you would type \verb#TeXFormat -> "\\beta"#.
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
See also {\tt DefineBundle}, {\tt UndefineIndex}, {\tt UndefineBundle},
{\tt Declare}.
\item[\tt DefineMathFunction] \hop{\ref{MathFunctions-subsection},
\ref{TensorExpressions-subsection}}
{\tt DefineMathFunction[f]} declares {\tt f} to be a scalar-valued function
of one real or complex variable that can be used in tensor expressions.
If {\tt x} is any rank-0 tensor expression, then {\tt f[x]} is also
interpreted as a rank-0 tensor expression. Ricci has built-in definitions
for the Mathematica functions {\tt Sin}, {\tt Cos}, {\tt Tan}, {\tt Sec},
{\tt Csc}, {\tt Cot}, and {\tt Log}. If you intend to use any other
functions in tensor expressions, you must call {\tt DefineMathFunction}.
{\sc Limitation:} Currently, Ricci has no provision for using
mathematical functions depending on more than one variable in tensor
expressions.
Options: \nopagebreak
\begin{itemize}
\item {\tt Type -> type}. This can be a single keyword or a list of keywords,
chosen from among {\tt Real}, {\tt Complex}, {\tt Imaginary}, {\tt
Automatic}, {\tt Positive}, {\tt Negative}, {\tt NonPositive}, or {\tt
NonNegative}. {\tt Real} means {\tt f[x]} is always real; {\tt Imaginary}
means {\tt f[x]} is always imaginary; {\tt Complex} means {\tt f[x]} can
assume arbitrary complex values; and {\tt Automatic} means {\tt
Conjugate[f[x]] = f[Conjugate[x]]}. {\tt Positive}, {\tt Negative}, {\tt
NonPositive}, and {\tt NonNegative} all imply {\tt Real}, and mean that the
function values always have the corresponding attribute. Default is {\tt
Real}.
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
See also {\tt Declare}.
\item[\tt DefineRelation] \hop{\ref{DefineRelation-subsection}}
{\tt DefineRelation[ tensor, x, condition ]} defines a relation of the form
\begin{verbatim}
tensor := x /; condition
\end{verbatim}
associated with the tensor's name. The first argument {\tt tensor} must be
a single tensor name with or without indices, and can be written in Ricci's
input form. If index names used in {\tt tensor} are associated with
bundles, then the relation is applied only when indices from those bundles
appear in those positions. The {\tt condition} argument is optional; if
present, it should be a true/false condition that must be satisfied before
the relation will be applied. It may involve the tensor name or indices
that appear in {\tt tensor}.
For example, if {\tt i} is associated with bundle {\tt a} and {\tt p} with
bundle {\tt b},
\begin{verbatim}
DefineRelation[ t[ L[i],L[p] ], 0 ]
\end{verbatim}
specifies that {\tt t[ \_, \_ ]} is to be replaced by {\tt 0} whenever
its first index is associated with {\tt a} and its second with {\tt b}.
In general, the relation substitutes {\tt x} (suitably modified) in place
of any expression that matches {\tt tensor} after insertion of indices,
renaming of indices, covariant differentiation, conjugation, or raising
or lowering of indices.
{\tt DefineRelation} has the {\tt HoldAll} attribute, so its arguments will
not be evaluated when the command is executed. This means you must write
out {\tt tensor}, {\tt x}, and {\tt condition} in full, rather than
referring to a variable name or a preceding output line such as {\tt
Out[10]}, so that {\tt DefineRelation} can properly process the indices
that appear in the arguments.
Option: \nopagebreak
\begin{itemize}
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
See also {\tt DefineRule}, {\tt UndefineRelation}.
\item[\tt DefineRule] \hop{\ref{DefineRule-subsection}}
{\tt DefineRule[ rulename, lhs, rhs, condition ]} defines a rule named
{\tt rulename} of the form
\begin{verbatim}
lhs :> rhs /; condition
\end{verbatim}
The first two arguments, {\tt lhs} and {\tt rhs}, are arbitrary tensor
expressions with or without indices; tensors in them can be written in
Ricci's input form (tensor name, followed optionally by one or more sets of
indices in brackets). Other expressions used in {\tt lhs} must match
Mathematica's internal form for such expressions. The {\tt condition}
argument is optional; if present, it should be a true/false condition that
must be satisfied before the relation will be applied. It may involve the
tensor name or indices that appear in {\tt lhs}.
The rule is appended to a list containing previous rules defined with the
same name, unless the option {\tt NewRule -> True} is specified. To delete
a rule entirely, make the assignment
\begin{verbatim}
rulename = .
\end{verbatim}
If index names used in {\tt lhs} are associated with bundles, then the rule
is applied only when indices from those bundles appear in those positions.
For example, if {\tt i} is associated with bundle {\tt a} and {\tt p} with
bundle {\tt b},
\begin{verbatim}
DefineRule[ zerorule, t[ L[i], L[p] ], 0 ]
\end{verbatim}
causes rule {\tt zerorule} to replace {\tt t[~\_,~\_~]} by {\tt 0} whenever
its first index is associated with {\tt a} and its second with {\tt b}. In
general, the rule substitutes {\tt rhs} (suitably modified) in place of any
expression that matches {\tt lhs} after renaming of indices or raising or
lowering of indices. If {\tt lhs} is a single tensor with or without
indices, then the rule is also applied to expressions that match {\tt lhs}
after insertion of indices, covariant differentiation, or conjugation.
{\tt DefineRule} has the {\tt HoldAll} attribute, so its arguments will not
be evaluated when the command is executed. This means you must write out
{\tt lhs}, {\tt rhs}, and {\tt condition} in full, rather than referring to
a variable name or a preceding output line such as {\tt Out[10]}, so that
{\tt DefineRule} can properly process the indices that appear in the
arguments.
{\samepage Options:
\begin{itemize}
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\item {\tt NewRule -> True} or {\tt False}. Default is {\tt False}.
\end{itemize}}
See also {\tt DefineRelation}.
\item[\tt DefineTensor] \hop{\ref{Tensors-subsection},
\ref{Product-subsection}}
{\tt DefineTensor[ name, rank ]} defines a tensor.
\begin{itemize}
\item {\tt name}: A symbol that uniquely identifies the tensor.
\item {\tt rank}: Rank of the tensor. For ordinary tensors, this must be
a non-negative integer. For product tensors, this is a list of
positive integers.
\end{itemize}
Options: \nopagebreak
\begin{itemize}
\item {\tt Symmetries -> sym}: Symmetries of the tensor. For ordinary
tensors, the allowed values are {\tt Symmetric}, {\tt Alternating} or
{\tt Skew}, {\tt Hermitian}, {\tt SkewHermitian}, {\tt
RiemannSymmetries}, {\tt NoSymmetries}, or the name of an arbitrary
symmetry defined by calling {\tt DefineTensorSymmetries}. For a
product tensor, the value of the {\tt Symmetries} option must be either
{\tt NoSymmetries} or a list of symmetries whose length is the same as
that of the list of ranks; each symmetry on the list can be {\tt
Symmetric}, {\tt Alternating} or {\tt Skew}, {\tt Hermitian}, {\tt
SkewHermitian}, or {\tt NoSymmetries}, and applies to the corresponding
group of indices in the list of ranks. Default is {\tt NoSymmetries}.
The values of the {\tt Symmetries} option have the following meanings:
{\tt Symmetric}: The tensor is fully symmetric in all indices.
{\tt Alternating}: The tensor changes sign if any two indices are
interchanged. {\tt Skew} is a synonym for {\tt Alternating}.
{\tt Hermitian}: The tensor must be a real 2-tensor associated with a
bundle and its conjugate. It is symmetric in its two indices, with the
additional property that {\tt t[L[i],L[j]]} and {\tt t[LB[i],LB[j]]}
are both zero whenever {\tt i,j} are associated with the same bundle. For
product tensors, this can be used only for a group of two indices.
{\tt SkewHermitian}: The tensor must be a real 2-tensor associated with
a bundle and its conjugate. It is skew-symmetric in its two indices,
with the additional property that {\tt t[L[i],L[j]]} and {\tt
t[LB[i],LB[j]]} are both zero whenever {\tt i,j} are associated with the
same bundle. For product tensors, this can be used only for a group of
two indices.
{\tt RiemannSymmetries}: The tensor must have rank 4. The symmetries
are those of the Riemann curvature tensor: skew-symmetric in the first
two indices, skew-symmetric in the last two indices, symmetric when the
first two and last two are interchanged. The (first) Bianchi identity
is not automatically applied, but can be explicitly applied to any
tensor with these symmetries by means of {\tt FirstBianchiRule} or {\tt
BianchiRules}.
\item {\tt Type -> type}. For rank-0 tensors, this can be a single keyword or
a list of keywords, chosen from among {\tt Complex}, {\tt Real}, {\tt
Imaginary}, {\tt Positive}, {\tt Negative}, {\tt NonPositive}, or {\tt
NonNegative}. For higher-rank tensors, only {\tt Real}, {\tt Complex}, or
{\tt Imaginary} is allowed. Determines how the tensor behaves under
conjugation, exponentiation, and logarithms. The default is always {\tt
Real}.
\item {\tt TeXFormat -> "texformat"}: Determines how the tensor appears
in {\tt TeXForm} output. Default is the tensor's name. Note that, as in
all Mathematica strings, backslashes must be typed as double backslashes;
thus to get a tensor's name to appear as $\beta$ in \TeX\ output, you
would type \verb#TeXFormat -> "\\beta"#.
\item {\tt Bundle -> bundle}: The bundle with which the tensor is
associated. This can be a list, meaning the tensor is associated with
the direct sum of all the bundles in the list. If a complex bundle is
named and the {\tt Type} option is not {\tt Complex}, the tensor is
automatically associated with the direct sum of the bundle and its
conjugate.
{\tt Bundle -> Any} indicates that
the tensor can accept indices from any bundle.
The default value for the {\tt Bundle} option is {\tt
\$DefaultTangentBundle}.
If the tensor is given an index associated with a bundle not in this
list, the result is 0.
For a product tensor, the {\tt Bundle} option can be either a single
bundle, meaning that all index positions are associated with the same
bundle, or a list whose length is the same length as the list of ranks.
Each entry in the list specifies the bundle for the corresponding index
slots. Each entry can be either a single bundle name or a list of
bundle names indicating a direct sum of bundles for that group of
slots.
{\tt Bundle -> Same} is a special option for product tensors. It means
that indices from any bundle can be inserted in the first set of index
slots, but indices in the remaining slots must be from the same bundle or
its conjugate. This option is used internally by Ricci in defining the
{\tt Basis} tensor.
{\tt Bundle -> Automatic} is another special form that can be used for
product tensors. It means that indices from any bundle can be inserted
in the first set of index slots, but indices in the remaining slots must
come from the underlying tangent bundle of the first indices. This
option is used internally by Ricci in defining the {\tt Conn}, {\tt Tor},
and {\tt Curv} tensors.
\item {\tt Variance -> Covariant} or {\tt Contravariant}: Specifies
whether the tensor is covariant (so that components have lower indices)
or contravariant (upper indices). This can be a list whose length is
equal to the total rank of the tensor, in which case each entry in the
list specifies the variance of the corresponding index slot. The
default is {\tt Covariant}. Values may be abbreviated {\tt Co} and
{\tt Con}.
\item {\tt Quiet -> True} or {\tt False}: Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
See~ also ~{\tt UndefineTensor},~ {\tt Declare},~ {\tt Conjugate}, {\tt
DefineBundle}, {\tt FirstBianchiRule}, {\tt BianchiRules}, {\tt Conn}, {\tt
Tor}, {\tt Curv}, {\tt Basis}, {\tt DefineTensorSymmetries}.
\item[\tt DefineTensorSymmetries] \hop{}
{\tt DefineTensorSymmetries[~name, \{perm1,sgn1,...,permN,sgnN\}~]} defines
a {\tt TensorSymmetry} object that can be used in {\tt DefineTensor}. Here
{\tt perm1,...,permN} must be lists that are nontrivial permutations of
{\tt \{1,2,...,k\}}, and {\tt sgn1,...,sgnN} must be constants (ordinarily
$\pm 1$). A tensor with this symmetry has the property that, if any of the
permutations {\tt perm1,...,permN} is applied to its indices, the value of
the tensor is multiplied by the corresponding constant {\tt sgn1,...,sgnN}.
Ricci automatically tries all non-trivial iterates of each specified
permutation, until the indices are as close as possible to lexical order.
(However, Ricci does not try composing different permutations in the list.)
See also {\tt TensorSymmetry}, {\tt DefineTensor}, {\tt
UndefineTensorSymmetries}.
\item[\tt Del\hfill ] \hop{\ref{Del-subsection}}
{\tt Del[x]} is the total covariant derivative of the tensor expression
{\tt x}. If {\tt x} is a $k$-tensor, then {\tt Del[x]} is a
$(k+1)$-tensor. The last index slot of {\tt Del[x]} is the one generated
by differentiation; it is always covariant, and is associated with the
underlying tangent bundle of the bundle(s) of {\tt x}. If {\tt x} is a
scalar function (0-tensor), then {\tt Del[x]} is automatically replaced by
{\tt Extd[x]}.
{\tt Del[v,x]} is the covariant derivative of {\tt x} in the direction
{\tt v}; {\tt v} must be a 1-tensor expression. In output form, {\tt
Del[v,x]} appears as:
\vbox{\begin{verbatim}
Del [x]
v
\end{verbatim}}
Covariant derivatives with respect to (contravariant) basis vectors
are displayed without the name of the basis vector. For example, {\tt
Del[~ Basis[L[i]], x~ ]} appears as
\vbox{ \begin{verbatim}
Del [x]
i
\end{verbatim} }
Options: \nopagebreak
\begin{itemize}
\item {\tt Connection -> cn} specifies that the covariant derivative is to
be taken with respect to the connection {\tt cn} instead of the default
connection. Ordinarily, {\tt cn} should be an expression of the form
{\tt Conn + diff}, where {\tt diff} is a 3-tensor expression
representing the ``difference tensor'' between the default connection and
{\tt cn}.
\item {\tt Metric -> g}: a symmetric 2-tensor expression, indicating that
the covariant derivative is to be taken with respect to the Levi-Civita
connection of {\tt g} instead of the default metric for {\tt x}'s bundle
(which is assumed to be Riemannian).
\end{itemize}
See also {\tt Grad}, {\tt CovD}, {\tt Extd}, {\tt Div}, {\tt Laplacian},
{\tt CovDExpand}.
\item[\tt Det\hfill ] \hop{\ref{Matrices-subsection}}
If {\tt x} is a 2-tensor expression, Ricci interprets {\tt Det[x]} as the
determinant of {\tt x}, using the metric to convert {\tt x} to a
{\tt \{Contravariant,Covariant\}} tensor if necessary.
{\tt Det} is also a value for the global variable {\tt
\$WedgeConvention}.
See also {\tt Dot}, {\tt \$WedgeConvention}.
\item[\tt Dimension] \hop{}
{\tt Dimension[bundle]} returns the dimension of {\tt bundle}.
See also {\tt DefineBundle}.
\item[\tt Div\hfill ] \hop{\ref{Div-subsection}}
{\tt Div[x]} is the divergence of the tensor expression {\tt x}, which is
the covariant derivative of {\tt x} contracted on its last two indices. If
{\tt x} is a $k$-tensor, {\tt Div[x]} is a $(k-1)$-tensor. Ricci assumes
(without checking) that the last index of {\tt x} is associated with the
underlying tangent bundle of {\tt x}'s bundle. {\tt Div} is the formal
adjoint of {\tt -Del}.
Options: \nopagebreak
\begin{itemize}
\item {\tt Connection -> cn} specifies that the divergence is to be taken
with respect to the connection {\tt cn} instead of the default
connection. Ordinarily, {\tt cn} should be an expression of the form
{\tt Conn + diff}, where {\tt diff} is a 3-tensor expression
representing the ``difference tensor'' between the default connection and
{\tt cn}.
\item {\tt Metric -> g}: a symmetric 2-tensor expression, indicating that
the divergence is to be taken with respect to the Levi-Civita connection
of {\tt g} instead of the default metric for {\tt x}'s bundle (which is
assumed to be Riemannian).
\end{itemize}
See also {\tt Del}, {\tt Laplacian}.
\item[\tt DivGrad] \hop{\ref{Laplacian-subsection}}
{\tt DivGrad} is a value for the global variable {\tt
\$LaplacianConvention}.
\item[\tt Dot\hfill ] \hop{\ref{Dot-subsection},
\ref{Matrices-subsection}}
When {\tt x} and {\tt y} are tensor expressions, {\tt x.y} or {\tt
Dot[x,y]} represents the contraction of the last index of {\tt x} with
the first index of {\tt y}. When {\tt x} and {\tt y} are 2-tensors, this
can be interpreted as matrix multiplication. If {\tt Dot} is applied to
three or more tensor expressions, all arguments except possibly the first
and last must have rank greater than 1. Ricci automatically expands dot
products of sums and scalar multiples, and replaces dot products of
1-tensors with inner products.
See also {\tt Inner}, {\tt Inverse}, {\tt Kronecker}.
\item[\tt ERROR] \hop{}
If you attempt to insert the wrong number of indices into a tensor
expression, Ricci returns {\tt ERROR[expression]}.
\item[\tt Even] \hop{\ref{Constants-subsection}}
{\tt Even} is a value for the {\tt Type} option of
{\tt DefineConstant}.
\item[\tt Expand] \hop{\ref{TensorExpand-subsection}}
If you apply the Mathematica function {\tt Expand} to an expression that
includes tensors with indices, Ricci automatically converts it to {\tt
TensorExpand}. See also {\tt TensorExpand}.
\item[\tt Extd] \hop{\ref{Extd-subsection}}
{\tt Extd[x]} is the exterior derivative of {\tt x}, which must be an
alternating covariant tensor expression. In output form, {\tt Extd[x]}
appears as {\tt d[x]}. Ricci automatically expands exterior derivatives
of sums, scalar multiples, powers, and wedge products. See also {\tt Del},
{\tt ExtdStar}, {\tt LaplaceBeltrami}.
\item[\tt ExtdStar] \hop{\ref{ExtdStar-subsection}}
{\tt ExtdStar[x]} is the adjoint of the operator {\tt Extd} applied to
{\tt x}, which must be an alternating covariant tensor expression. If {\tt
x} is a $k$-form, then {\tt ExtdStar[x]} is a $(k-1)$-form. In output
form, {\tt ExtdStar[x]} appears as shown here:
\vbox{\begin{verbatim}
In[26]:= ExtdStar[x]
*
Out[26]= d [x]
\end{verbatim}}
{\samepage
Option:
\begin{itemize}
\item {\tt Metric -> g}: a symmetric 2-tensor expression, representing a
metric to be used in place of the default metric for {\tt x}'s bundle
(which is assumed to be Riemannian).
\end{itemize}
}
See also {\tt Extd}, {\tt LaplaceBeltrami}, {\tt Div}.
\item[\tt FactorConstants] \hop{\ref{FactorConstants-subsection}}
{\tt FactorConstants[x]} applies the Mathematica function {\tt Factor} to
the constant factor in each term of the tensor expression {\tt x}. {\tt
FactorConstants[x,n]} or {\tt FactorConstants[x,\{n1,n2,...\}]} applies
{\tt FactorConstants} only to term {\tt n} or to terms {\tt n1,n2,...} of
{\tt x}. See also {\tt CollectConstants}, {\tt SimplifyConstants}, {\tt
ConstantFactor}, {\tt TensorFactor}.
\item[\tt FirstBianchiRule] \hop{\ref{Riemannian-subsection}}
{\tt FirstBianchiRule} is a rule that attempts to turn sums containing two
4-tensors with {\tt Symmetries -> RiemannSymmetries} into a single term,
using the first Bianchi identity. For example:
\vbox{ \begin{verbatim}
i i
Out[7]= 2 Rm + 2 Rm
j k l l j k
In[8]:= % /. FirstBianchiRule
i
Out[8]= 2 Rm
k j l
\end{verbatim} }
See also {\tt SecondBianchiRule}, {\tt BianchiRules}, {\tt
ContractedBianchiRules}.
\item[\tt FirstStructureRule] \hop{\ref{Connections-subsection}}
{\tt FirstStructureRule} is a rule that implements the first structure
equation for exterior derivatives of basis covectors. For example
(assuming {\tt \$WedgeConvention = Alt}):
\vbox{ \begin{verbatim}
i
Out[9]= d[Basis ]
In[10]:= % /. FirstStructureRule
k6 i 1 i
Out[10]= Basis ^ Conn + - Tor
k6 2
\end{verbatim} }
See also {\tt SecondStructureRule}, {\tt CompatibilityRule}, {\tt
StructureRules}, {\tt \$WedgeConvention}.
\item[\tt FirstUp] \hop{}
{\tt FirstUp} is a value for the {\tt RiemannConvention} option of
{\tt DefineBundle}.
\item[\tt FlatConnection] \hop{\ref{Bundles-subsection}}
{\tt FlatConnection} is a {\tt DefineBundle} option.
The function {\tt FlatConnection[bundle]} returns {\tt True} or {\tt
False}.
See also {\tt DefineBundle}.
\item[\tt FormQ] \hop{}
{\tt FormQ[x]} returns {\tt True} if {\tt x} is a covariant alternating
tensor expression, and {\tt False} otherwise.
See also {\tt DefineTensor}.
\item[\tt Grad] \hop{\ref{Grad-subsection}}
{\tt Grad[x]} is the gradient of the tensor expression {\tt x}. It is the
same as {\tt Del[x]}, except that the last index is contravariant instead
of covariant. If {\tt x} is a scalar function (0-tensor), then {\tt
Grad[x]} is a vector field. See also {\tt Del}, {\tt Laplacian}.
\item[\tt Hermitian] \hop{\ref{Bundles-subsection}}
{\tt Hermitian} is a value for the {\tt Symmetries} option of
{\tt DefineTensor}.
\item[\tt HodgeInner] \hop{\ref{HodgeInner-subsection}}
{\tt HodgeInner[x,y]} represents the Hodge inner product of the
alternating tensors {\tt x} and {\tt y}, taken with respect to the
default metric(s) on the bundle(s) with which {\tt x} and {\tt y} are
associated. It is equal to the usual inner
product multiplied by a numerical scale factor (depending on {\tt
\$WedgeConvention}) chosen so that, if $\{e^i\}$ are orthonormal 1-forms,
then the following $k$-forms are orthonormal:
$$
e^{i_1}\wedge\dots\wedge e^{i_k}, \quad i_1 < \dots < i_k.
$$
The arguments {\tt x} and {\tt y} must be alternating tensor expressions
of the same rank. In output form, {\tt HodgeInner[x,y]} appears as {\tt
<>}. See also {\tt Inner}, {\tt HodgeNorm}, {\tt Int}, {\tt
ExtdStar}.
\item[\tt HodgeNorm] \hop{}
{\tt HodgeNorm[x]} is the norm of the alternating tensor expression {\tt x},
with respect to the Hodge inner product. It is automatically converted by
Ricci to {\tt Sqrt[HodgeInner[x,Conjugate[x]]]}.
See also {\tt HodgeInner}, {\tt Norm}.
\item[\tt Im\hfill ] \hop{\ref{TensorExpressions-subsection}}
Ricci converts
{\tt Im[x]} to {\tt (x - Conjugate[x])/(2I)}. See also {\tt Conjugate}.
\item[\tt Imaginary] \hop{\ref{Constants-subsection},
\ref{Tensors-subsection}}
{\tt Imaginary} is a value for the {\tt Type} option of {\tt
DefineConstant}, {\tt DefineTensor}, and {\tt DefineMathFunction}.
\item[\tt IndexOrderedQ] \hop{\ref{DefineRelation-subsection}}
{\tt IndexOrderedQ[\{indices\}]} returns {\tt True} if {\tt \{indices\}} are
ordered correctly according to Ricci's index ordering rules---first by name,
then by altitude (lower before upper)---and {\tt False} otherwise. See
also {\tt OrderDummy}, {\tt OrderCovD}, {\tt DefineRelation}, {\tt
DefineRule}.
\item[\tt IndexQ] \hop{}
{\tt IndexQ[i]} returns {\tt True} if {\tt i} is an index name, and
{\tt False} otherwise. See also {\tt DefineBundle}, {\tt DefineIndex}.
\item[\tt Inner] \hop{\ref{Inner-subsection}}
If {\tt x} and {\tt y} are tensor expressions, Ricci interprets {\tt
Inner[x,y]} as the inner product of {\tt x} and {\tt y}, taken with respect
to the default metric(s) on the bundle(s) with which {\tt x} and {\tt y}
are associated. If {\tt x} and {\tt y} have opposite variance (for
example, if {\tt x} is a 1-form and {\tt y} is a vector field), then {\tt
Inner[x,y]} represents the natural pairing between {\tt x} and {\tt y}.
The arguments {\tt x} and {\tt y} must have the same rank. Ricci
automatically expands inner products of sums and scalar multiples. In
output form, {\tt Inner[x,y]} appears as {\tt }. See also {\tt
Norm}, {\tt HodgeInner}.
\item[\tt InsertIndices] \hop{\ref{TensorExpressions-subsection}}
If {\tt x} is a tensor expression of rank $k$, then {\tt InsertIndices[ x,
\{L[i1],...,L[ik]\} ]} causes the indices {\tt L[i1]}, \ldots, {\tt L[ik]} to
be inserted into the $k$ index slots in order, yielding a component
expression. In input form, this can be abbreviated {\tt x[ L[i1], \dots,
L[ik] ]}. Indices in each slot may be lower ({\tt L[i]}) or upper ({\tt
U[i]}).
If {\tt x} has rank 0, then {\tt InsertIndices[ x, \{\} ]} or {\tt
x[]} converts it to a component expression by generating dummy indices as
necessary.
If one or more indices are inserted into a rank-0 expression,
then {\tt InsertIndices} is automatically converted to {\tt CovD}. See
also {\tt CovD}.
\item[\tt Int\hfill ] \hop{\ref{Int-subsection}}
If {\tt x} and {\tt y} are alternating tensor expressions with
{\tt Rank[x]} $\leq$ {\tt Rank[y]}, {\tt Int[x,y]} represents the
generalized interior product of {\tt x} into {\tt y}. When {\tt x}
is a vector field, {\tt Int[x,y]} is interior multiplication of {\tt x}
into {\tt y} (with a numerical factor depending on {\tt \$WedgeConvention}).
In general, {\tt Int[x,\_]} is the adjoint (with respect to the Hodge inner
product) of wedging with {\tt x} on the left: if {\tt alpha}, {\tt beta},
and {\tt gamma} are alternating tensors of ranks $a, b, a+b,$ respectively,
then
\vbox{ \begin{verbatim}
<> = <>.
alpha
\end{verbatim} }
See also {\tt HodgeInner}, {\tt Wedge}, {\tt Dot}, {\tt \$WedgeConvention}.
\item[\tt Integer] \hop{\ref{Constants-subsection}}
Ricci recognizes {\tt Integer} as a value for the {\tt Type} option of
{\tt DefineConstant}.
\item[\tt Inverse] \hop{\ref{Matrices-subsection}}
If {\tt x} is a 2-tensor expression, Ricci interprets {\tt Inverse[x]} as
the matrix inverse of {\tt x}. See also {\tt Dot}, {\tt Kronecker}.
\item[\tt Kronecker] \hop{\ref{Matrices-subsection}}
{\tt Kronecker[L[i],U[j]]} is the Kronecker delta symbol, which is equal to
1 if {\tt i = j} and 0 otherwise. {\tt Kronecker} is a generic tensor
representing the identity endomorphism of any bundle. See also {\tt Dot},
{\tt Inverse}.
\item[\tt L\hfill ] \hop{\ref{Indices-subsection}, \ref{Tensors-subsection}}
{\tt L[i]} represents a lower index {\tt i}. {\tt L[i[Bar]]} is the
internal representation for a lower barred index {\tt i}; it can be
abbreviated in input form by {\tt LB[i]}. See also {\tt LB}, {\tt U}, {\tt
UB}.
\item[\tt LaplaceBeltrami] \hop{\ref{LaplaceBeltrami-subsection}}
{\tt LaplaceBeltrami[x]} is the Laplace-Beltrami operator $\Delta = dd^* +
d^*d$ applied to the differential form {\tt x}. It is automatically
replaced by {\tt Extd[ExtdStar[x]] + ExtdStar[Extd[x]]}.
{\samepage
Option:
\begin{itemize}
\item {\tt Metric -> g}: a symmetric 2-tensor expression, representing a
metric to be used in place of the default metric for {\tt x}'s bundle
(which is assumed to be Riemannian).
\end{itemize}
}
See also {\tt Extd}, {\tt ExtdStar}, {\tt Laplacian}.
\item[\tt Laplacian] \hop{\ref{Laplacian-subsection}}
{\tt Laplacian[x]} is the covariant Laplacian of the tensor expression
{\tt x}. The sign convention of {\tt Laplacian} is controlled by the
global variable {\tt \$LaplacianConvention}. When {\tt
\$LaplacianConvention = DivGrad} (the default), {\tt Laplacian[x]} is
automatically replaced by {\tt Div[Grad[x]]}. When {\tt
\$LaplacianConvention = PositiveSpectrum}, {\tt Laplacian[x]} is replaced
by {\tt -Div[Grad[x]]}.
Options: \nopagebreak
\begin{itemize}
\item {\tt Metric -> g}: a symmetric 2-tensor expression, representing a
metric to be used in place of the default metric for the underlying tangent
bundle of {\tt x}.
\item {\tt Connection -> cn} specifies that covariant derivatives are to be
taken with respect to the connection {\tt cn} instead of the default
connection. Ordinarily, {\tt cn} should be an expression of the form
{\tt Conn + diff}, where {\tt diff} is a 3-tensor expression
representing the ``difference tensor'' between the default connection and
{\tt cn}.
\end{itemize}
See also {\tt Div}, {\tt Grad}, {\tt LaplaceBeltrami}.
\item[\tt LB\hfill ] \hop{\ref{Indices-subsection},
\ref{Tensors-subsection}}
{\tt LB[i]} is the input form for a lower barred index {\tt i}. It is
converted automatically to the internal form {\tt L[i[Bar]]}. See also
{\tt L}, {\tt U}, {\tt UB}, {\tt Bar}.
\item[\tt LeviCivitaConnection] \hop{\ref{Non-default-subsection}}
{\tt LeviCivitaConnection[g]} represents the Levi-Civita connection of the
arbitrary Riemannian metric {\tt g}. It behaves as a product tensor of
rank \{2,1\}. When indices are inserted, the connection coefficients
(Christoffel symbols) are computed in terms of the background connection of
{\tt g}'s bundle (assumed to be Riemannian) and covariant derivatives of
{\tt g}. The upper index is the {\it second} one, just as for the default
connection {\tt Conn}. See also {\tt Conn}, {\tt Curvature}, {\tt
RiemannTensor}, {\tt RicciTensor}, {\tt ScalarCurv}.
\item[\tt Lie\hfill ] \hop{\ref{Lie-subsection}}
{\tt Lie[v,x]} is the Lie derivative of the tensor expression {\tt x} in
the direction {\tt v}. The first argument {\tt v} must be a vector field
(a contravariant 1-tensor expression). If {\tt v} and {\tt x} are both
vector fields, {\tt Lie[v,x]} is their Lie bracket, and Ricci automatically
puts the factors in lexical order by inserting a minus sign if necessary.
Applying {\tt LieRule} causes Lie derivatives of differential forms to be
expanded in terms of {\tt Int} and exterior derivatives. See also {\tt
Del}, {\tt LieRule}.
\item[\tt LieRule] \hop{\ref{Lie-subsection}}
{\tt LieRule} is a rule that transforms Lie derivatives of differential
forms to expressions involving exterior derivatives and {\tt Int} according
to the relation
\vbox{ \begin{verbatim}
Lie [w] --> Int [d[w]] + d[Int[ [w]]]
v v v
\end{verbatim} }
See also {\tt Lie}, {\tt Int}, {\tt Extd}.
\item[\tt LowerAllIndices] \hop{\ref{LowerAllIndices-subsection}}
{\tt LowerAllIndices[x]} lowers all of the indices in {\tt x} (except those
appearing on metrics or {\tt Basis} covectors) by inserting appropriate
metrics with raised indices. {\tt LowerAllIndices[x,n]} or {\tt
LowerAllIndices[x,\{n1,n2,...\}]} applies {\tt LowerAllIndices} to term
{\tt n} or to terms {\tt n1,n2,...} of {\tt x}. See also {\tt
CorrectAllVariances}.
\item[\tt Method] \hop{}
{\tt Method} is an option for the Ricci simplification command
{\tt OrderDummy}, which specifies how hard the command should work to
simplify the expression.
\item[\tt Metric] \hop{}
{\tt Metric -> metricname} is an option for {\tt Del}, {\tt Div}, {\tt
Grad}, {\tt ExtdStar}, {\tt CovD}, {\tt Laplacian}, and {\tt
LaplaceBeltrami}.
The function {\tt Metric[bundle]} returns the bundle's metric.
See also {\tt DefineBundle}.
\item[\tt MetricQ] \hop{}
{\tt MetricQ[x]} returns {\tt True} if {\tt x} is a metric with or without
indices, and {\tt False} otherwise. See also {\tt DefineBundle}.
\item[\tt MetricType] \hop{\ref{Riemannian-subsection}}
{\tt MetricType} is a {\tt DefineBundle} option, which specifies whether
the bundle's metric has special properties. Currently the only allowable
values are {\tt MetricType -> Normal} (no special properties), and
{\tt MetricType -> Riemannian} (for a Riemannian tangent bundle). The
default is {\tt Normal}.
\item[\tt Negative] \hop{\ref{Constants-subsection},
\ref{Tensors-subsection}, \ref{TensorExpressions-subsection}}
Ricci recognizes {\tt Negative} as a value for the {\tt Type} option of
{\tt DefineConstant}, {\tt DefineTensor}, and {\tt DefineMathFunction}.
\item[\tt NewDummy] \hop{\ref{NewDummy-subsection}}
{\tt NewDummy[x]} converts all dummy indices occurring in the tensor
expression {\tt x} to computer-generated dummy indices. {\tt
NewDummy[x,n]} or {\tt NewDummy[x,\{n1,n2,...\}]} applies {\tt NewDummy} to
term {\tt n} or to terms {\tt n1,n2,...} of {\tt x}. For most
bundles, the generated dummy names are of the form {\tt k}$n$, where {\tt
k} is the last index name associated with bundle and $n$ is an integer.
For one-dimensional bundles, only the dummy name {\tt k} itself is
generated. See also {\tt RenameDummy}, {\tt OrderDummy}.
\item[\tt NewRule] \hop{\ref{DefineRule-subsection}}
{\tt NewRule} is a {\tt DefineRule} option.
\item[\tt NonNegative] \hop{\ref{Constants-subsection},
\ref{Tensors-subsection}, \ref{TensorExpressions-subsection}}
Ricci recognizes {\tt NonNegative} as a value for the {\tt Type} option of
{\tt DefineConstant}, {\tt DefineTensor}, and {\tt DefineMathFunction}.
\item[\tt NonPositive] \hop{\ref{Constants-subsection},
\ref{Tensors-subsection}, \ref{TensorExpressions-subsection}}
{\tt NonPositive} is a value for the {\tt Type} option of
{\tt DefineConstant}, {\tt DefineTensor}, and {\tt DefineMathFunction}.
\item[\tt NoOneDims] \hop{}
{\tt NoOneDims} is a value for the {\tt Mode} option of {\tt
AbsorbMetrics}, used internally by {\tt TensorSimplify}.
\item[\tt Norm] \hop{}
{\tt Norm[x]} is the norm of the tensor expression {\tt x}. It is
automatically converted by Ricci to {\tt Sqrt[Inner[x,Conjugate[x]]]}.
See also {\tt Inner}, {\tt HodgeNorm}.
\item[\tt Normal] \hop{\ref{Riemannian-subsection}}
{\tt Normal} is a value for the {\tt MetricType} option of
{\tt DefineBundle}.
\item[\tt NoSymmetries] \hop{\ref{Tensors-subsection}}
{\tt NoSymmetries} is a value for the {\tt Symmetries} option of
{\tt DefineTensor}.
\item[\tt Odd][47~ \hop{\ref{Constants-subsection}}
{\tt Odd} is a value for the {\tt Type} option of {\tt DefineConstant}.
\item[\tt OneDims] \hop{}
{\tt OneDims} is a value for the {\tt Mode} option of {\tt
CorrectAllVariances}, used internally by {\tt TensorSimplify}.
\item[\tt OrderCovD] \hop{\ref{OrderCovD-subsection}}
{\tt OrderCovD[x]} puts all of the indices appearing after ``;'' in the
tensor expression {\tt x} in order according to Ricci's index-ordering
rules (first alphabetically by name, then by altitude), by adding
appropriate curvature and torsion terms. {\tt OrderCovD[x,n]} or {\tt
OrderCovD[x,\{n1,n2,...\}]} applies {\tt OrderCovD} only to term {\tt n} or
to terms {\tt n1,n2,...} of {\tt x}. See also {\tt CommuteCovD}, {\tt
CovDSimplify}, {\tt IndexOrderedQ}.
\item[\tt OrderDummy] \hop{\ref{OrderDummy-subsection}}
{\tt OrderDummy[x]} attempts to put the dummy indices occurring in the
tensor expression {\tt x} in a ``canonical form''. {\tt OrderDummy[x,n]}
or {\tt OrderDummy[x,\{n1,n2,...\}]} applies {\tt OrderDummy} to term
{\tt n} or to terms {\tt n1,n2,...} of {\tt x}.
All pairs of dummy
indices are ordered so that the lower member appears first whenever
possible. Then {\tt OrderDummy} tries various permutations of the dummy
index names in each term of {\tt x}, searching for the lexically smallest
version of the expression among all equivalent versions.
Option: \nopagebreak
\begin{itemize}
\item {\tt Method -> n} specifies how hard {\tt OrderDummy} should work to
find the best possible version of the expression. The allowable values are
0, 1, and 2. The default is {\tt Method -> 1}, which means that dummy
index names are interchanged in pairs until the lexically smallest version
of the expression is found; this is used by {\tt TensorSimplify}. {\tt
Method -> 2} causes {\tt OrderDummy} to try all possible permutations of
the dummy index names; this is used by {\tt SuperSimplify}. {\tt Method ->
0} means don't try interchanging names at all. If $n$ is the number of
dummy index pairs in the expression, the time taken by {\tt Method -> 1} is
proportional to $n^2$, while the time taken by {\tt Method -> 2} is
proportional to $n!$. This can be very slow, especially if there are more
than 4 dummy pairs per term.
\end{itemize}
See also {\tt TensorSimplify}, {\tt SuperSimplify}, {\tt RenameDummy}, {\tt
NewDummy}.
\item[\tt ParallelFrame] \hop{\ref{Bundles-subsection}}
{\tt ParallelFrame} is a {\tt DefineBundle} option.
\item[\tt Plus] \hop{\ref{TensorExpressions-subsection}}
Ricci transforms expressions of the form {\tt (a + b)[L[i],...]} into {\tt
InsertIndices[ a+b, \{L[i],...\} ]}. Any number of upper and/or lower
indices can be inserted in this way, provided that the number of indices is
consistent with the rank of {\tt a+b}.
\item[\tt Positive] \hop{\ref{Constants-subsection},
\ref{Tensors-subsection}, \ref{TensorExpressions-subsection}}
Ricci recognizes {\tt Positive} as a value for the {\tt Type} option of
{\tt DefineConstant}, {\tt DefineTensor}, and {\tt DefineMathFunction}.
\item[\tt PositiveDefinite] \hop{\ref{Bundles-subsection}}
{\tt PositiveDefinite} is a {\tt DefineBundle} option.
\item[\tt PositiveSpectrum] \hop{\ref{Laplacian-subsection}}
{\tt PositiveSpectrum} is a value for the global variable {\tt
\$LaplacianConvention}.
\item[\tt Power] \hop{\ref{TensorExpressions-subsection}}
If {\tt x} is a tensor expression and {\tt p} is a positive integer, Ricci
interprets \verb#x^p# as the $p$-th symmetric power of {\tt x} with itself.
Ricci transforms expressions of the form \verb#(x^p)[i]# into
\verb#InsertIndices[x^p,{i}]# whenever {\tt i}
is an index ({\tt L[j]} or {\tt U[j]}).
Ricci causes a power of a product such as \verb#(a b)^p# to be expanded into
a product of powers \verb#a^p * b^p#, provided {\tt a} and {\tt b} do not
contain any indices; if they do contain indices, then \verb#(a b)^p# is
transformed to \verb#Summation[a b]^p#, to prevent the expression from being
expanded to \verb#a^p b^p#. {\tt Summation} is not printed in output
form.
See also {\tt SymmetricProduct}, {\tt Summation}, {\tt PowerSimplify}, {\tt
ProductExpand}.
\item[\tt PowerSimplify] \hop{\ref{PowerSimplify-subsection}}
{\tt PowerSimplify[x]} attempts to simplify powers that appear in the
tensor expression {\tt x}. {\tt PowerSimplify[x,n]} or {\tt
PowerSimplify[x,\{n1,n2,...\}]} applies {\tt PowerSimplify} only to term
{\tt n} or to terms {\tt n1,n2,...} of {\tt x}. {\tt PowerSimplify}
transforms {\tt x} by
\begin{itemize}
\item Converting products like \verb#a^p b^p# to \verb#Summation[a b]^p#
when {\tt a} and {\tt b} contain indices.
{\tt Summation} is an internal Ricci function that prevents such products
from being automatically expanded by Mathematica. It does not appear in
output form; instead, \verb#Summation[a b]^p# prints as \verb#(a b)^p#.
\item Expanding powers like \verb#(a^b)^c# to \verb#a^(b c)#, provided it
knows enough about {\tt a}, {\tt b}, and {\tt c} to know this is legitimate
(for example, if {\tt c} is an integer, or if {\tt a} is positive and
{\tt b} is real).
\item Expanding and collecting constants in any expression that appears
as base or exponent of a power.
\end{itemize}
See also {\tt TensorSimplify}, {\tt Power}, {\tt Summation}.
\item[\tt ProductExpand] \hop{\ref{ProductExpand-subsection}}
{\tt ProductExpand[x]} expands symmetric products and wedge products of
1-tensors that occur in {\tt x}, and rewrites them in terms of tensor
products. {\tt ProductExpand[x,n]} or {\tt ProductExpand[x,\{n1,n2,...\}]}
applies {\tt ProductExpand} only to term {\tt n} or to terms {\tt
n1,n2,...} of {\tt x}. See also {\tt BasisExpand}, {\tt Sym}, {\tt Alt},
{\tt SymmetricProduct}, {\tt Wedge}.
\item[\tt Quiet] \hop{}
{\tt Quiet} is an option for some of the defining and undefining commands in
the Ricci package. The option {\tt Quiet -> True} silences the usual
messages printed by these commands. The default is the value of the global
variable {\tt \$Quiet}, which is initially {\tt False}.
\item[\tt Rank] \hop{}
{\tt Rank[x]} returns the rank of the tensor expression {\tt x}. If
{\tt t} is a tensor without indices, {\tt Rank[t]} is the total rank as
specified in the call to {\tt DefineTensor}. If {\tt t} is a tensor with
all index slots filled, $\mbox{\tt Rank[t]}=0$. If {\tt t} is a product tensor
with some, but not all, index slots filled, then {\tt Rank[t]} is the total
rank of {\tt t} minus the number of filled slots. For any other tensor
expression {\tt x}, {\tt Rank[x]} depends on the meaning of the expression.
See also {\tt DefineTensor}.
\item[\tt Re\hfill ] \hop{\ref{TensorExpressions-subsection}}
Ricci converts {\tt Re[x]} to {\tt (x + Conjugate[x])/2}. See also {\tt
Conjugate}.
\item[\tt Real] \hop{\ref{Bundles-subsection}, \ref{Constants-subsection},
\ref{Tensors-subsection}, \ref{TensorExpressions-subsection}}
Ricci~recognizes~{\tt Real} as a value for the {\tt Type} option of {\tt
DefineBundle}, {\tt DefineConstant}, {\tt DefineTensor}, and {\tt
DefineMathFunction}.
\item[\tt RenameDummy] \hop{\ref{RenameDummy-subsection}}
{\tt RenameDummy[x]} changes the names of dummy indices in {\tt x} to
standard names. {\tt RenameDummy[x,n]} or {\tt RenameDummy[x,
\{n1,n2,...\} ]} applies {\tt RenameDummy} only to term {\tt n} or to terms
{\tt n1,n2,...} of {\tt x}. {\tt RenameDummy} chooses dummy names in
alphabetical order from the list of index names associated with the
appropriate bundle, skipping those names that already appear in {\tt x} as
free indices. When the list of index names is exhausted,
computer-generated names of the form {\tt k}$n$ are used, where {\tt k} is
the last index name in the list and $n$ is an integer. For one-dimensional
bundles, $n$ is omitted. See also {\tt TensorSimplify}, {\tt OrderDummy},
{\tt NewDummy}.
\item[\tt RicciSave] \hop{\ref{RicciSave-subsection}}
{\tt RicciSave["filename"]} causes the definitions of all symbols defined
in Mathematica's current context, along with Ricci's predefined tensors and
global variables, to be saved in Mathematica input form into the file {\tt
filename}. (The current context is usually {\tt Global`}, and usually
includes all symbols you have used in the current session.) The previous
contents of {\tt filename} are erased. You can read the definitions back
in by typing {\tt < name} is a {\tt DefineBundle} option, which specifies a
name to be used for the Ricci tensor for this bundle. The default is {\tt
Rc}. This option takes effect only when {\tt MetricType -> Riemannian} has
been specified.
{\tt RicciTensor[g]} represents the Ricci curvature tensor of the arbitrary
metric {\tt g}. When indices are inserted, the components of the Ricci
tensor are computed in terms of covariant derivatives of {\tt g} and the
curvature of the default metric on {\tt g}'s bundle, which is assumed to be
Riemannian. {\sc Note:} If you insert any upper indices, they are
considered to have been raised by the {\it default} metric on {\tt g}'s
bundle, not by {\tt g}. To use {\tt g} to raise indices, you must
explicitly multiply by components of {\tt Inverse[g]}.
See also {\tt DefineBundle}, {\tt RiemannTensor}, {\tt ScalarCurv}, {\tt
LeviCivitaConnection}.
\item[\tt RiemannConvention] \hop{\ref{Riemannian-subsection}}
{\tt RiemannConvention} is a {\tt DefineBundle}
option, which specifies the index convention of the Riemannian curvature
tensor.
\item[\tt Riemannian] \hop{\ref{Riemannian-subsection}}
{\tt MetricType -> Riemannian} is a {\tt DefineBundle} option for defining
a Riemannian tangent bundle.
\item[\tt RiemannSymmetries] \hop{}
{\tt RiemannSymmetries} is a value for the {\tt Symmetries} option of
{\tt DefineTensor}.
\item[\tt RiemannTensor] \hop{\ref{Non-default-subsection}}
{\tt RiemannTensor -> name} is a {\tt DefineBundle} option, which specifies
a name to be used for the Riemannian curvature tensor for this bundle.
The default is {\tt Rm}. This option takes effect only when
{\tt MetricType -> Riemannian} has been specified.
{\tt RiemannTensor[g]} represents the Riemannian curvature tensor of the
arbitrary metric {\tt g}. Like the default Riemannian curvature tensor,
{\tt RiemannTensor[g]} is a covariant 4-tensor. When indices are inserted,
the components of the curvature tensor are computed in terms of covariant
derivatives of {\tt g} and the curvature of the default metric on {\tt g}'s
bundle, which is assumed to be Riemannian. {\sc Note:} If you insert any
upper indices, they are considered to have been raised by the {\it default}
metric on {\tt g}'s bundle, not by {\tt g}. To use {\tt g} to raise
indices, you must explicitly multiply by components of {\tt Inverse[g]}.
See also {\tt DefineBundle}, {\tt LeviCivitaConnection}, {\tt RicciTensor},
{\tt ScalarCurv}.
\item[\tt Same] \hop{}
{\tt Bundle -> Same} is a special {\tt DefineTensor} option for product
tensors.
\item[\tt ScalarCurv] \hop{\ref{Non-default-subsection}}
{\tt ScalarCurv -> name} is a {\tt DefineBundle} option, which specifies a
name to be used for the scalar curvature for this bundle. The default is
{\tt Sc}. This option takes effect only when
{\tt MetricType -> Riemannian} has been specified.
{\tt ScalarCurv[g]} represents the scalar curvature of the arbitrary metric
{\tt g}. When indices are inserted, the scalar curvature is computed in
terms of covariant derivatives of {\tt g} and the curvature of the default
metric on {\tt g}'s bundle, which is assumed to be Riemannian.
See also {\tt RiemannTensor}, {\tt RicciTensor}, {\tt
LeviCivitaConnection}, {\tt DefineBundle}.
\item[\tt ScalarQ] \hop{}
{\tt ScalarQ[x]} is {\tt True} if {\tt x} is a rank 0 tensor expression with
no free indices, and {\tt False} otherwise.
\item[\tt SecondBianchiRule] \hop{\ref{Riemannian-subsection}}
{\tt SecondBianchiRule} is a rule that attempts to turn sums containing two
differentiated Riemannian curvature tensors into a single term using the
second Bianchi identity. For example:
\vbox{ \begin{verbatim}
2 Rm + 2 Rm /. SecondBianchiRule
i j k l; m i j l m; k
--> -2 Rm
i j m k; l
\end{verbatim} }
See also {\tt FirstBianchiRule}, {\tt ContractedBianchiRules}, {\tt
BianchiRules}, {\tt DefineBundle}.
\item[\tt SecondStructureRule] \hop{\ref{Connections-subsection}}
{\tt SecondStructureRule} is a rule that implements the second structure
equation for exterior derivatives of the generic connection forms. For
example:
\vbox{ \begin{verbatim}
Extd[Conn[L[i],U[j]]] /. SecondStructureRule -->
1 j k j
- Curv + Conn ^ Conn
2 i i k
\end{verbatim} }
See also {\tt FirstStructureRule}, {\tt CompatibilityRule}, {\tt
StructureRules}, {\tt Curv}, {\tt Conn}, {\tt CurvToConnRule}.
\item[\tt SecondUp] \hop{\ref{Riemannian-subsection}}
{\tt SecondUp} is a value for the {\tt RiemannConvention} option of
{\tt DefineBundle}.
\item[\tt SimplifyConstants] \hop{\ref{SimplifyConstants-subsection}}
{\tt SimplifyConstants[x]} applies the Mathematica function {\tt Simplify}
to the constant factor in each term of the tensor expression {\tt x}. {\tt
SimplifyConstants[x,n]} or {\tt SimplifyConstants[x,\{n1,n2,...\}]} applies
{\tt SimplifyConstants} only to term {\tt n} or terms {\tt n1,n2,...} of
{\tt x}. See also {\tt CollectConstants}, {\tt FactorConstants}, {\tt
ConstantFactor}.
\item[\tt Skew] \hop{\ref{Tensors-subsection}}
{\tt Skew} is a synonym for {\tt Alternating}.
\item[\tt SkewHermitian] \hop{}
{\tt SkewHermitian} is a value for the {\tt Symmetries} option of
{\tt DefineTensor}.
\item[\tt SkewQ] \hop{}
{\tt SkewQ[x]} is {\tt True} if {\tt x} is an alternating or skew-Hermitian
tensor expression, and {\tt False} otherwise.
\item[\tt StructureRules] \hop{\ref{Connections-subsection}}
{\tt StructureRules} is the union of
{\tt CompatibilityRule}, {\tt FirstStructureRule}, and
{\tt SecondStructureRule}.
\item[\tt Summation] \hop{}
If {\tt a} and {\tt b} contain indices, then Ricci transforms \verb#(a b)^p#
internally to \verb#Summation[a b]^p#, to prevent the expression from being
expanded to \verb#a^p * b^p#. {\tt Summation} is not printed in output
form; instead, \verb#Summation[a b]^p# appears as if it were \verb#(a b)^p#.
See also {\tt Power}, {\tt PowerSimplify}.
\item[\tt SuperSimplify] \hop{\ref{TensorSimplify-subsection},
\ref{SuperSimplify-subsection}}
{\tt SuperSimplify[x]} attempts to put the tensor expression {\tt x} into a
canonical form, so that two expressions that are equal are usually
identical after applying {\tt SuperSimplify}. {\tt SuperSimplify[x,n]} or
{\tt SuperSimplify[x,\{n1,n2,...\}]} applies {\tt SuperSimplify} only to
term {\tt n} or to terms {\tt n1}, {\tt n2}, \ldots of {\tt x}. {\tt
SuperSimplify} works exactly the same way as {\tt TensorSimplify}, except
that it calls {\tt OrderDummy} with the option {\tt Method -> 2}, so that
all possible permutations of dummy index names are tried. This is
generally much slower for expressions having more than 4 dummy index pairs:
for an expression with $k$ dummy index pairs per term, the time taken by
{\tt TensorSimplify} is proportional to $k^2$, while the time taken by {\tt
SuperSimplify} is proportional to $k!$.
See also {\tt TensorSimplify}, {\tt OrderDummy}, {\tt TensorCancel}.
\item[\tt Sym\hfill ] \hop{\ref{Sym-subsection}}
{\tt Sym[x]} represents the symmetrization of the tensor expression {\tt x}.
If {\tt x} is symmetric, then {\tt Sym[x] = x}.
See also {\tt Alt}, {\tt SymmetricProduct}.
\item[\tt Symmetric] \hop{\ref{Tensors-subsection}}
{\tt Symmetric} is a value for the {\tt Symmetries} option of
{\tt DefineTensor}.
\item[\tt SymmetricProduct] \hop{\ref{SymmetricProduct-subsection}}
If {\tt x}, {\tt y}, and {\tt z} are tensor expressions,
{\tt SymmetricProduct[x,y,z]} or {\tt x~*~y~*~z} or {\tt x~y~z}
represents their symmetric product. Symmetric products are represented
internally by ordinary multiplication. In output form, Ricci inserts
explicit asterisks whenever non-scalar tensor expression are multiplied
together, to remind the user that multiplication is being interpreted as
symmetric product. Mathematically, the symmetric product is defined by
$a*b = \Sym(a\otimes b)$.
See also {\tt Times}, {\tt Power}, {\tt Sym}, {\tt ProductExpand}.
\item[\tt SymmetricQ] \hop{}
{\tt SymmetricQ[x]} is {\tt True} if {\tt x} is a symmetric or Hermitian
tensor expression, and {\tt False} otherwise.
\item[\tt Symmetries] \hop{\ref{Tensors-subsection}}
{\tt Symmetries} is a {\tt DefineTensor} option.
\item[\tt TangentBundle] \hop{\ref{Bundles-subsection}}
{\tt TangentBundle} is a {\tt DefineBundle} option.
The function {\tt TangentBundle[x]} returns the tangent bundle list for the
bundle {\tt x}. See also {\tt UnderlyingTangentBundle}.
\item[\tt Tensor] \hop{\ref{Tensors-subsection}}
Ricci's internal form for tensors is
\begin{verbatim}
Tensor[ name, {i,j,...}, {k,l,...} ]
\end{verbatim}
where {\tt name} is the tensor's name, {\tt i,j,...} are the tensor indices
(each of the form {\tt L[i]} or {\tt U[i]}), and {\tt k,l,...} are the
indices resulting from covariant differentiation. In input form, this can
be typed {\tt name [i,j,...] [k,l,...]}. Either set of indices in brackets
can be omitted if it is empty. See also {\tt DefineTensor}, {\tt
UndefineTensor}.
\item[\tt TensorCancel] \hop{\ref{TensorCancel-subsection}}
{\tt TensorCancel[x]} attempts to simplify each term of {\tt x} by
combining and cancelling common factors, even when the factors have
different names for their dummy indices. {\tt TensorCancel[x,n]} or {\tt
TensorCancel[x,\{n1,n2,...\}]} applies {\tt TensorCancel} only to term {\tt
n} or to terms {\tt n1,n2,...} of {\tt x}. See also {\tt TensorSimplify},
{\tt SuperSimplify}.
\item[\tt TensorData] \hop{}
{\tt TensorData[name]} is a list containing data for the tensor
{\tt name}, used internally by Ricci. See also {\tt DefineTensor}.
\item[\tt TensorExpand] \hop{\ref{TensorExpand-subsection}}
{\tt TensorExpand[x]} expands products and positive integral powers in {\tt
x}, just as {\tt Expand} does, but maintains correct dummy index
conventions and does not expand constant factors. {\tt TensorExpand[x,n]}
or {\tt TensorExpand[x,\{n1,n2,...\}]} applies {\tt TensorExpand} to term
{\tt n} or to terms {\tt n1,n2,...} of {\tt x}. If you apply the
Mathematica function {\tt Expand} to an expression containing tensors with
indices, it is automatically converted to {\tt TensorExpand}. See also
{\tt TensorSimplify}, {\tt Expand}, {\tt BasisExpand}, {\tt CovDExpand},
{\tt ProductExpand}.
\item[\tt TensorFactor] \hop{}
{\tt TensorFactor[x]} returns the product of all the non-constant factors
in {\tt x}, which should be a monomial. See also {\tt ConstantFactor}.
\item[\tt TensorMetricQ] \hop{}
{\tt TensorMetricQ[tensorname]} returns {\tt True} if {\tt tensorname} is
the metric of some bundle, and {\tt False} otherwise. See also {\tt
DefineBundle}.
\item[\tt TensorProduct] \hop{\ref{TensorProduct-subsection}}
{\tt TensorProduct[x,y,z]} or {\tt TProd[x,y,z]} represents the tensor
product of {\tt x}, {\tt y}, and {\tt z}. Ricci automatically expands
tensor products of sums and scalar multiples. In output form, tensor
products appear as
\begin{verbatim}
x (X) y (X) z
\end{verbatim}
See also {\tt SymmetricProduct}, {\tt Wedge}.
\item[\tt TensorQ] \hop{}
{\tt TensorQ[name]} returns {\tt True} if {\tt name} is the name of a
tensor, and {\tt False} otherwise. See also {\tt DefineTensor}.
\item[\tt TensorRankList] \hop{}
{\tt TensorRankList} stores the list of ranks for a product tensor. Used
internally by Ricci. See also {\tt DefineTensor}.
\item[\tt TensorSimplify] \hop{\ref{TensorSimplify-subsection}}
{\tt TensorSimplify[x]} attempts to put the tensor expression {\tt x} into
a canonical form, so that two expressions that are equal will usually be
identical after applying {\tt TensorSimplify}. {\tt TensorSimplify[x,n]}
or {\tt TensorSimplify[x,\{n1,n2,...\}]} applies {\tt TensorSimplify} to
term {\tt n} or to terms {\tt n1,n2,...} of {\tt x}.
{\tt TensorSimplify} expands products and positive integer powers,
simplifies powers, uses metrics to raise and lower indices, tries to rename
all dummy indices in a canonical order, and collects all terms containing
the same tensor factors but different constant factors. When there are two
or more dummy index pairs associated with the same bundle, {\tt
TensorSimplify} tries exchanging dummy index names in pairwise, choosing
the lexically smallest result. It does not reorder indices after the ``;''
(use {\tt OrderCovD} or {\tt CovDSimplify} to do that). {\tt
TensorSimplify} calls {\tt CorrectAllVariances}, {\tt TensorExpand}, {\tt
AbsorbMetrics}, {\tt PowerSimplify}, {\tt RenameDummy}, {\tt OrderDummy},
and {\tt CollectConstants}. See also {\tt SuperSimplify}, {\tt OrderCovD},
{\tt CovDSimplify}, {\tt TensorCancel}, {\tt FactorConstants}, {\tt
SimplifyConstants}.
\item[\tt TensorSymmetry] \hop{}
A tensor symmetry is an object of the form
\begin{center}
{\tt TensorSymmetry[name,d,\{perm1,sgn1,...,permN,sgnN\}]},
\end{center}
where {\tt d} is a positive integer, {\tt perm1,...,permN} are non-trivial
\linebreak
permutations of $\{1,2,\dots,d\}$, and {\tt sgn1,...,sgnN} are constants,
\linebreak
usually $\pm 1$. {\tt TensorSymmetry} objects can be defined with
\linebreak
{\tt DefineTensorSymmetries} and used in the {\tt DefineTensor} command.
See also {\tt DefineTensorSymmetries}, {\tt DefineTensor}.
\item[\tt TeXFormat] \hop{}
{\tt TeXFormat} is an option for {\tt DefineTensor} and {\tt
DefineIndex}.
\item[\tt Times] \hop{\ref{TensorExpressions-subsection},
\ref{SymmetricProduct-subsection}}
Ricci uses ordinary multiplication to represent symmetric products of
tensors. Ricci transforms expressions of the form {\tt (a * b)[L[i],...]}
into {\tt InsertIndices[ a*b, \{L[i],...\} ]}. Any number of upper and/or
lower indices can be inserted in this way, provided that the number of
indices is consistent with the rank of {\tt a*b}. In output form, Ricci
modifies Mathematica's usual ordering of factors: constants are printed
first, then scalars, then higher-rank tensor expressions, and Ricci inserts
explicit asterisks between tensor factors of rank greater than 0 to remind
the user that multiplication is being interpreted as symmetric product.
See also {\tt SymmetricProduct}, {\tt Power}, {\tt ProductExpand}.
\item[\tt Tor\hfill ] \hop{\ref{Connections-subsection}}
{\tt Tor} is the name for the generic torsion tensor for the default
connection in any bundle. It is a product tensor of rank \{1,2\}; inserting
the first index yields the torsion 2-forms associated with the default
basis. Inserting all three indices yields the components of the torsion
tensor.
\item[\tt TorsionFree] \hop{\ref{Bundles-subsection},
\ref{Connections-subsection}}
{\tt TorsionFree} is a {\tt DefineBundle} option.
The function {\tt TorsionFree[bundle]}
returns {\tt True} or {\tt False}.
See also {\tt DefineBundle}.
\item[\tt TotalRank] \hop{}
{\tt TotalRank[tensorname]} returns the total rank of the tensor {\tt
tensorname}. This function is used internally by Ricci. To compute the
rank of an arbitrary tensor expression, use {\tt Rank} instead. See also
{\tt Rank}, {\tt DefineTensor}.
\item[\tt TProd] \hop{\ref{TensorProduct-subsection}}
{\tt TProd} is an abbreviation for {\tt TensorProduct}.
\item[\tt Tr\hfill ] \hop{\ref{Matrices-subsection}}
{\tt Tr[x]} represents the trace of the 2-tensor expression {\tt x},
computed with respect to the default metric on {\tt x}'s bundle. See also
{\tt Dot}.
\item[\tt Transpose] \hop{\ref{Matrices-subsection}}
If {\tt x} is a tensor expression, Ricci interprets {\tt Transpose[x]} as
{\tt x} with its index positions reversed. See also {\tt Dot}.
\item[\tt Type] \hop{\ref{Bundles-subsection}, \ref{Constants-subsection},
\ref{Tensors-subsection}, \ref{TensorExpressions-subsection}}
{\tt Type} is an option for {\tt DefineBundle}, {\tt DefineConstant}, {\tt
DefineTensor}, and {\tt DefineMathFunction}.
\item[\tt U\hfill ] \hop{\ref{Indices-subsection}, \ref{Tensors-subsection}}
{\tt U[i]} represents an upper index {\tt i}. {\tt U[i[Bar]]} is the
internal representation for an upper barred index {\tt i}; it can be
abbreviated in input form by {\tt UB[i]}. See also {\tt UB}, {\tt L}, {\tt
LB}.
\item[\tt UB\hfill ] \hop{\ref{Indices-subsection},
\ref{Tensors-subsection}}
{\tt UB[i]} is the input form for an upper barred index {\tt i}. It is
converted automatically to the internal form {\tt U[i[Bar]]}. See also
{\tt U}, {\tt L}, {\tt LB}, {\tt Bar}.
\item[\tt UndefineBundle] \hop {\ref{Bundles-subsection}}
{\tt UndefineBundle[bundle]} clears the definition of {\tt bundle}, its
metric, and all its indices. If {\tt bundle} is a Riemannian tangent
bundle, it also clears the definitions of its Riemann, Ricci, and scalar
curvature tensors. If you try to perform computations with previous
expressions involving {\tt bundle}'s indices, you may get unpredictable
results.
{\samepage
Option: \nopagebreak
\begin{itemize}
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
}
See also {\tt DefineBundle}, {\tt UndefineIndex}, {\tt Declare}.
\item[\tt UndefineConstant] \hop{}
{\tt UndefineConstant[c]} removes {\tt c}'s definition as a constant.
{\samepage
Option: \nopagebreak
\begin{itemize}
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the
value of {\tt \$Quiet} if set.
\end{itemize}
}
See also {\tt DefineConstant}, {\tt Declare}.
\item[\tt UndefineIndex] \hop{}
{\tt UndefineIndex[i]} or {\tt UndefineIndex[\{i,j,k\}]} removes the
association of indices with their bundles. If you try to perform
computations with previous expressions involving these indices,
you may get unpredictable results.
{\samepage
Option: \nopagebreak
\begin{itemize}
\item
{\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the value
of {\tt \$Quiet} if set.
\end{itemize}
} See also {\tt DefineIndex}, {\tt DefineBundle}, {\tt UndefineBundle},
{\tt Declare}.
\item[\tt UndefineRelation] \hop{\ref{DefineRelation-subsection}}
{\tt UndefineRelation[tensor]} deletes the relation previously defined for
{\tt tensor}. The argument must exactly match the first argument of the
corresponding call to {\tt DefineRelation}. {\sc Note:} There is no {\tt
UndefineRule} function; to remove the definition of a rule defined by {\tt
DefineRule}, simply execute an assignment such as {\tt rulename =.}, or
call {\tt DefineRule} with the option {\tt NewRule -> True}.
{\samepage
Option: \nopagebreak
\begin{itemize}
\item {\tt Quiet -> True} or {\tt False}.
Default is {\tt False}, or the value
of {\tt \$Quiet} if set.
\end{itemize}
}
See also {\tt DefineRelation}.
\item[\tt UndefineTensor] \hop{}
{\tt UndefineTensor[tensorname]} clears the definition of {\tt tensorname}.
If you try to perform computations with previous expressions involving {\tt
tensorname}, you may get unpredictable results.
{\samepage
Option: \nopagebreak
\begin{itemize}
\item {\tt Quiet -> True} or {\tt False}. Default is {\tt False}, or the value
of {\tt \$Quiet} if set.
\end{itemize}
}
See also {\tt DefineTensor}, {\tt Declare}.
\item[\tt UndefineTensorSymmetries] \hop{}
{\tt UndefineTensorSymmetries[name]} deletes the {\tt TensorSymmetry}
object created by {\tt DefineTensorSymmetries[name,...]}.
\item[\tt UnderlyingTangentBundle] \hop{}
{\tt UnderlyingTangentBundle[x]} returns a list of bundles representing the
underlying tangent bundle of the expression. The tangent bundle is the
direct sum of the bundles in the list. It is assumed that all tensors
used in a given expression have the same underlying tangent bundle.
\item[\tt Variance] \hop{\ref{Tensors-subsection}}
{\tt Variance} is a {\tt DefineTensor} option.
The function {\tt Variance[x]} returns a list of variances of the tensor
expression {\tt x}, one for each index slot.
See also {\tt DefineTensor}, {\tt Bundles}.
\item[\tt VectorFieldQ] \hop{}
{\tt VectorFieldQ[x]} returns {\tt True} if {\tt x} is a contravariant
1-tensor expression, and {\tt False} otherwise.
\item[\tt Wedge] \hop{\ref{Wedge-subsection}}
{\tt Wedge[x,y,z]} represents the wedge or exterior product of {\tt x},
{\tt y}, and {\tt z}. The arguments of {\tt Wedge} must be alternating
tensor expressions. They need not be covariant tensors, however; Ricci
handles wedge products of covariant, contravariant, and mixed tensors all
together, using the metric to raise and lower indices as needed. Ricci
automatically expands wedge products of sums and scalar multiples, and
arranges factors in lexical order by inserting appropriate signs.
The interpretation of {\tt Wedge} in
terms of tensor products is determined by the global variable {\tt
\$WedgeConvention}. In output form, wedge products are indicated with a
caret:
\vbox{\begin{verbatim}
x ^ y ^ z
\end{verbatim}}
See also {\tt \$WedgeConvention}, {\tt Alt}, {\tt TensorProduct}, {\tt
ProductExpand}.
\end{list}
% ****************************************
% ********** GLOBAL VARIABLES **********
% ****************************************
\subsection{Global variables}
\label{Global-subsection}
This section describes Ricci's {\it global variables}: these are symbols
that can be set by the user to control the way Ricci evaluates certain
expressions. For example, to change the value of {\tt \$WedgeConvention}
to {\tt Det}, just execute the assignment
\begin{verbatim}
$WedgeConvention = Det
\end{verbatim}
The variables described below all begin with \verb#$#, and are
all saved automatically if you issue the {\tt RicciSave} command.
\begin{list}{}{}
\item[\tt \$DefaultTangentBundle] \hop{\ref{Bundles-subsection}}
The global variable {\tt \$DefaultTangentBundle} can be set by the user to
a bundle or list of bundles. It is used by {\tt DefineBundle} as the
default value for the {\tt TangentBundle} option, by {\tt DefineTensor} as
the default value for the {\tt Bundle} option, and by {\tt BasisExpand} and
similar commands as the default bundle for tensors such as {\tt Curv}, {\tt
Conn}, and {\tt Tor} that are not intrinsically associated with any
particular bundle. By default, {\tt \$DefaultTangentBundle} is set to the
first bundle the user defines (or the direct sum of this bundle and its
conjugate if the bundle is complex). If you want to override this default
behavior, you can give a value to {\tt \$DefaultTangentBundle} before
calling {\tt DefineBundle}. For example:
\begin{verbatim}
$DefaultTangentBundle = {horizontal, vertical}
\end{verbatim}
specifies that the tangent bundle of all subsequently-defined bundles is
to be the direct sum of the bundles named {\tt horizontal} and
{\tt vertical}. See also {\tt DefineTensor}, {\tt DefineBundle}, {\tt
BasisExpand}.
\item[\tt \$LaplacianConvention] \hop{\ref{Laplacian-subsection}}
{\tt \$LaplacianConvention} determines which sign convention is used for the
covariant Laplacian on functions and tensors.
{\tt \$LaplacianConvention = DivGrad}~means~that~{\tt Laplacian[x] =
Div[Grad[x]]}, while {\tt \$LaplacianConvention =
PositiveSpectrum} \linebreak
means~that {\tt Laplacian[x] = -Div[Grad[x]]}. Default
is {\tt DivGrad}. See also {\tt Laplacian}.
\item[\tt \$MathFunctions] \hop{}
{\tt \$MathFunctions} is a list of names that have been defined as scalar
mathematical functions for use by Ricci. See also {\tt DefineMathFunction}.
\item[\tt \$Quiet] \hop{}
The global variable {\tt \$Quiet} is used by Ricci to determine
whether the defining and undefining commands report on what they are doing.
Setting {\tt \$Quiet=True} will silence these chatty commands. The default
is {\tt False}. It can be overridden for a particular command by specifying
the {\tt Quiet} option as part of the command call.
\item[\tt \$RiemannConvention] \hop{\ref{Riemannian-subsection}}
The global variable {\tt \$RiemannConvention} can be set by the user to
specify a default value for the {\tt RiemannConvention} option of
{\tt DefineBundle}. The allowed values are {\tt FirstUp} and
{\tt SecondUp} (the default). See also {\tt DefineBundle}.
\item[\tt \$TensorFormatting] \hop{\ref{Indices-subsection}}
The global variable {\tt \$TensorFormatting} can be set to {\tt True} or
{\tt False} by the user to turn on or off Ricci's special output formatting
of tensors and indices. Default is {\tt True}.
\item[\tt \$TensorTeXFormatting] \hop{}
The global variable {\tt \$TensorTeXFormatting} can be set to {\tt True} or
{\tt False} by the user to turn on or off Ricci's special formatting of
tensors in {\tt TeXForm}. Default is {\tt True}.
\item[\tt \$WedgeConvention] \hop{\ref{Wedge-subsection}}
The global variable {\tt \$WedgeConvention} can be set by the user to
determine the interpretation of wedge products. The allowed values are
{\tt Alt} and {\tt Det}. The default is {\tt Alt}. Suppose $\alpha$ is
a $p$-form and $\beta$ a $q$-form:
{\samepage
\begin{verbatim}
$WedgeConvention = Alt:
\end{verbatim}
$$\alpha \wedge \beta = \Alt (\alpha \otimes \beta)
\quad \mbox{and} \quad
{\it Basis}^1 \wedge \ldots \wedge {\it Basis}^n =
\frac{1}{n!}\det$$
}
{\samepage
\begin{verbatim}
$WedgeConvention = Det:
\end{verbatim}
$$\alpha \wedge \beta = \frac{(p+q)!}{p! q!} \Alt (\alpha \otimes \beta)
\quad \mbox{and} \quad
{\it Basis}^1 \wedge \ldots \wedge {\it Basis}^n = \det$$
}
See also {\tt Wedge}, {\tt Alt}.
\end{list}
\end{document}