On Fri, Jun 12, 2015 at 07:27:51AM -0400, Mark Shimozono wrote: > I'm implementing smash products of AlgebrasWithBasis, > which are tensor products of algebras with not-necessarily-componentwise > product. When the tensor factors are themselves tensor products, > I don't want to use the default tensor product construction, which flattens > tensors (good for linear operations but disastrous for the above purpose).
Yup. > My solution was to allow the tensor product construction to admit a > category suggestion, which is then used to choose a new grouped tensor > implementation or the usual flattened one. > > The smash product only makes sense when the algebras are over the > same base ring. > > Sometimes I want to choose the flattened tensor even when the factors > are all algebras and sometimes of course I want the grouped tensor product. Ok, thanks for the description. We encountered something similar when playing with cartesian products with Vincent. When A and B are modules over different base rings RA and RB (but same base ring category), cartesian_product(A,B) should not be in Modules(Rings()). Currently, the category for the cartesian product is obtained by starting from the meet of the category of A and the category of B; this should be refined to take into account the base rings of A and B. So probably we want some method meet_category_of([A,B,...]) which implements this logic, starting from the parents and not only from their categories. I am not sure: - Where to put such a method (and what its name should be). As a starter, let's take sage.categories.category.meet_category_of. - How to implement it; I guess we can start by doing the usual meet, and then hardcoding the special rule for modules; maybe later we will have other use cases guiding us toward something more general. Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- 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.