File r38/doc/manual2/dummy.tex artifact 583baf2efd part of check-in 87ba6d7183


\chapter[DUMMY: Expressions with dummy vars]%
        {DUMMY: Canonical form of expressions with dummy variables}
\label{DUMMY}
\typeout{[DUMMY: Expressions with dummy variables]}

{\footnotesize
\begin{center}
Alain Dresse \\
Universit\'e Libre de Bruxelles \\
Boulevard du Triomphe, CP 210/01 \\
B--1050 BRUXELLES, Belgium \\[0.05in]
e--mail: adresse@ulb.ac.be
\end{center}
}

\ttindex{DUMMY}

An expression of the type
$$
\sum_{a=1}^{n} f(a)
$$
for any $n$ is  simply written as
$$
f(a)
$$
and $a$ is a {\em dummy} index.
If the previous expression is written as
$$
\sum_{b=1}^{n} f(b)
$$
$b$ is also a dummy index and, obviously we should be able to get the
equality
$$
f(a)-f(b);\, \rightarrow  0
$$
To declare dummy variables, two declarations are
available:\ttindex{DUMMY\_BASE}
\begin{itemize}
\item[i.]
\begin{verbatim}
     dummy_base <idp>;
\end{verbatim}
where {\tt idp} is the name of any unassigned identifier.
\item[ii.]\ttindex{dummy\_names}
\begin{verbatim}
     dummy_names <d>,<dp>,<dpp> ....;
\end{verbatim}
\end{itemize}
The first declares {\tt idp1,$\cdots$, idpn} as dummy variables {\em
i.e.\ }all variables of the form ``{\tt idxxx}'' where {\tt xxx} is a
number will be dummy variables, such as {\tt id1, id2, ... , id23}.
The second gives special names for dummy variables.
All other arguments are assumed to be {\tt free}.\\
An example:
\begin{verbatim}
     dummy_base dv; ==> dv

               % dummy indices are dv1, dv2, dv3, ...

     dummy_names i,j,k; ==> t

                % dummy names are i,j,k.

\end{verbatim}
When this is done, an expression like
\begin{verbatim}
     op(dv1)*sin(dv2)*abs(x)*op(i)^3*op(dv2)$
\end{verbatim}
is allowed.  Notice that, dummy indices may not be repeated (it is not
limited to tensor calculus) or that they be repeated many times inside
the expression.

By default all operators with dummy arguments are assumed to be {\em
commutative} and without symmetry properties.  This can be varied by
declarations {\tt NONCOM}, {\tt SYMMETRIC} and {\tt AN\-TI\-SYM\-ME\-TRIC}
 may be  used on the
operators.\ttindex{NONCOM}\ttindex{SYMMETRIC}\ttindex{ANTISYMMETRIC}
They can also be declared anticommutative.\ttindex{ANTICOM}
\begin{verbatim}
     anticom ao1, ao2;
\end{verbatim}

More complex symmetries can be handled with {\tt
SYMTREE}.\ttindex{SYMTREE}
The corresponding declaration for the Riemann tensor is
\begin{verbatim}
     symtree (r, {!+, {!-, 1, 2}, {!-, 3, 4}});
\end{verbatim}
The symbols !*, !+ and !- at the beginning of each list mean that the
operator has no symmetry, is symmetric and is antisymmetric with
respect to the indices inside the list.  Notice that the indices are
not designated by their names but merely by their natural order of
appearance.  1 means the first written argument of {\tt r}, 2 its
second argument {\em etc.}  In the example above r is symmetric with
respect to interchange of the pairs of indices 1,2 and 3,4
respectively.



REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]