cover relations of a poset

21 views
Skip to first unread message

Martin R

unread,
Jan 12, 2022, 5:46:50 AM1/12/22
to sage-devel
Currently, the cover relations of a poset are returned as lists:
sage: P = Posets(4)[3]
sage: P.cover_relations()
[[0, 1], [0, 2], [0, 3]]

This seems to be a bad choice, because lists are not hashable, and also somewhat inconsistent, because edges of graphs are returned as tuples.

The same goes for P.relations().

1) Is there a good reason for this choice, or is it just history?
2) Provided that I do the work, is there any chance that a ticket switching to tuples gets a positive review?  A preliminary run shows only trivial doctest failures, that is, [a, b] vs (a, b).

(One non-intrinsic motivation is that it would make some user-visible sagemath code generated by FindStat slightly easier to understand for casual users.)

Martin
Reply all
Reply to author
Forward
0 new messages