Hi Nicolas, On 2013-02-25, Nicolas M. Thiery <nicolas.thi...@u-psud.fr> wrote: > On Mon, Feb 25, 2013 at 07:17:57PM +0000, Simon King wrote: >> - Make CombinatorialFreeModule a unique parent, i.e., different prefixes >> will result in distinct and unequal modules (as suggested by Nicolas). >> I mentioned in my previous post that this change will not be trivial, >> but perhaps it is worth it. > > I would indeed much prefer this than having to add extra complexity > everywhere in higher level code like tensor products!
When I made CombinatorialFreeModule inherit from UniqueRepresentation (not only from the new CachedRepresentation), then only very few tests failed (some of them in my coercion tutorial). All of it easy to fix. So, I had a wrong memory about it being complicated. That said: I *could* make it more complicated. Namely, with the new approach, modules that only differ in their prefix will evaluate as "not equal" (which is good, and which fixes the bug presented earlier). But of course, there should still be coercion maps in both directions. In my current (not yet posted) patch, the coercion is missing: sage: G = CombinatorialFreeModule(ZZ, [1,2,3,4], prefix="G") sage: y = CombinatorialFreeModule(ZZ, [1,2,3,4], prefix='y') sage: G.has_coerce_map_from(y) False Hope it isn't too difficult to add. Cheers, Simon -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.