]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add more tests for the (now-working) spectral_decomposition().
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 30 Aug 2019 15:50:57 +0000 (11:50 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 30 Aug 2019 15:50:57 +0000 (11:50 -0400)
mjo/eja/eja_operator.py

index c32ff1ed7c2ba0aa87c842e5545f9bf204f43fac..cc1c5e0c4fc401c63628bafa85193fbcd8be470b 100644 (file)
@@ -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
 
         """