def __init__(self, ring, algebra1, algebra2, side1, side2): '''Specifies the algebras and sides of the type DA action''' FreeModule.__init__(self, ring) assert isinstance(algebra1, DGAlgebra) assert isinstance(algebra2, DGAlgebra) self.algebra1 = algebra1 self.side = side1 self.algebra2 = algebra2 self.side2 = side2
def __init__(self, ring, algebra, side): """Specifies the algebra and side of the type D action.""" FreeModule.__init__(self, ring) assert isinstance(algebra, DGAlgebra) self.algebra = algebra self.side = side # Construct A tensor M. Add diff and the left action of A on this # tensor product. self.AtensorM = Tensor((algebra, self)) def _mul_A_AtensorM((AGen, MGen), ACoeff): """To be used as rmultiply() in AtensorM. Multiply ACoeff with AGen. """ return (ACoeff * AGen) * MGen
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)
def __init__(self, ring, algebra, side): '''Specifies the algebra and the side of D action''' FreeModule.__init__(self, ring, algebra, side) assert isinstance(algebra, DGAlgebra) self.algebra = algebra self.side = side # left # Construct A tensor M ( A is A(dLT), M is CT(T) for our case) # tensor product # tuple remove def _mul_A_AtensorM(AGenMGen, ACoeff): '''To be used as rmultiply() in AtensorM. Multiply ACoeff with AGen. `AGenMGen` is a tuple of (AGen, MGen),''' AGen, MGen = AGenMGen return (ACoeff * AGen) * MGen def _diff_AtensorM(AGenMGen): '''To be used as diff() in AtensorM. AGenMGen` is a tuple of (AGen, MGen)''' AGen, MGen = AGenMGen return (AGen.diff() * MGen) + (AGen * MGen.delta()) self.AtensorM.rmultiply = _mul_A_AtensorM # store the functions self.AtensorM.diff = _diff_AtensorM