Hey John, I'm not quite sure. There are two approaches that come to mind. The first is to implement an analog of CombinatorialFreeModule_Tensor for this setting. Then it is a matter of overriding the Tensor attribute on the classes you want to use for your special tensor multiplication. However, it is a more general construction, i.e., should happen for all superalgebras (with basis), then you should do something in the corresponding TensorCategory by having a default product_on_basis method.
Best, Travis On Monday, September 18, 2017 at 3:26:46 PM UTC-5, John H Palmieri wrote: > > I have a graded algebra A over a field k, and I would like the following > behavior: when I multiply homogeneous elements of the tensor square (A > tensor A), I want signs to appear, as in: > > (a tensor b) (c tensor d) = (-1)^(deg b deg c) (ac tensor bd) > > You could ask for the same when multiplying elements of (A tensor B) for > two graded algebras A and B. This may not be desirable for all graded > algebras in Sage, but it might be useful in more than one case. How should > this be implemented? > > I'm guessing and/or hoping that modifying something in the category code > would help, and that one could appropriately initialize the categories of A > and B to turn this feature on, but I'm confused enough by the category code > that I don't know where to start. Any suggestions? (Or is the category > approach not viable, so something else (and what?) should be done?) > > To illustrate my confusion, if A is the mod 3 Steenrod algebra and if y is > an element in (A tensor A), I don't even know how the multiplication y*y is > defined. Is this category code, coercion, something else? Note that this > example leads to a bug: > > sage: A = SteenrodAlgebra(3) > sage: x = A.Q(0) > sage: x**2 > 0 > > sage: y = x.coproduct() > sage: y**2 > 2*Q_0 # Q_0 > > The coproduct is an algebra map, so if x**2=0, then (x.coproduct())**2 > should also be zero, but it's not. If the signs were dealt with > appropriately, this would be okay, but as it is, we have a bug. > > -- > John > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.