From: Michael Orlitzky Date: Fri, 21 Jun 2019 16:45:37 +0000 (-0400) Subject: mjo/eja/euclidean_jordan_algebra.py: fix field arguments, add comment. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a960e481ed741822a08672994cf3435b2dd05fd2;p=sage.d.git mjo/eja/euclidean_jordan_algebra.py: fix field arguments, add comment. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index be281bf..a0c072b 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -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)