On Fri, Jul 11, 2014 at 09:42:11AM -0700, Travis Scrimshaw wrote: > I would say this is like matrices: do you want the iterator for > matrices to iterate by default over all elements or rows? Currently the > iterator goes over all rows and you can call M.list() to get a flat > list of entries. > Actually, this is a question for graded objects in general: should > the default iterator go over each graded component or all elements? I > would say there should be methods for both. My thought is the default > iterator being over graded components since each component might be > infinite, but I don't have a good/strong opinion/reason for this.
Right, though the difference is that containment for a matrix does not have a strong mathematical meaning. On the other hand, when we speak of a parent - that models some mathematical set like an algebra, the notion of containment is unambiguous; it's about the set w.r.t its elements. Furthermore, whenever we model a set in Python by some collection, it's expected that containment and iteration are about the same notion. In particular: sage: all( x in S for x in S ) True So I would find quite unnatural to have: sage: Partitions(4) in Partitions() True On the other hand, sage: Partitions(4) in Partitions().graded_components() or sage: for Pk in Partitions().graded_components() would look natural. So, what shall we do with this "feature" of quiver algebras? 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.