]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: demonstration for https://trac.sagemath.org/ticket/31421.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 22 Feb 2021 13:20:26 +0000 (08:20 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 22 Feb 2021 13:20:26 +0000 (08:20 -0500)
mjo/eja/eja_algebra.py

index ccc5006f3d79397d81ad98bbf45a7262e36dd6e9..e6a60929055fccb28fd86765e7743a028b1904a1 100644 (file)
@@ -2866,8 +2866,11 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
 
         """
         Ji = self.cartesian_factors()[i]
-        # Requires the fix on Trac 31421/31422 to work!
-        Pi = super().cartesian_projection(i)
+
+        # Required until https://trac.sagemath.org/ticket/31421 is fixed.
+        Pi = self.module_morphism(lambda j_t: Ji.monomial(j_t[1])
+                                  if i == j_t[0] else Ji.zero(),
+                                  codomain=Ji)
         return FiniteDimensionalEJAOperator(self,Ji,Pi.matrix())
 
     @cached_method
@@ -2974,8 +2977,9 @@ class CartesianProductEJA(CombinatorialFreeModule_CartesianProduct,
 
         """
         Ji = self.cartesian_factors()[i]
-        # Requires the fix on Trac 31421/31422 to work!
-        Ei = super().cartesian_embedding(i)
+        # Required until https://trac.sagemath.org/ticket/31421 is fixed.
+        Ei = Ji.module_morphism(lambda t: self.monomial((i, t)),
+                                codomain=self)
         return FiniteDimensionalEJAOperator(Ji,self,Ei.matrix())