I am not sure, but I believe that this was probably changed in #14140 when SetPartition was changed from a CombinatorialClass to a ClonableArray. It doesn't look like it changed in #15143 but additional changes to the SetPartition class were made there.
It seems like the easiest fix would to write something like a method `to_set_of_sets` or add directly the `intersection` method in the element methods for SetPartition. Both might be useful for other users. -Mike On Monday, 28 October 2013 11:54:41 UTC-4, Vincent Delecroix wrote: > > I forwarded your e-mail to sage-combinat as it might be of interest there. > > Isn't there a problem of Element (a set partition) which want at the > same time to be a Parent here (ie a set) ?I guess it would be > impossible to cleanly solve the issue in the actual state of the > Parent/Element implementation... > > Vincent > > 2013/10/28, Rob Beezer <goo...@beezer.cotse.net <javascript:>>: > > SetPartitions() used to create sets of sets (as of, say January 2013). > > That seems to be broken as most common methods on sets will fail (but > not > > all). Any ideas on a simple fix or a good workaround (or an indication > of > > what I am doing wrong)? I can use the standard_form() method to get a > list > > > > of lists, which I can convert back to sets of sets, but that is very > > unnatural (and the reordering will mean lots of needless editing of a > very > > long string of doctests). > > > > Thanks in advance for any ideas. I can make a trac ticket if that is > > called for. > > > > Rob > > > > sage: S = SetPartitions([1,2,3,4], [2,2]).list() > > sage: S > > [{{1, 2}, {3, 4}}, {{1, 3}, {2, 4}}, {{1, 4}, {2, 3}}] > > > > sage: S[0].cardinality() > > 2 > > > > sage: S[0].intersection(S[1]) > > AttributeError: 'SetPartitions_setparts_with_category.element_class' > object > > > > has no attribute 'intersection' > > > > sage: Set(S[0]) > > TypeError: Element has no defined underlying set > > > > -- > > 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+...@googlegroups.com <javascript:>. > > To post to this group, send email to > > sage-...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/sage-devel. > > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.