]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add another Cartesian product test.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 21 Feb 2021 23:14:02 +0000 (18:14 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 21 Feb 2021 23:14:02 +0000 (18:14 -0500)
mjo/eja/eja_algebra.py

index a77bb871def9264ac0a82dfea4737b6c2b4411fc..ccc5006f3d79397d81ad98bbf45a7262e36dd6e9 100644 (file)
@@ -2690,7 +2690,8 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
 
     SETUP::
 
-        sage: from mjo.eja.eja_algebra import (CartesianProductEJA,
+        sage: from mjo.eja.eja_algebra import (random_eja,
+        ....:                                  CartesianProductEJA,
         ....:                                  HadamardEJA,
         ....:                                  JordanSpinEJA,
         ....:                                  RealSymmetricEJA)
@@ -2740,6 +2741,19 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
         ...
         ValueError: all factors must share the same base field
 
+    The "cached" Jordan and inner products are the componentwise
+    ones::
+
+        sage: set_random_seed()
+        sage: J1 = random_eja()
+        sage: J2 = random_eja()
+        sage: J = cartesian_product([J1,J2])
+        sage: x,y = J.random_elements(2)
+        sage: x*y == J.cartesian_jordan_product(x,y)
+        True
+        sage: x.inner_product(y) == J.cartesian_inner_product(x,y)
+        True
+
     """
     def __init__(self, modules, **kwargs):
         CombinatorialFreeModule_CartesianProduct.__init__(self,