Opened 7 years ago
Closed 7 years ago
#16998 closed defect (fixed)
Documentation conflict on is_graded()
Reported by:  jmantysalo  Owned by:  

Priority:  minor  Milestone:  sage6.4 
Component:  combinatorics  Keywords:  
Cc:  Merged in:  
Authors:  Jori Mäntysalo  Reviewers:  Christian Stump 
Report Upstream:  N/A  Work issues:  
Branch:  b5d4a96 (Commits, GitHub, GitLab)  Commit:  b5d4a968eb151d9d13e257c602eaf32c4d883288 
Dependencies:  Stopgaps: 
Description (last modified by )
Documentation for is_graded()
on posets.py
says "Note that every graded poset is ranked, but the converse is not true.", whereas hasse_diagram.py
says "A poset is *graded* if it admits a rank function."
Somebody knowing area should check this.
Somehow relating to this: note in is_graded
on posets.py
should be removed, see #13223.
Change History (15)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
 Description modified (diff)
comment:3 followup: ↓ 4 Changed 7 years ago by
Some time ago (maybe 2 years), we (a few SageCombinat people) agreed on the following definitions:
A poset is graded if all maximal chains have the same length.
A poset is ranked if it admits a rank function. A rank function f is a integer valued function on the vertices of a (finite) poset P such that
 f(p) = 0 if p is a minimal element in P, and
 f(q) = f(p)+1 if p \prec q is a cover relation in P.
comment:4 in reply to: ↑ 3 ; followup: ↓ 5 Changed 7 years ago by
Replying to stumpc5:
Some time ago (maybe 2 years), we (a few SageCombinat people) agreed on the following definitions:
That's good. It has been done on posets.py
, but hasse_diagram.py
still contains older(?) definition. Hence it needs correcting.
comment:5 in reply to: ↑ 4 ; followup: ↓ 7 Changed 7 years ago by
That's good. It has been done on
posets.py
, buthasse_diagram.py
still contains older(?) definition. Hence it needs correcting.
You are welcome to do so  I'll be reviewing it then...
comment:6 Changed 7 years ago by
 Branch set to u/jmantysalo/documentation_conflict_on_is_graded__
comment:7 in reply to: ↑ 5 Changed 7 years ago by
 Commit set to d66dffdbb4abbc684fcc771c5c38886a3cbc5849
 Status changed from new to needs_review
comment:8 followup: ↓ 9 Changed 7 years ago by
Why did you decide to deprecate it rather than checking whether the Hasse diagram is graded?
comment:9 in reply to: ↑ 8 Changed 7 years ago by
Replying to stumpc5:
Why did you decide to deprecate it rather than checking whether the Hasse diagram is graded?
What if somebody has really used is_graded()
directly on hasse diagram, expecting it to say True
if the hasse diagram is ranked? Of course nobody should do that, but instead use poset.
And on sagedevel list we discuss about moving code away from hasse_diagram.py
.
comment:10 Changed 7 years ago by
Okay, sounds reasonable... could you leave one sentence in the documentation saying what this function returns?
comment:11 Changed 7 years ago by
 Commit changed from d66dffdbb4abbc684fcc771c5c38886a3cbc5849 to b5d4a968eb151d9d13e257c602eaf32c4d883288
Branch pushed to git repo; I updated commit sha1. New commits:
b5d4a96  More docs for is_graded().

comment:12 Changed 7 years ago by
 Status changed from needs_review to positive_review
comment:14 Changed 7 years ago by
 Reviewers set to Christian Stump
 Status changed from needs_work to positive_review
comment:15 Changed 7 years ago by
 Branch changed from u/jmantysalo/documentation_conflict_on_is_graded__ to b5d4a968eb151d9d13e257c602eaf32c4d883288
 Resolution set to fixed
 Status changed from positive_review to closed
Actually it seems that
is_graded()
is not called at all. I guess it should be deprecated.