[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.14.6.5 Epsilon tensor
The epsilon tensor is totally antisymmetric, its number of indices is equal to the dimension of the index space (the indices must all be of the same numeric dimension), and ‘eps.1.2.3...’ (resp. ‘eps~0~1~2...’) is defined to be 1. Its behavior with indices that have a variance also depends on the signature of the metric. Epsilon tensors are output as ‘eps’.
There are three functions defined to create epsilon tensors in 2, 3 and 4 dimensions:
ex epsilon_tensor(const ex & i1, const ex & i2); ex epsilon_tensor(const ex & i1, const ex & i2, const ex & i3); ex lorentz_eps(const ex & i1, const ex & i2, const ex & i3, const ex & i4, bool pos_sig = false); |
The first two functions create an epsilon tensor in 2 or 3 Euclidean
dimensions, the last function creates an epsilon tensor in a 4-dimensional
Minkowski space (the last bool
argument specifies whether the metric
has negative or positive signature, as in the case of the Minkowski metric
tensor):
{ varidx mu(symbol("mu"), 4), nu(symbol("nu"), 4), rho(symbol("rho"), 4), sig(symbol("sig"), 4), lam(symbol("lam"), 4), bet(symbol("bet"), 4); e = lorentz_eps(mu, nu, rho, sig) * lorentz_eps(mu.toggle_variance(), nu.toggle_variance(), lam, bet); cout << simplify_indexed(e) << endl; // -> 2*eta~bet~rho*eta~sig~lam-2*eta~sig~bet*eta~rho~lam idx i(symbol("i"), 3), j(symbol("j"), 3), k(symbol("k"), 3); symbol A("A"), B("B"); e = epsilon_tensor(i, j, k) * indexed(A, j) * indexed(B, k); cout << simplify_indexed(e) << endl; // -> -B.k*A.j*eps.i.k.j e = epsilon_tensor(i, j, k) * indexed(A, j) * indexed(A, k); cout << simplify_indexed(e) << endl; // -> 0 } |