>
> > How can we check that the ground set is totally ordered?
>
> No idea. Furthermore, a set could be "totally ordered" because Python
> compares the elements according to their memory address. That's a
> total order, but totally unreliable as well.
>
There is sort of a way to do this in Python2 by looking to see if there
is a __cmp__, but that is going away in Python3. Also, with how we do
things in Sage (in particular, applying coercion in Element as a default),
this will often not result in a valid check. Note that this is
intrinsically an assumption on the method, not on the class.
>
> > Given such a
> > check, we could simply raise an error if it's not totally ordered, no?
>
> You mean that SetPartition would have a .to_partition method, but that
> this method would only work if some additional assumption is made on
> SetPartition? Honestly I would prefer all SetPartition methods to work
> on all SetPartition instances. Maybe it could be moved to another --
> more specific -- class ?
>
> That would completely over-engineer things, be backwards incompatible, and
would make users hate us. This is why we have exceptions.
> > I'd like to stress that I did not use the method in a findstat context
> (no
> > idea why it would matter though), but rather to test a conjecture. It's
> a
> > entirely natural map. At the very least, the map
> > SetPartition.standard_form() is a classical map in combinatorics, used
> for
> > example in the context of non crossing set partitions.
>
> It is probably well-defined when the ground set consists of integers,
> but that is not an assumption that can be made in this class. Maybe
> what you need in an "IntegerSetPartition" ?
>
> It is well-defined as there is a canonical bijection from the ground set X
to {1, 2, ..., |X|} because of the total ordering. So the result of
to_permutation would just not be a "standard permutation".
Best,
Travis
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.