4.14.6.3 Minkowski metric tensor
The Minkowski metric tensor is a special metric tensor with a constant
matrix representation which is either diag(1, -1, -1, ...) (negative
signature, the default) or diag(-1, 1, 1, ...) (positive signature).
It is created with the function lorentz_g() (although it is output as
‘eta’):
| | {
varidx mu(symbol("mu"), 4);
e = delta_tensor(varidx(0, 4), mu.toggle_variance())
* lorentz_g(mu, varidx(0, 4)); // negative signature
cout << e.simplify_indexed() << endl;
// -> 1
e = delta_tensor(varidx(0, 4), mu.toggle_variance())
* lorentz_g(mu, varidx(0, 4), true); // positive signature
cout << e.simplify_indexed() << endl;
// -> -1
}
|