From: Michael Orlitzky Date: Tue, 30 Jul 2019 04:32:27 +0000 (-0400) Subject: eja: compute a natural basis for subalgebras. X-Git-Url: http://gitweb.michael.orlitzky.com/?p=sage.d.git;a=commitdiff_plain;h=57f22a182c4de750b0a03dac257143e1dca04341 eja: compute a natural basis for subalgebras. --- 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::