applies mapping of indices to tensors:
println '{m -> b, n -> a}'.mapping >> 't_mn'.t
> t_baSee Mappings of indices.
collects terms by patterns:
def t = 'A_m*B_n + A_n*C_m'.t println Collect['A_m'.t] >> t
> A_i*(d^i_m*B_n + d^i_n*C_m)See Collect .
collects similar scalar factors in products:
println CollectScalars >> 'A_m*A^m*A_n*A^n'.t
> (A_{m}*A^{m})**2See CollectScalars.
collects terms in sums with same tensorial parts:
println CollectNonScalars >> 'A_m*A^m*A_n + A_n'.t
> (1+A_{m}*A^{m})*A_{n}See CollectNonScalars.
replaces complex numbers in the expression with their complex conjugations:
println Conjugate >> 'a + I*b'.t
> a - I*bSee Conjugate.
gives the denominator of expression:
println Denominator >> '(a + b)/(c + d)'.t
> c + dSee Denominator.
differentiates expressions with respect to specified variables:
println Differentiate['x_a'] >> 'x_a*x^a - Sin[x_a*x^a]'.t
> (2 - 2*Cos[x_{b}*x^{b}])*x^{a}See Differentiate.
simplifies products of gamma matrices:
defineMatrices 'G_a', 'G5', Matrix1.matrix println DiracSimplify >> 'G5*G_a*G5*G_b*G^a*G^b'.t
> -8See DiracSimpllify.
order products of gamma matrices:
defineMatrices 'G_a', 'G5', Matrix1.matrix println DiracOrder >> 'G5*G_c*G_b*G_a'.t
> G_{a}*G_{b}*G_{c}*G5+2*G_{b}*G5*g_{ca}-2*G_{c}*G5*g_{ba}-2*G_{a}*G5*g_{cb}See DiracOrder.
evaluates trace of gamma matrices:
defineMatrices 'G_m', 'G5', Matrix1.matrix println DiracTrace[[Gamma: 'G_m']] >> 'Tr[G_m*G_n]'.t
> 4*g_{mn}See DiracTrace.
removes parts of expressions, which are zero because of the symmetries (symmetric and antisymmetric at the same time):
println EliminateDueSymmetries >> '(A_mn - A_nm)*(A^mn + A^nm)'.t
> 0See EliminateDueSymmetries.
eliminates metric tensors and kronecker deltas:
println EliminateMetrics >> 'g_mn*A^m + d_n^a*B_a'.t
> A_n + B_nSee EliminateMetrics.
expands out product of sums and positive integer powers and permanently eliminates metric and kronecker deltas:
println ExpandAndEliminate >> '(g_mn - A_nm)*(A^mn + g^nm)'.t
> -A^{mn}*A_{nm}+d^{n}_{n}See ExpandAndEliminate.
expands out products and positive integer powers:
println Expand >> '(g_mn - A_nm)*(A^mn + g^nm)'.t
> -A^{mn}*A_{nm}+g^{nm}*g_{mn}See Expand.
expands out all products and integer powers in any part of expression:
println ExpandAll >> '1/((g_mn - A_nm)*(A^mn + g^nm)').t
> 1/(-A^{mn}*A_{nm}+g^{nm}*g_{mn})See ExpandAll.
expands out products and powers that appear in the numerator:
println ExpandDenominator >> '(a + b)**2/(c + d)**2'.t
> (a+b)**2/(c**2+d**2+2*d*c)See ExpandDenominator.
expands out products and powers that appear as numerators:
println ExpandNumerator >> '(a + b)**2/(c + d)**2'.t
> (a**2+2*a*b+b**2)/(c+d)**2See ExpandNumerator.
expands only indexed parts:
println ExpandTensors >> '(a + b)**2*(A_a + B_a)*(A^a + B^a)'.t
> (a+b)**2*A^{a}*A_{a}+2*(a+b)**2*A^{a}*B_{a}+(a+b)**2*B^{a}*B_{a}See ExpandTensors.
symmetrizes expression with respect to all free indices
println FullyAntiSymmetrize >> 'f_abc'.t
> -(1/6)*f_{bac}+(1/6)*f_{bca}+(1/6)*f_{cab}-(1/6)*f_{acb}+(1/6)*f_{abc}-(1/6)*f_{cba}See FullyAntiSymmetrize.
symmetrizes expression with respect to all free indices
println FullySymmetrize >> 'f_abc'.t
> (1/6)*f_{cba}+(1/6)*f_{bca}+(1/6)*f_{abc}+(1/6)*f_{acb}+(1/6)*f_{bac}+(1/6)*f_{cab}See FullySymmetrize.
factors a polynomial over the integers:
println Factor >> 'x**2 - 2*x*y + y**2'.t
> (x - y)**2See Factor.
just identity:
def expr = 'A_mn*(p^m + q^m) + T_n'.t assert Identity >> expr == expr
inverts indices of expression:
println InvertIndices >> 'A_mn*(p^m + q^m) + T_n'.t
> A_m^n*(p^m + q^m) + T^nSee InvertIndices.
simplifies combinations with Levi-Civita tensors:
println LeviCivitaSimplify.minkowski['e_abcd'.t] >> 'e_abcm*e^abcn'.t
> -6*d_{m}^{n}See LeviCivitaSimplify.
gives the numerical value of expression:
println Numeric >> 'Sin[2]'.t
> 0.9092974268256817See Numeric.
expands all powers of products and powers with respect to specified variables:
println PowerExpand >> '(a*b*c)**d'.t
> a**d*b**d*c**dSee PowerExpand.
expands all powers of products and powers with respect to specified variables and unfolds powers of indexed arguments into products:
println PowerUnfold >> '(A_m*A^m)**2'.t
> A_{m}*A^{m}*A_{a}*A^{a}See PowerUnfold.
reverses the order of matrices of specified matrix type:
defineMatrices 'A', 'B', 'C', Matrix1.matrix println Reverse[Matrix1] >> 'A*B*C'.t
> C*B*ASee Reverse.
simplifies Dirac spinors:
defineMatrices 'G_a', 'G5', Matrix1.matrix, 'cu', Matrix1.covector def sSimplify = SpinorsSimplify[[uBar: 'cu', Momentum: 'p_a', Mass: 'm']] println sSimplify >> 'cu*G^a*p_a'.t
> -m*cu*G_{b}+2*cu*p_{b}See SpinorsSimplify.
gives a symmetrization of tensor with respect to specified indices under the specified symmetries:
def indices = '_abc'.si indices.symmetries.setSymmetric() println Symmetrize[indices] >> 't_abc'.t
> (1/6)*(t_{cab} + t_{acb} + t_{bca} + t_{cba} + t_{abc} + t_{bac})See Symmetrize.
puts terms in a sum over a common denominator, and cancels factors in the result:
println Together >> '1/a + 1/b'.t
> (a + b)/(a*b)See Together.
simplifies combinations of unitary matrices and SU(N) structural and $d$-constants
defineMatrices 'T_A', Matrix2.matrix println UnitarySimplify[[Matrix: 'T_A']] >> 'T_A*T^A'.t
> (1/2)*N**(-1)*(N**2-1)See UnitarySimplify.
evaluates trace of unitary matrices:
defineMatrices 'T_A', Matrix2.matrix println UnitaryTrace[[Matrix: 'T_A']] >> 'Tr[T_A*T_B]'.t
> (1/2)*g_{BA}See UnitaryTrace.