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: sage-6.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:

Status badges

Description (last modified by jmantysalo)

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 jmantysalo

Actually it seems that is_graded() is not called at all. I guess it should be deprecated.

comment:2 Changed 7 years ago by jmantysalo

  • Description modified (diff)

comment:3 follow-up: Changed 7 years ago by stumpc5

Some time ago (maybe 2 years), we (a few Sage-Combinat 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 ; follow-up: Changed 7 years ago by jmantysalo

Replying to stumpc5:

Some time ago (maybe 2 years), we (a few Sage-Combinat 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 ; follow-up: Changed 7 years ago by stumpc5

That's good. It has been done on posets.py, but hasse_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 jmantysalo

  • Branch set to u/jmantysalo/documentation_conflict_on_is_graded__

comment:7 in reply to: ↑ 5 Changed 7 years ago by jmantysalo

  • Authors set to Jori Mäntysalo
  • Commit set to d66dffdbb4abbc684fcc771c5c38886a3cbc5849
  • Status changed from new to needs_review

Replying to stumpc5:

You are welcome to do so -- I'll be reviewing it then...

Ok, ok... Here it is.


New commits:

d66dffdDeprecation of is_graded on hasse diagram.

comment:8 follow-up: Changed 7 years ago by stumpc5

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 jmantysalo

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 sage-devel list we discuss about moving code away from hasse_diagram.py.

comment:10 Changed 7 years ago by stumpc5

Okay, sounds reasonable... could you leave one sentence in the documentation saying what this function returns?

comment:11 Changed 7 years ago by git

  • Commit changed from d66dffdbb4abbc684fcc771c5c38886a3cbc5849 to b5d4a968eb151d9d13e257c602eaf32c4d883288

Branch pushed to git repo; I updated commit sha1. New commits:

b5d4a96More docs for is_graded().

comment:12 Changed 7 years ago by stumpc5

  • Status changed from needs_review to positive_review

comment:13 Changed 7 years ago by vbraun

  • Status changed from positive_review to needs_work

reviewer name

comment:14 Changed 7 years ago by stumpc5

  • Reviewers set to Christian Stump
  • Status changed from needs_work to positive_review

comment:15 Changed 7 years ago by vbraun

  • Branch changed from u/jmantysalo/documentation_conflict_on_is_graded__ to b5d4a968eb151d9d13e257c602eaf32c4d883288
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.