Opened 10 years ago

Closed 10 years ago

#13222 closed defect (fixed)

Fix is_graded for Posets to use appropriate definition

Reported by: Anne Schilling Owned by: Sage Combinat CC user
Priority: major Milestone: sage-5.2
Component: combinatorics Keywords: sd40, posets
Cc: Sage Combinat CC user Merged in: sage-5.2.beta1
Authors: Franco Saliola Reviewers: Anne Schilling
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Anne Schilling)

Fix is_graded to use the following definition a poset is graded if all maximal chains have the same lengths. See Stanley, EC1.

As per this definition, the following poset is not graded:

    sage: P = Poset([[1,2,3,4], [[1,2],[2,4],[3,4]]])
    sage: P.is_graded()
    True

Beware that not everybody agree on this choice of definition for ranked / graded. See http://en.wikipedia.org/wiki/Graded_poset.

See also: #12993 and #13223 for a followup!

Attachments (1)

trac_13222_is_graded_for_posets.patch (3.2 KB) - added by Anne Schilling 10 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by Nicolas M. Thiéry

Description: modified (diff)
Reviewers: Anne Schilling and SD40Anne Schilling, SD40
Summary: Fixing is_graded for PosetsFix is_graded for Posets to use appropriate definition

comment:2 Changed 10 years ago by Nicolas M. Thiéry

Description: modified (diff)

comment:3 Changed 10 years ago by Nicolas M. Thiéry

Description: modified (diff)

comment:4 Changed 10 years ago by Nicolas M. Thiéry

Description: modified (diff)

comment:5 Changed 10 years ago by Anne Schilling

Status: newneeds_review

comment:6 Changed 10 years ago by Anne Schilling

Description: modified (diff)
Keywords: posets added

Changed 10 years ago by Anne Schilling

comment:7 Changed 10 years ago by Anne Schilling

This patch was written and reviewed during the tutorial session lead by Franco Saliola and Anne Schilling during Sage Days 40 with all participants.

Positive review.

comment:8 Changed 10 years ago by Anne Schilling

Status: needs_reviewpositive_review

comment:9 Changed 10 years ago by Anne Schilling

Positive review if all tests pass on Patchbot (only tested all Tests in /combinat/posets).

comment:10 Changed 10 years ago by Jeroen Demeyer

Milestone: sage-5.3sage-5.2
Reviewers: Anne Schilling, SD40Anne Schilling

Not sure whether "SD40" as reviewer makes much sense, mind if I remove it?

comment:11 in reply to:  10 Changed 10 years ago by Anne Schilling

Replying to jdemeyer:

Not sure whether "SD40" as reviewer makes much sense, mind if I remove it?

Sure. We wrote and sort of reviewed the patch during a tutorial at Sage Days 40, so I wanted to give everyone credit for it since many people gave input during the writing and reviewing.

Anne

comment:12 Changed 10 years ago by Jeroen Demeyer

Merged in: sage-5.2.beta1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.