X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=d1658c2fba1aaf43e1115dee500bfd6b9c3602ac;hb=f420787bd1cc7bfb467d31b5a1581e985434fb31;hp=3f2127d7df9b811a599ba1da01b7b100ab0a5573;hpb=d875b32c8b9063a501b4387af357bd7a9f21633e;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 3f2127d..d1658c2 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -21,7 +21,6 @@ from sage.rings.number_field.number_field import NumberField, QuadraticField from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.rational_field import QQ from sage.rings.real_lazy import CLF, RLF -from sage.structure.element import is_Matrix from mjo.eja.eja_element import FiniteDimensionalEuclideanJordanAlgebraElement from mjo.eja.eja_utils import _mat2vec @@ -406,8 +405,8 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): EXAMPLES: - Our inner product satisfies the Jordan axiom, which is also - referred to as "associativity" for a symmetric bilinear form:: + Our inner product is "associative," which means the following for + a symmetric bilinear form:: sage: set_random_seed() sage: J = random_eja() @@ -1256,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()) @@ -1396,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() @@ -1705,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):