]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: compute a natural basis for subalgebras.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 30 Jul 2019 04:32:27 +0000 (00:32 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 30 Jul 2019 04:32:27 +0000 (00:32 -0400)
mjo/eja/eja_subalgebra.py

index 9685defd95b1fdab00487ee1d719ab225e6812e7..5ac0a77c7a9ab27929f4c3e1d73238d93e1ccd1b 100644 (file)
@@ -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::