]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add orthogonality examples/tests for the Peirce decomposition.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 7 Nov 2020 20:56:08 +0000 (15:56 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 7 Nov 2020 20:56:08 +0000 (15:56 -0500)
mjo/eja/TODO
mjo/eja/eja_algebra.py

index 239f3e45b03a51adf0e772d967d48804f9cddf3a..32e78d4ad277071d4c730c54e0c3db2095741052 100644 (file)
@@ -1,5 +1,3 @@
-0. Add tests for orthogonality in the Peirce decomposition.
-
 1. Add CartesianProductEJA.
 
 2. Check the axioms in the constructor when check != False?
index 9aa40eeacdacbb54c792158b1462d2f36d3dc4d6..ed2e2587282e91d2672cbcbc851d37fcddf7ae74 100644 (file)
@@ -581,6 +581,25 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
             Vector space of degree 6 and dimension 2...
             sage: J1
             Euclidean Jordan algebra of dimension 3...
+            sage: J0.one().natural_representation()
+            [0 0 0]
+            [0 0 0]
+            [0 0 1]
+            sage: orig_df = AA.options.display_format
+            sage: AA.options.display_format = 'radical'
+            sage: J.from_vector(J5.basis()[0]).natural_representation()
+            [          0           0 1/2*sqrt(2)]
+            [          0           0           0]
+            [1/2*sqrt(2)           0           0]
+            sage: J.from_vector(J5.basis()[1]).natural_representation()
+            [          0           0           0]
+            [          0           0 1/2*sqrt(2)]
+            [          0 1/2*sqrt(2)           0]
+            sage: AA.options.display_format = orig_df
+            sage: J1.one().natural_representation()
+            [1 0 0]
+            [0 1 0]
+            [0 0 0]
 
         TESTS:
 
@@ -595,9 +614,10 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
             sage: J1.superalgebra() == J and J1.dimension() == J.dimension()
             True
 
-        The identity elements in the two subalgebras are the
-        projections onto their respective subspaces of the
-        superalgebra's identity element::
+        The decomposition is into eigenspaces, and its components are
+        therefore necessarily orthogonal. Moreover, the identity
+        elements in the two subalgebras are the projections onto their
+        respective subspaces of the superalgebra's identity element::
 
             sage: set_random_seed()
             sage: J = random_eja()
@@ -607,6 +627,16 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
             ....:         x = J.random_element()
             sage: c = x.subalgebra_idempotent()
             sage: J0,J5,J1 = J.peirce_decomposition(c)
+            sage: ipsum = 0
+            sage: for (w,y,z) in zip(J0.basis(), J5.basis(), J1.basis()):
+            ....:     w = w.superalgebra_element()
+            ....:     y = J.from_vector(y)
+            ....:     z = z.superalgebra_element()
+            ....:     ipsum += w.inner_product(y).abs()
+            ....:     ipsum += w.inner_product(z).abs()
+            ....:     ipsum += y.inner_product(z).abs()
+            sage: ipsum
+            0
             sage: J1(c) == J1.one()
             True
             sage: J0(J.one() - c) == J0.one()