From 94eadcdcc061b299f5be5bce1450b94bbd7bfa39 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 21 Jun 2019 12:45:37 -0400 Subject: [PATCH] eja: fix field arguments, add comment. --- mjo/eja/euclidean_jordan_algebra.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) -- 2.44.2