From 902a432ed587afef37de6d796fc654b931d6d11b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 7 Nov 2020 15:56:08 -0500 Subject: [PATCH] eja: add orthogonality examples/tests for the Peirce decomposition. --- mjo/eja/TODO | 2 -- mjo/eja/eja_algebra.py | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/mjo/eja/TODO b/mjo/eja/TODO index 239f3e4..32e78d4 100644 --- a/mjo/eja/TODO +++ b/mjo/eja/TODO @@ -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? diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 9aa40ee..ed2e258 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -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() -- 2.43.2