]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/eja/euclidean_jordan_algebra.py: fix field arguments, add comment.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 21 Jun 2019 16:45:37 +0000 (12:45 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 21 Jun 2019 16:45:37 +0000 (12:45 -0400)
mjo/eja/euclidean_jordan_algebra.py

index be281bfb99d0ef86e73fa7d4a2d3643f54d605e3..a0c072bb13bfdac56a3389b4463ed37e7793fafd 100644 (file)
@@ -46,7 +46,11 @@ def eja_rn(dimension, field=QQ):
     # component of x; and likewise for the ith basis element e_i.
     Qs = [ matrix(field, dimension, dimension, lambda k,j: 1*(k == j == i))
            for i in xrange(dimension) ]
-    A = FiniteDimensionalAlgebra(QQ,Qs,assume_associative=True)
+
+    # Assuming associativity is wrong here, but it works to
+    # temporarily trick the Jordan algebra constructor into using the
+    # multiplication table.
+    A = FiniteDimensionalAlgebra(field,Qs,assume_associative=True)
     return JordanAlgebra(A)
 
 
@@ -97,5 +101,8 @@ def eja_ln(dimension, field=QQ):
         Qi[0,0] = Qi[0,0] * ~field(2)
         Qs.append(Qi)
 
-    A = FiniteDimensionalAlgebra(QQ,Qs,assume_associative=True)
+    # Assuming associativity is wrong here, but it works to
+    # temporarily trick the Jordan algebra constructor into using the
+    # multiplication table.
+    A = FiniteDimensionalAlgebra(field,Qs,assume_associative=True)
     return JordanAlgebra(A)