From 7dcaaf6002d77f4362a60eed0ac7c610666b693c Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 30 Aug 2019 11:50:57 -0400 Subject: [PATCH] eja: add more tests for the (now-working) spectral_decomposition(). --- mjo/eja/eja_operator.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/mjo/eja/eja_operator.py b/mjo/eja/eja_operator.py index c32ff1e..cc1c5e0 100644 --- a/mjo/eja/eja_operator.py +++ b/mjo/eja/eja_operator.py @@ -443,8 +443,28 @@ class FiniteDimensionalEuclideanJordanAlgebraOperator(Map): sage: x = sum(J.gens()) sage: A = x.subalgebra_generated_by(orthonormalize_basis=True) sage: L0x = A(x).operator() - sage: Ps = [ P*l for (l,P) in L0x.spectral_decomposition() ] - sage: Ps[0] + Ps[1] == L0x + sage: sd = L0x.spectral_decomposition() + sage: l0 = sd[0][0] + sage: l1 = sd[1][0] + sage: P0 = sd[0][1] + sage: P1 = sd[1][1] + sage: P0*l0 + P1*l1 == L0x + True + sage: P0 + P1 == P0^0 # the identity + True + sage: P0^2 == P0 + True + sage: P1^2 == P1 + True + sage: c0 = P0(A.one()) + sage: c1 = P1(A.one()) + sage: c0.inner_product(c1) == 0 + True + sage: c0 + c1 == A.one() + True + sage: c0.is_idempotent() + True + sage: c1.is_idempotent() True """ -- 2.44.2