indexed(B, indexed::antisymmetric, k, l); // GiNaC 0.8.0 had a bug here
result += check_equal_simplify(e, e);
+ e = indexed(A, i, j);
+ result += check_equal(symmetrize(e) + antisymmetrize(e), e);
+ e = indexed(A, indexed::symmetric, i, j, k, l);
+ result += check_equal(symmetrize(e), e);
+ result += check_equal(antisymmetrize(e), 0);
+ e = indexed(A, indexed::antisymmetric, i, j, k, l);
+ result += check_equal(symmetrize(e), 0);
+ result += check_equal(antisymmetrize(e), e);
+
return result;
}
// Lorentz transformation matrix (boost along x axis)
matrix L(4, 4);
- L.set(0, 0, gamma);
- L.set(0, 1, -beta*gamma);
- L.set(1, 0, -beta*gamma);
- L.set(1, 1, gamma);
- L.set(2, 2, 1); L.set(3, 3, 1);
+ L(0, 0) = gamma;
+ L(0, 1) = -beta*gamma;
+ L(1, 0) = -beta*gamma;
+ L(1, 1) = gamma;
+ L(2, 2) = 1; L(3, 3) = 1;
// Electromagnetic field tensor
matrix F(4, 4, lst(
0, -Ex, -Ey, -Ez,
Ex, 0, -Bz, By,
Ey, Bz, 0, -Bx,
- Ez, -By, Bx // 0
+ Ez, -By, Bx, 0
));
// Indices