From d1e6a3eebe7484d10e75737c57ba3f6e6fd3e0d5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 29 Aug 2019 19:08:33 -0400 Subject: [PATCH] eja: ensure that we can construct RealSymmetricEJA over AA and RR. --- mjo/eja/eja_algebra.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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`:: -- 2.43.2