Nicolas, The current tensor-product-of-algebras code has a "bug"; see doctest example below.
To fix it I want to add features to AlgebrasWithBasis.TensorProducts() and make a new subclass of CombinatorialFreeModule_Tensor (provisionally call it TensorOfAlgebras) which graciously (not hackily) supplies the data requirements to implement the new features. What is the syntax for invocation to create such a class? The call should originate from the general-purpose module-tensoring code, and should be triggered because the category of the things being tensored are algebras. Right now everything goes through tensor products of modules. The current invocation is module[0].__class__.Tensor(self, modules, **keywords) and the implementing class is CombinatorialFreeModule_Tensor, I suppose, because module[0].__class__ is a CombinatorialFreeModule (with-category) and CombinatorialFreeModule_Tensor = CombinatorialFreeModule.Tensor. I am confused because I can't see an obvious way to make a direct lexical link between CombinatorialFreeModule (which will be the concrete class of the algebras being tensored) and my new class, which needs to be called for category reasons. --Mark {{{ def test_tensor_of_algebras(): r""" Make a group algebra A of the symmetric group S3:: sage: W = WeylGroup("A2",prefix="s") sage: r = W.from_reduced_word sage: A = W.algebra(ZZ); A.rename("A") Then make a tensor product algebra B which is isomorphic to A # A as modules, but with a noncomponentwise product:: sage: from sage.combinat.free_module import CombinatorialFreeModule_Tensor sage: class AtA(CombinatorialFreeModule_Tensor): ... def __init__(self): ... CombinatorialFreeModule_Tensor.__init__(self, tuple([A,A]), category=AlgebrasWithBasis(ZZ)) ... def one_basis(self): ... return (A.one_basis(),A.one_basis()) ... def product_on_basis(self, x, y): ... return self.monomial(tuple([x[0]*x[1]*y[0]*(x[1]**(-1)), x[1]*y[1]])) sage: B = AtA(); B A # A sage: b = B.monomial((r([1]),r([2]))); b B[s1] # B[s2] sage: b*b B[s2*s1] # B[1] Now make the supposedly "componentwise" tensor product C of B # B. sage: C = tensor([B,B]); C A # A # A # A sage: bi = C.monomial((r([1]),r([2]), r([]), r([]))); bi B[s1] # B[s2] # B[1] # B[1] Evidently it is constructed as A#A#A#A. Now look at its product:: sage: bi*bi B[1] # B[1] # B[1] # B[1] That is consistent with componentwise multiplication for 4 copies of A, not componentwise for the two copies of B. """ pass }}} -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel. For more options, visit https://groups.google.com/d/optout.