Simplify - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Home : Support : Online Help : Physics : Simplify

Physics[Simplify] - simplify expressions involving objects and operations related to the Physics package

 Calling Sequence Simplify(A) Simplify(A, kind1, kind2, ...)

Parameters

 A - any mathematical expression kind1, kind2, ... - (optional) any of algebrarules, indices, noncommutativeproducts, sum, int; the kind of simplification to perform

Description

 • The Simplify command performs simplifications of expressions involving objects and operations related to the Physics package, including taking into account:
 - The summation convention for repeated indices, regarding them as dummies, and including the (anti)symmetry properties of the indices of the tensorial objects involved (according to how these objects were defined by the Define command).
 - Properties of noncommutative products.
 - (Anti)Commutator algebra rules.
 - Projectors and KroneckerDelta contracted indices inside sums.
 • As with the general Maple simplifier, simplify, when you call the Physics[Simplify] command with no extra arguments, all of the simplifications are attempted. When you call it with extra arguments specifying different simplifications, any of algebrarules, bracketrules, indices, noncommutativeproducts, sum, and int, only the specified simplifications are attempted.
 • You do not need to remember exactly all of the keywords; as with other Physics commands, Simplify will match wrong or partially spelled keywords to the first likely one, and perform the simplification. For example, Simplify(expr, alg) will invoke Simplify(expr, algebrarules).

Examples

 > $\mathrm{with}\left(\mathrm{Physics}\right):$
 > $\mathrm{Setup}\left(\mathrm{mathematicalnotation}=\mathrm{true}\right)$
 $\left[{\mathrm{mathematicalnotation}}{=}{\mathrm{true}}\right]$ (1)

Summation rule for repeated indices

 By default, the dimension of the spacetime when you load the Physics package is 4 = 3 + 1, and the signature is -.
 > $\mathrm{Setup}\left(\mathrm{dimension},\mathrm{signature}\right)$
 $\left[{\mathrm{dimension}}{=}{4}{,}{\mathrm{signature}}{=}{\mathrm{- - - +}}\right]$ (2)
 So the trace of the metric g_ is equal to 4.
 > ${\mathrm{g_}}_{\mathrm{ν},\mathrm{μ}}^{2}$
 ${{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{g}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (3)
 > $\mathrm{Simplify}\left(\right)$
 ${4}$ (4)
 The metric is used to 'raise and lower' indices in other tensors, as shown below.
 > ${\mathrm{g_}}_{\mathrm{ν},\mathrm{μ}}{\mathrm{g_}}_{\mathrm{ν},\mathrm{ρ}}$
 ${{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{\mathrm{g_}}}_{{\mathrm{~nu}}{,}{\mathrm{ρ}}}$ (5)
 > $\mathrm{Simplify}\left(\right)$
 ${{g}}_{{\mathrm{\mu }}{,}{\mathrm{\rho }}}$ (6)
 Define $A$ as an object having tensorial properties; that is, the summation convention for repeated indices in products should be taken into account.
 > $\mathrm{Define}\left(A\right)$
 $\mathrm{Defined objects with tensor properties}$
 $\left\{{A}{,}{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (7)
 So the metric can now have indices contracted with $A$.
 > ${\mathrm{g_}}_{\mathrm{ν},\mathrm{μ}}{\mathrm{g_}}_{\mathrm{ρ},\mathrm{σ}}{A}_{\mathrm{ν},\mathrm{μ},\mathrm{ρ},\mathrm{σ}}$
 ${{A}}_{{\mathrm{\nu }}{,}{\mathrm{\mu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{}{{g}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{g}}_{\phantom{{}}\phantom{{\mathrm{\rho }}{,}{\mathrm{\sigma }}}}^{\phantom{{}}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}$ (8)
 > $\mathrm{Simplify}\left(\right)$
 ${{A}}_{{\mathrm{\nu }}\phantom{{\mathrm{\nu }}}{\mathrm{\sigma }}\phantom{{\mathrm{\sigma }}}}^{\phantom{{\mathrm{\nu }}}{\mathrm{\nu }}\phantom{{\mathrm{\sigma }}}{\mathrm{\sigma }}}$ (9)
 The metric is totally symmetric with respect to interchange of positions of its indices, while the LeviCivita symbol, in the Maple worksheet displayed as epsilon, is totally antisymmetric. So the contraction of their respective indices is equal to zero.
 > ${\mathrm{g_}}_{\mathrm{ν},\mathrm{μ}}{\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{σ},\mathrm{ρ}}$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{}{{g}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (10)
 > $\mathrm{Simplify}\left(\right)$
 ${0}$ (11)
 For the same reason, the contraction of any two of the indices of the LeviCivita symbol is also zero.
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{ν},\mathrm{ρ},\mathrm{σ}}$
 ${0}$ (12)
 As is the product of the LeviCivita symbol, where the same spacetime vector appears two times, contracting different indices of epsilon. To illustrate this case, first Define $q$ to represent this generic tensor.
 > $\mathrm{Define}\left(q\right)$
 $\mathrm{Defined objects with tensor properties}$
 $\left\{{q}{,}{{A}}_{{\mathrm{\nu }}{,}{\mathrm{\mu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{,}{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (13)
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{σ},\mathrm{ρ}}{q}_{\mathrm{μ}}{q}_{\mathrm{ν}}$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{}{{q}}_{\phantom{{}}\phantom{{\mathrm{\mu }}}}^{\phantom{{}}{\mathrm{\mu }}}{}{{q}}_{\phantom{{}}\phantom{{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\nu }}}$ (14)
 > $\mathrm{Simplify}\left(\right)$
 ${0}$ (15)
 When defining an object to have tensorial properties, you can define the symmetry properties of the indices of the object as well. The following Defines $B$ and $C$ as totally symmetric and totally antisymmetric, respectively.
 > $\mathrm{Define}\left(B,\mathrm{symmetric}\right)$
 $\mathrm{Defined objects with tensor properties}$
 $\left\{{B}{,}{{A}}_{{\mathrm{\nu }}{,}{\mathrm{\mu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{,}{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{q}}_{{\mathrm{\nu }}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (16)
 > $\mathrm{Define}\left(C,\mathrm{antisymmetric}\right)$
 $\mathrm{Defined objects with tensor properties}$
 $\left\{{B}{,}{C}{,}{{A}}_{{\mathrm{\nu }}{,}{\mathrm{\mu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{,}{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{q}}_{{\mathrm{\nu }}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (17)
 > ${B}_{\mathrm{μ},\mathrm{ν}}{\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{σ},\mathrm{ρ}}$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{}{{B}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (18)
 > $\mathrm{Simplify}\left(\right)$
 ${0}$ (19)
 > $\mathrm{Define}\left(B,\mathrm{query}\right)$
 $\mathrm{Totally symmetric tensor, structured as}\left[\mathrm{name}{,}\mathrm{indices}{,}\mathrm{variables}\right]:$
 $\left[{B}{,}\left[{2}{,}{0}{,}{0}\right]{,}{0}\right]$ (20)
 > ${C}_{\mathrm{μ},\mathrm{ν}}{\mathrm{g_}}_{\mathrm{ν},\mathrm{μ}}$
 ${{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{C}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (21)
 > $\mathrm{Simplify}\left(\right)$
 ${0}$ (22)
 > $\mathrm{Define}\left(C,\mathrm{query}\right)$
 $\mathrm{Totally antisymmetric tensor, structured as}\left[\mathrm{name}{,}\mathrm{indices}{,}\mathrm{variables}\right]:$
 $\left[{C}{,}\left[{2}{,}{0}{,}{0}\right]{,}{0}\right]$ (23)
 > ${B}_{\mathrm{μ},\mathrm{ν}}{C}_{\mathrm{μ},\mathrm{ν}}$
 ${{B}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{C}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (24)
 > $\mathrm{Simplify}\left(\right)$
 ${0}$ (25)
 The number of indices of the LeviCivita symbol depends on the dimension of spacetime. For any dimension and signature, the contracted product of two LeviCivita symbols can be expressed as a sum of products involving the metric g_. Note the use of Check to tell which indices are repeated (contracted) and which are free at any point.
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{β}}{\mathrm{LeviCivita}}_{\mathrm{μ},\mathrm{σ},\mathrm{ρ},\mathrm{τ}}$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{\mathrm{\epsilon }}}_{\phantom{{}}\phantom{{\mathrm{\mu }}}{\mathrm{\rho }}{,}{\mathrm{\sigma }}{,}{\mathrm{\tau }}}^{\phantom{{}}{\mathrm{\mu }}\phantom{{\mathrm{\rho }}{,}{\mathrm{\sigma }}{,}{\mathrm{\tau }}}}$ (26)
 > $\mathrm{Check}\left(,\mathrm{indices},\mathrm{all}\right)$
 $\mathrm{The repeated indices per term are:}\left[\left\{\mathrm{...}\right\}{,}\left\{\mathrm{...}\right\}{,}\mathrm{...}\right]\mathrm{, the free indices are:}\left\{\mathrm{...}\right\}$
 $\left[\left\{{\mathrm{\mu }}\right\}\right]{,}\left\{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\nu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}{,}{\mathrm{\tau }}\right\}$ (27)
 > $\mathrm{Simplify}\left(\right)$
 $\left({-}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\rho }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\sigma }}}{+}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\sigma }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\rho }}}\right){}{{g}}_{{\mathrm{\nu }}{,}{\mathrm{\tau }}}{-}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\sigma }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\tau }}}{}{{g}}_{{\mathrm{\nu }}{,}{\mathrm{\rho }}}{+}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\tau }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\sigma }}}{}{{g}}_{{\mathrm{\nu }}{,}{\mathrm{\rho }}}{-}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\tau }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\rho }}}{}{{g}}_{{\mathrm{\nu }}{,}{\mathrm{\sigma }}}{+}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\rho }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\tau }}}{}{{g}}_{{\mathrm{\nu }}{,}{\mathrm{\sigma }}}$ (28)
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{σ},\mathrm{ρ}}{\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{β}}$
 ${-}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{\mathrm{\epsilon }}}_{\phantom{{}}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}^{\phantom{{}}{\mathrm{\mu }}{,}{\mathrm{\nu }}\phantom{{\mathrm{\rho }}{,}{\mathrm{\sigma }}}}$ (29)
 > $\mathrm{Check}\left(,\mathrm{indices},\mathrm{all}\right)$
 $\mathrm{The repeated indices per term are:}\left[\left\{\mathrm{...}\right\}{,}\left\{\mathrm{...}\right\}{,}\mathrm{...}\right]\mathrm{, the free indices are:}\left\{\mathrm{...}\right\}$
 $\left[\left\{{\mathrm{\mu }}{,}{\mathrm{\nu }}\right\}\right]{,}\left\{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}\right\}$ (30)
 > $\mathrm{Simplify}\left(\right)$
 ${2}{}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\rho }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\sigma }}}{-}{2}{}{{g}}_{{\mathrm{\alpha }}{,}{\mathrm{\sigma }}}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\rho }}}$ (31)
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{σ}}{\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{β}}$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}{,}{\mathrm{\sigma }}}{}{{\mathrm{\epsilon }}}_{\phantom{{}}\phantom{{\mathrm{\alpha }}}{\mathrm{\beta }}\phantom{{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\alpha }}\phantom{{\mathrm{\beta }}}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (32)
 > $\mathrm{Check}\left(,\mathrm{indices},\mathrm{all}\right)$
 $\mathrm{The repeated indices per term are:}\left[\left\{\mathrm{...}\right\}{,}\left\{\mathrm{...}\right\}{,}\mathrm{...}\right]\mathrm{, the free indices are:}\left\{\mathrm{...}\right\}$
 $\left[\left\{{\mathrm{\alpha }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}\right\}\right]{,}\left\{{\mathrm{\beta }}{,}{\mathrm{\sigma }}\right\}$ (33)
 > $\mathrm{Simplify}\left(\right)$
 ${-}{6}{}{{g}}_{{\mathrm{\beta }}{,}{\mathrm{\sigma }}}$ (34)
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{β}}^{2}$
 ${{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{}{{\mathrm{\epsilon }}}_{\phantom{{}}\phantom{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (35)
 > $\mathrm{Check}\left(,\mathrm{indices},\mathrm{all}\right)$
 $\mathrm{The repeated indices per term are:}\left[\left\{\mathrm{...}\right\}{,}\left\{\mathrm{...}\right\}{,}\mathrm{...}\right]\mathrm{, the free indices are:}\left\{\mathrm{...}\right\}$
 $\left[\left\{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}\right\}\right]{,}{\varnothing }$ (36)
 > $\mathrm{Simplify}\left(\right)$
 ${-24}$ (37)
 Note that the results above are different if the dimension or signature of spacetime are different from 4 and -, respectively.
 During normal computations, a frequent occurrence is when two products have tensors with the same contracted indices, but in each product the contracted indices are represented by different letters, thus obscuring the fact that the two products are mathematically equal.
 > $\mathrm{Define}\left(F,'\mathrm{quiet}'\right)$
 $\left\{{F}{,}{{A}}_{{\mathrm{\nu }}{,}{\mathrm{\mu }}{,}{\mathrm{\rho }}{,}{\mathrm{\sigma }}}{,}{{B}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{C}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{q}}_{{\mathrm{\nu }}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (38)
 > ${F}_{\mathrm{μ},\mathrm{ν}}{C}_{\mathrm{ν},\mathrm{ρ}}+{F}_{\mathrm{μ},\mathrm{α}}{C}_{\mathrm{α},\mathrm{ρ}}$
 ${{C}}_{{\mathrm{\alpha }}{,}{\mathrm{\rho }}}{}{{F}}_{{\mathrm{\mu }}\phantom{{\mathrm{\alpha }}}}^{\phantom{{\mathrm{\mu }}}{\mathrm{\alpha }}}{+}{{C}}_{{\mathrm{\nu }}{,}{\mathrm{\rho }}}{}{{F}}_{{\mathrm{\mu }}\phantom{{\mathrm{\nu }}}}^{\phantom{{\mathrm{\mu }}}{\mathrm{\nu }}}$ (39)
 > $\mathrm{Check}\left(,\mathrm{indices},\mathrm{all}\right)$
 $\mathrm{The repeated indices per term are:}\left[\left\{\mathrm{...}\right\}{,}\left\{\mathrm{...}\right\}{,}\mathrm{...}\right]\mathrm{, the free indices are:}\left\{\mathrm{...}\right\}$
 $\left[\left\{{\mathrm{\alpha }}\right\}{,}\left\{{\mathrm{\nu }}\right\}\right]{,}\left\{{\mathrm{\mu }}{,}{\mathrm{\rho }}\right\}$ (40)
 > $\mathrm{Simplify}\left(\right)$
 ${2}{}{{C}}_{{\mathrm{\alpha }}{,}{\mathrm{\rho }}}{}{{F}}_{{\mathrm{\mu }}\phantom{{\mathrm{\alpha }}}}^{\phantom{{\mathrm{\mu }}}{\mathrm{\alpha }}}$ (41)
 The following example would be a little trickier to tell.
 > $\mathrm{Define}\left({A}_{\mathrm{μ}},{C}_{\mathrm{μ}},'\mathrm{redo}','\mathrm{quiet}'\right)$
 $\left\{{{A}}_{{\mathrm{\mu }}}{,}{{B}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{C}}_{{\mathrm{\mu }}}{,}{{\mathrm{\gamma }}}_{{\mathrm{\mu }}}{,}{{F}}_{{\mathrm{\mu }}\phantom{{\mathrm{\alpha }}}}^{\phantom{{\mathrm{\mu }}}{\mathrm{\alpha }}}{,}{{\mathrm{\sigma }}}_{{\mathrm{\mu }}}{,}{{\partial }}_{{\mathrm{\mu }}}{,}{{g}}_{{\mathrm{\mu }}{,}{\mathrm{\nu }}}{,}{{q}}_{{\mathrm{\nu }}}{,}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}\right\}$ (42)
 > $\mathrm{Define}\left(\mathrm{query},A,C\right)$
 ${\mathrm{Tensors structured as}}\left[{\mathrm{name}}{,}{\mathrm{indices}}{,}{\mathrm{variables}}\right]{:}$
 $\left[{A}{,}\left[{1}{,}{0}{,}{0}\right]{,}{0}\right]{,}\left[{C}{,}\left[{1}{,}{0}{,}{0}\right]{,}{0}\right]$ (43)
 > ${\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{σ}}{\mathrm{LeviCivita}}_{\mathrm{ν},\mathrm{μ},\mathrm{α},\mathrm{β}}\left({A}_{\mathrm{β}}{C}_{\mathrm{σ}}-{A}_{\mathrm{σ}}{C}_{\mathrm{β}}\right)$
 $\left({{A}}_{{\mathrm{\beta }}}{}{{C}}_{{\mathrm{\sigma }}}{-}{{A}}_{{\mathrm{\sigma }}}{}{{C}}_{{\mathrm{\beta }}}\right){}{{\mathrm{\epsilon }}}_{{\mathrm{\alpha }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}\phantom{{\mathrm{\sigma }}}}^{\phantom{{\mathrm{\alpha }}}\phantom{{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}{\mathrm{\sigma }}}{}{{\mathrm{\epsilon }}}_{\phantom{{}}\phantom{{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}}^{\phantom{{}}{\mathrm{\alpha }}{,}{\mathrm{\beta }}{,}{\mathrm{\mu }}{,}{\mathrm{\nu }}}$ (44)
 > $\mathrm{Simplify}\left(\right)$
 ${0}$ (45)

Sums, KroneckerDelta, and Projectors

 Expressions involving sums with KroneckerDelta indices contracted or with Projectors in the summand, and integrals involving Dirac functions, are simplifiable by using Simplify.
 Consider a basis, labeled $A$, whose dimension is $M+1$.
 > $\mathrm{Setup}\left(\mathrm{basisdim}=\left\{A=0..M\right\}\right)$
 $\mathrm{* Partial match of \text{'}}\mathrm{basisdim}\mathrm{\text{'} against keyword \text{'}}\mathrm{quantumbasisdimension}\text{'}$
 $\mathrm{_______________________________________________________}$
 $\left[{\mathrm{quantumbasisdimension}}{=}\left\{{A}{=}{0}{..}{M}\right\}\right]$ (46)
 The projector onto this basis is:
 > $\mathrm{Projector}\left(\mathrm{Ket}\left(A,j\right)\right)$
 ${\sum }_{{j}{=}{0}}^{{M}}{}{\mathrm{Ket}}{}\left({A}{,}{j}\right){}{\mathrm{Bra}}{}$