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
with⁡Physics:
Setup⁡mathematicalnotation=true
mathematicalnotation=true
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 `-`.
Setup⁡dimension,signature
dimension=4,signature=- - - +
So the trace of the metric g_ is equal to 4.
g_ν,μ2
gμ,ν⁢g⁢μ,ν⁢μ,ν
Simplify⁡
4
The metric is used to 'raise and lower' indices in other tensors, as shown below.
g_ν,μ⁢g_ν,ρ
gμ,ν⁢g_~nu,ρ
gμ,ρ
Define A as an object having tensorial properties; that is, the summation convention for repeated indices in products should be taken into account.
Define⁡A
Defined objects with tensor properties
A,γμ,σμ,∂μ,gμ,ν,εα,β,μ,ν
So the metric can now have indices contracted with A.
g_ν,μ⁢g_ρ,σ⁢Aν,μ,ρ,σ
Aν,μ,ρ,σ⁢g⁢μ,ν⁢μ,ν⁢g⁢ρ,σ⁢ρ,σ
Aννσσννσσ
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.
g_ν,μ⁢LeviCivitaν,μ,σ,ρ
εμ,ν,ρ,σ⁢g⁢μ,ν⁢μ,ν
0
For the same reason, the contraction of any two of the indices of the LeviCivita symbol is also zero.
LeviCivitaν,ν,ρ,σ
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.
Define⁡q
q,Aν,μ,ρ,σ,γμ,σμ,∂μ,gμ,ν,εα,β,μ,ν
LeviCivitaν,μ,σ,ρ⁢qμ⁢qν
εμ,ν,ρ,σ⁢q⁢μ⁢μ⁢q⁢ν⁢ν
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.
Define⁡B,symmetric
B,Aν,μ,ρ,σ,γμ,σμ,∂μ,gμ,ν,qν,εα,β,μ,ν
Define⁡C,antisymmetric
B,C,Aν,μ,ρ,σ,γμ,σμ,∂μ,gμ,ν,qν,εα,β,μ,ν
Bμ,ν⁢LeviCivitaν,μ,σ,ρ
εμ,ν,ρ,σ⁢B⁢μ,ν⁢μ,ν
Define⁡B,query
Totally symmetric tensor, structured as name,indices,variables :
B,2,0,0,0
Cμ,ν⁢g_ν,μ
gμ,ν⁢C⁢μ,ν⁢μ,ν
Define⁡C,query
Totally antisymmetric tensor, structured as name,indices,variables :
C,2,0,0,0
Bμ,ν⁢Cμ,ν
Bμ,ν⁢C⁢μ,ν⁢μ,ν
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.
LeviCivitaν,μ,α,β⁢LeviCivitaμ,σ,ρ,τ
εα,β,μ,ν⁢ε⁢μρ,σ,τ⁢μρ,σ,τ
Check⁡,indices,all
The repeated indices per term are: ...,...,..., the free indices are: ...
μ,α,β,ν,ρ,σ,τ
−gα,ρ⁢gβ,σ+gα,σ⁢gβ,ρ⁢gν,τ−gα,σ⁢gβ,τ⁢gν,ρ+gα,τ⁢gβ,σ⁢gν,ρ−gα,τ⁢gβ,ρ⁢gν,σ+gα,ρ⁢gβ,τ⁢gν,σ
LeviCivitaν,μ,σ,ρ⁢LeviCivitaν,μ,α,β
−εα,β,μ,ν⁢ε⁢μ,νρ,σ⁢μ,νρ,σ
μ,ν,α,β,ρ,σ
2⁢gα,ρ⁢gβ,σ−2⁢gα,σ⁢gβ,ρ
LeviCivitaν,μ,α,σ⁢LeviCivitaν,μ,α,β
εα,μ,ν,σ⁢ε⁢αβμ,ν⁢αβμ,ν
α,μ,ν,β,σ
−6⁢gβ,σ
LeviCivitaν,μ,α,β2
εα,β,μ,ν⁢ε⁢α,β,μ,ν⁢α,β,μ,ν
α,β,μ,ν,∅
−24
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.
Define⁡F,'quiet'
F,Aν,μ,ρ,σ,Bμ,ν,Cμ,ν,γμ,σμ,∂μ,gμ,ν,qν,εα,β,μ,ν
Fμ,ν⁢Cν,ρ+Fμ,α⁢Cα,ρ
Cα,ρ⁢Fμαμα+Cν,ρ⁢Fμνμν
α,ν,μ,ρ
2⁢Cα,ρ⁢Fμαμα
The following example would be a little trickier to tell.
Define⁡Aμ,Cμ,'redo','quiet'
Aμ,Bμ,ν,Cμ,γμ,Fμαμα,σμ,∂μ,gμ,ν,qν,εα,β,μ,ν
Define⁡query,A,C
Tensors structured as name,indices,variables:
A,1,0,0,0,C,1,0,0,0
LeviCivitaν,μ,α,σ⁢LeviCivitaν,μ,α,β⁢Aβ⁢Cσ−Aσ⁢Cβ
Aβ⁢Cσ−Aσ⁢Cβ⁢εα,μ,νσα,μ,νσ⁢ε⁢α,β,μ,ν⁢α,β,μ,ν
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.
Setup⁡basisdim=A=0..M
* Partial match of 'basisdim' against keyword 'quantumbasisdimension'
_______________________________________________________
quantumbasisdimension=A=0..M
The projector onto this basis is:
Projector⁡Ket⁡A,j
∑j=0M⁡Ket⁡A,