File: einsteinify.tex

package info (click to toggle)
cadabra 1.46-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,244 kB
  • sloc: cpp: 33,188; ansic: 2,724; makefile: 329; yacc: 180; sh: 157; python: 45; lex: 38; lisp: 19
file content (24 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\cdbalgorithm{einsteinify}{}

In an expression containing dummy indices at the same position
(i.e.~either both subscripts or both superscripts), raise one of the
indices.
\begin{screen}{1,2}
A_{m} A_{m};
@einsteinify!(%);
A^{m} A_{m};
\end{screen}
If an additional argument is given to this command, it instead inserts
``inverse metric'' objects, with the name as indicated by the
additional argument.
\begin{screen}{1,2}
{m,n}::Indices.
A_{m} A_{m};
@einsteinify!(%){\eta};
A_{m} A_{n} \eta^{m n};
\end{screen}
Note that the second form requires that there are enough dummy indices
defined through the use of \subsprop{Indices}.

\cdbseealgo{eliminate_kr}
\cdbseeprop{Indices}