Skip to content

Commit cfe221b

Browse files
committed
doc: manual: add text on the interaction of extrasymbols and dummy indices
1 parent a405343 commit cfe221b

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

doc/manual/variable.tex

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,28 @@ \section{Dummy indices}
780780
found with which the above cases could be made to work without the penalty
781781
in execution time, it will be built in in the future.
782782

783+
One must also take care when working with extra symbols when processing
784+
expressions which contain dummy indices. Dummy indices which are inside
785+
the extra symbol definitions are not visible to {\FORM}'s renumbering
786+
routines, which can lead to ambiguous results. For example:
787+
\begin{verbatim}
788+
CFunction f,g;
789+
Index mu;
790+
791+
Local test = f(mu,mu)*g(N1_?,N1_?);
792+
ArgToExtraSymbol g;
793+
Sum mu;
794+
Argument g;
795+
FromPolynomial;
796+
EndArgument;
797+
798+
Print;
799+
.end
800+
801+
test =
802+
f(N1_?,N1_?)*g(N1_?,N1_?);
803+
\end{verbatim}
804+
783805
\section{Kronecker delta's}
784806

785807
\label{sect-kroneckerdelta}
@@ -825,7 +847,8 @@ \section{Extra Symbols}
825847
needed for some new manipulations and can also be very handy for output
826848
that is to be treated by for instance a FORTRAN or C compiler. The
827849
FromPolynomial statement replaces the extra symbols again by their original
828-
meaning.
850+
meaning. Care should be taken if extra symbol definitions include dummy
851+
indices, see \ref{sect-dummies}.
829852

830853
% THIS EXAMPLE IS PART OF THE TESTSUITE. CHANGES HERE SHOULD BE APPLIED THERE AS
831854
% WELL! (Var_Extra_Symbols_1)

0 commit comments

Comments
 (0)