From: Michael Orlitzky Date: Thu, 29 Aug 2019 23:08:33 +0000 (-0400) Subject: eja: ensure that we can construct RealSymmetricEJA over AA and RR. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=d1e6a3eebe7484d10e75737c57ba3f6e6fd3e0d5;p=sage.d.git eja: ensure that we can construct RealSymmetricEJA over AA and RR. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 3cb7467..5679254 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1020,6 +1020,7 @@ class MatrixEuclideanJordanAlgebra(FiniteDimensionalEuclideanJordanAlgebra): Xu = cls.real_unembed(X) Yu = cls.real_unembed(Y) tr = (Xu*Yu).trace() + if tr in RLF: # It's real already. return tr @@ -1074,6 +1075,14 @@ class RealSymmetricEJA(RealMatrixEuclideanJordanAlgebra, KnownRankEJA): sage: e2*e2 e2 + In theory, our "field" can be any subfield of the reals:: + + sage: RealSymmetricEJA(2, AA) + Euclidean Jordan algebra of dimension 3 over Algebraic Real Field + sage: RealSymmetricEJA(2, RR) + Euclidean Jordan algebra of dimension 3 over Real Field with + 53 bits of precision + TESTS: The dimension of this algebra is `(n^2 + n) / 2`::