]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/eja/eja_element.py
eja: don't check the field/axioms in element subalgebras. YOLO.
[sage.d.git] / mjo / eja / eja_element.py
index 660cbb5c2d98d4135d465533a92ddba84720abdd..b5f661bf037667d4d9210b6af65a3c1f95120732 100644 (file)
@@ -910,7 +910,7 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
         M = matrix([(self.parent().one()).to_vector()])
         old_rank = 1
 
-        # Specifying the row-reduction algorithm can e.g.  help over
+        # Specifying the row-reduction algorithm can e.g. help over
         # AA because it avoids the RecursionError that gets thrown
         # when we have to look too hard for a root.
         #
@@ -1403,7 +1403,20 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import random_eja
+            sage: from mjo.eja.eja_algebra import (random_eja,
+            ....:                                  HadamardEJA,
+            ....:                                  RealSymmetricEJA)
+
+        EXAMPLES:
+
+        We can create subalgebras of Cartesian product EJAs that are not
+        themselves Cartesian product EJAs (they're just "regular" EJAs)::
+
+            sage: J1 = HadamardEJA(3)
+            sage: J2 = RealSymmetricEJA(2)
+            sage: J = cartesian_product([J1,J2])
+            sage: J.one().subalgebra_generated_by()
+            Euclidean Jordan algebra of dimension 1 over Algebraic Real Field
 
         TESTS:
 
@@ -1437,7 +1450,11 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
 
         """
         powers = tuple( self**k for k in range(self.degree()) )
-        A = self.parent().subalgebra(powers, associative=True, **kwargs)
+        A = self.parent().subalgebra(powers,
+                                     associative=True,
+                                     check_field=False,
+                                     check_axioms=False,
+                                     **kwargs)
         A.one.set_cache(A(self.parent().one()))
         return A