Ejemplo n.º 1
0
    def __init__(self, ring, algebra1, algebra2, side1, side2):
        """Specifies the algebras and sides of the type DD action."""
        FreeModule.__init__(self, ring)
        assert isinstance(algebra1, DGAlgebra)
        assert isinstance(algebra2, DGAlgebra)
        self.algebra1 = algebra1
        self.side1 = side1
        self.algebra2 = algebra2
        self.side2 = side2

        # Construct A tensor A tensor M. Add diff and the left action on this
        # tensor product.
        self.AAtensorM = Tensor((algebra1, algebra2, self))
        def _mul_AA_AAtensorM((AGen1, AGen2, MGen), (ACoeff1, ACoeff2)):
            """To be used as rmultiply() in AAtensorM. Multiply ACoeff1 with
            AGen1 and ACoeff2 with AGen2.

            """
            return expandTensor((ACoeff1*AGen1, ACoeff2*AGen2, MGen),
                                 self.AAtensorM)
Ejemplo n.º 2
0
 def _diff_AAtensorM((AGen1, AGen2, MGen)):
     """To be used as diff() in AAtensorM."""
     return expandTensor((AGen1.diff(), AGen2, MGen), self.AAtensorM) \
         + expandTensor((AGen1, AGen2.diff(), MGen), self.AAtensorM) \
         + (AGen1, AGen2) * (MGen.delta())