]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add inclusion maps for DirectSumEJA.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 13 Nov 2020 15:23:49 +0000 (10:23 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 13 Nov 2020 15:23:49 +0000 (10:23 -0500)
mjo/eja/eja_algebra.py

index 3f91ee3ae72c6281c9238804f146944d2c431f1e..183e4cb978c233dbac31e321e855978309b27687 100644 (file)
@@ -2399,3 +2399,44 @@ class DirectSumEJA(FiniteDimensionalEuclideanJordanAlgebra):
         pi_left  = lambda x: J1.from_vector(x.to_vector()[:n])
         pi_right = lambda x: J2.from_vector(x.to_vector()[n:])
         return (pi_left, pi_right)
+
+    def inclusions(self):
+        r"""
+        Return the pair of inclusion maps from our factors into us.
+
+        SETUP::
+
+            sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
+            ....:                                  RealSymmetricEJA,
+            ....:                                  DirectSumEJA)
+
+        EXAMPLES::
+
+            sage: J1 = JordanSpinEJA(3)
+            sage: J2 = RealSymmetricEJA(2)
+            sage: J = DirectSumEJA(J1,J2)
+            sage: (iota_left, iota_right) = J.inclusions()
+            sage: iota_left(J1.zero()) == J.zero()
+            True
+            sage: iota_right(J2.zero()) == J.zero()
+            True
+            sage: J1.one().to_vector()
+            (1, 0, 0)
+            sage: iota_left(J1.one()).to_vector()
+            (1, 0, 0, 0, 0, 0)
+            sage: J2.one().to_vector()
+            (1, 0, 1)
+            sage: iota_right(J2.one()).to_vector()
+            (0, 0, 0, 1, 0, 1)
+            sage: J.one().to_vector()
+            (1, 0, 0, 1, 0, 1)
+
+        """
+        (J1,J2) = self.factors()
+        n = J1.dimension()
+        V_basis = self.vector_space().basis()
+        I1 = matrix.column(self.base_ring(), V_basis[:n])
+        I2 = matrix.column(self.base_ring(), V_basis[n:])
+        iota_left = lambda x: self.from_vector(I1*x.to_vector())
+        iota_right = lambda x: self.from_vector(I2*+x.to_vector())
+        return (iota_left, iota_right)