]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/eja/eja_algebra.py
eja: add some more TODO items.
[sage.d.git] / mjo / eja / eja_algebra.py
index c131c5f6b612a6ffcae8e1d3357264e5f016176e..4673e916433509876638cfaeabfba5883c2a0192 100644 (file)
@@ -1263,7 +1263,7 @@ class ComplexMatrixEuclideanJordanAlgebra(MatrixEuclideanJordanAlgebra):
         if not n.mod(2).is_zero():
             raise ValueError("the matrix 'M' must be a complex embedding")
 
-        field = QQ
+        field = M.base_ring() # This should already have sqrt2
         R = PolynomialRing(field, 'z')
         z = R.gen()
         F = NumberField(z**2 + 1,'i', embedding=CLF(-1).sqrt())
@@ -1403,7 +1403,7 @@ class ComplexHermitianEJA(ComplexMatrixEuclideanJordanAlgebra, KnownRankEJA):
             True
 
         """
-        R = PolynomialRing(QQ, 'z')
+        R = PolynomialRing(field, 'z')
         z = R.gen()
         F = NumberField(z**2 + 1, 'I', embedding=CLF(-1).sqrt())
         I = F.gen()
@@ -1540,7 +1540,7 @@ class QuaternionMatrixEuclideanJordanAlgebra(MatrixEuclideanJordanAlgebra):
         if M.ncols() != n:
             raise ValueError("the matrix 'M' must be square")
         if not n.mod(4).is_zero():
-            raise ValueError("the matrix 'M' must be a complex embedding")
+            raise ValueError("the matrix 'M' must be a quaternion embedding")
 
         # Use the base ring of the matrix to ensure that its entries can be
         # multiplied by elements of the quaternion algebra.