From 57f22a182c4de750b0a03dac257143e1dca04341 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 30 Jul 2019 00:32:27 -0400 Subject: [PATCH] eja: compute a natural basis for subalgebras. --- mjo/eja/eja_subalgebra.py | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/mjo/eja/eja_subalgebra.py b/mjo/eja/eja_subalgebra.py index 9685def..5ac0a77 100644 --- a/mjo/eja/eja_subalgebra.py +++ b/mjo/eja/eja_subalgebra.py @@ -106,9 +106,8 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide names = normalize_names(W.dimension(), valid_names[name_idx]) cat = superalgebra.category().Associative() - - # TODO: compute this and actually specify it. - natural_basis = None + natural_basis = tuple( b.natural_representation() + for b in superalgebra_basis ) fdeja = super(FiniteDimensionalEuclideanJordanElementSubalgebra, cls) return fdeja.__classcall__(cls, @@ -184,6 +183,26 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide class Element(FiniteDimensionalEuclideanJordanAlgebraElement): + """ + + SETUP:: + + sage: from mjo.eja.eja_algebra import random_eja + + TESTS:: + + The natural representation of an element in the subalgebra is + the same as its natural representation in the superalgebra:: + + sage: set_random_seed() + sage: A = random_eja().random_element().subalgebra_generated_by() + sage: y = A.random_element() + sage: actual = y.natural_representation() + sage: expected = y.superalgebra_element().natural_representation() + sage: actual == expected + True + + """ def __init__(self, A, elt=None): """ SETUP:: -- 2.43.2