]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/eja/eja_algebra.py
eja: fix two more test typos.
[sage.d.git] / mjo / eja / eja_algebra.py
index c1fc8078823eb8915f3caad13d55c8e2f61025bf..ad619f667a853e191f254aa32aaed3664e27f6a5 100644 (file)
@@ -3202,7 +3202,7 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import random_eja()
+            sage: from mjo.eja.eja_algebra import random_eja
 
         TESTS::
 
@@ -3213,6 +3213,7 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
             ....:      ==
             ....:      J.gens()[J._monomial_to_generator(m)]
             ....:      for m in J.basis().keys() )
+            True
 
         """
         # The superclass method indexes into a matrix, so we have to
@@ -3254,7 +3255,7 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
             sage: list(K2.basis())
             [e(0, (0, 0)), e(0, (0, 1)), e(0, (1, 0)), e(0, (1, 1)),
             e(0, (1, 2)), e(1, 0)]
-            sage: sage: g = K2.gens()
+            sage: g = K2.gens()
             sage: (g[0] + 2*g[3]) * (g[1] - 4*g[2])
             e(0, (0, 1)) - 4*e(0, (1, 1))
 
@@ -3525,3 +3526,16 @@ class RationalBasisCartesianProductEJA(CartesianProductEJA,
 RationalBasisEJA.CartesianProduct = RationalBasisCartesianProductEJA
 
 random_eja = ConcreteEJA.random_instance
+
+# def random_eja(*args, **kwargs):
+#     J1 = ConcreteEJA.random_instance(*args, **kwargs)
+
+#     # This might make Cartesian products appear roughly as often as
+#     # any other ConcreteEJA.
+#     if ZZ.random_element(len(ConcreteEJA.__subclasses__()) + 1) == 0:
+#         # Use random_eja() again so we can get more than two factors.
+#         J2 = random_eja(*args, **kwargs)
+#         J = cartesian_product([J1,J2])
+#         return J
+#     else:
+#         return J1