]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/eja/eja_algebra.py
eja: convert back the the starting field after quaternion embedding.
[sage.d.git] / mjo / eja / eja_algebra.py
index e24b34890b48a5605184215af7675624e229d7d8..d1658c2fba1aaf43e1115dee500bfd6b9c3602ac 100644 (file)
@@ -1255,7 +1255,7 @@ class ComplexMatrixEuclideanJordanAlgebra(MatrixEuclideanJordanAlgebra):
         if not n.mod(2).is_zero():
             raise ValueError("the matrix 'M' must be a complex embedding")
 
-        field = M.base_ring() # This should already have sqrt2
+        field = QQ
         R = PolynomialRing(field, 'z')
         z = R.gen()
         F = NumberField(z**2 + 1,'i', embedding=CLF(-1).sqrt())
@@ -1395,7 +1395,7 @@ class ComplexHermitianEJA(ComplexMatrixEuclideanJordanAlgebra, KnownRankEJA):
             True
 
         """
-        R = PolynomialRing(field, 'z')
+        R = PolynomialRing(QQ, 'z')
         z = R.gen()
         F = NumberField(z**2 + 1, 'I', embedding=CLF(-1).sqrt())
         I = F.gen()
@@ -1704,7 +1704,10 @@ class QuaternionHermitianEJA(QuaternionMatrixEuclideanJordanAlgebra,
                     S.append(Sij_J)
                     Sij_K = cls.real_embed(K*Eij - K*Eij.transpose())
                     S.append(Sij_K)
-        return S
+
+        # Since we embedded these, we can drop back to the "field" that we
+        # started with instead of the quaternion algebra "Q".
+        return ( s.change_ring(field) for s in S )
 
 
     def __init__(self, n, field=QQ, **kwargs):