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
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()
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())
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()
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):