Appendix C. SageMath program showing ⌊u ‡ u⌋ 3,4 u ‡ u=detM u
[H] from sage.algebras.clifford_algebra import CliffordAlgebra
from sage.quadratic_forms.quadratic_form import QuadraticForm
from sage.symbolic.ring import SR
from sage.matrix.constructor import Matrix
# Define the quadratic form for GA(3,1) over the Symbolic Ring
Q = QuadraticForm(SR, 4, [-1, 0, 0, 0, 1, 0, 0, 1, 0, 1])
# Initialize the GA(3,1) algebra over the Symbolic Ring
algebra = CliffordAlgebra(Q)
# Define the basis vectors
e0, e1, e2, e3 = algebra.gens()
# Define the scalar variables for each basis element
a = var(’a’)
t, x, y, z = var(’t x y z’)
f01, f02, f03, f12, f23, f13 = var(’f01 f02 f03 f12 f23 f13’)
v, w, q, p = var(’v w q p’)
b = var(’b’)
# Create a general multivector
udegree0=a
udegree1=t*e0+x*e1+y*e2+z*e3
udegree2=f01*e0*e1+f02*e0*e2+f03*e0*e3+f12*e1*e2+f13*e1*e3+f23*e2*e3
udegree3=v*e0*e1*e2+w*e0*e1*e3+q*e0*e2*e3+p*e1*e2*e3
udegree4=b*e0*e1*e2*e3
u=udegree0+udegree1+udegree2+udegree3+udegree4
u2 = u.clifford_conjugate()*u
u2degree0 = sum(x for x in u2.terms() if x.degree() == 0)
u2degree1 = sum(x for x in u2.terms() if x.degree() == 1)
u2degree2 = sum(x for x in u2.terms() if x.degree() == 2)
u2degree3 = sum(x for x in u2.terms() if x.degree() == 3)
u2degree4 = sum(x for x in u2.terms() if x.degree() == 4)
u2conj34 = u2degree0+u2degree1+u2degree2-u2degree3-u2degree4
mdegree0 = a
mdegree1 = t*y0+x*y1+y*y2+z*y3
mdegree2 = f01*y0*y1+f02*y0*y2+f03*y0*y3+f12*y1*y2+f13*y1*y3+f23*y2*y3
mdegree3 = v*y0*y1*y2+w*y0*y1*y3+q*y0*y2*y3+p*y1*y2*y3
mdegree4 = b*y0*y1*y2*y3
m=mdegree0+mdegree1+mdegree2+mdegree3+mdegree4
print(u2conj34*u2 == m.det())
The program outputs
True
showing, by computer assisted symbolic manipulations, that the determinant of the real Majorana representation of a multivector u is equal to the double-copy form: .