Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8650 closed defect (fixed)

Extreme faces of Polyhedra are inconsistent

Reported by: Andrey Novoseltsev Owned by: mhampton
Priority: major Milestone: sage-4.4
Component: geometry Keywords:
Cc: Merged in: sage-4.4.alpha0
Authors: Marshall Hampton Reviewers: Andrey Novoseltsev
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Let's look at the first face of each dimension of a polyhedron:

for lset in polytopes.cross_polytope(2).face_lattice().level_sets():
    print lset[0]

The result is

(None, None)
((0,), (1, 2))
((1, 2), (3,))
((0, 1, 2, 3), (0, 1, 2, 3))

where the first tuple (None, None) corresponds to the empty face of the polytope. The first element gives generating vertices of this face (there are None). The second one should give all facets that contain this face. This should be the set of all facets of the polytope, not None. Similarly, for the last face, i.e. the whole polytope, we need to list all vertices belonging to this face (they are correctly listed), and all facets containing the polytope - there should be None.

While it should be easy to fix, I don't quite understand the code of face_lattice, so maybe someone else can do this...

Attachments (2)

trac_8650_patch0.patch (1.3 KB) - added by mhampton 13 years ago.
trac_8650_fix_face_lattice_in_polyhedra.patch (1.8 KB) - added by Andrey Novoseltsev 13 years ago.
Apply this patch only

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by mhampton

Oops. I wrote face_lattice, so this is my fault. Thanks for pointing it out. I think I can fix it pretty soon (hopefully today).

Changed 13 years ago by mhampton

Attachment: trac_8650_patch0.patch added

comment:2 Changed 13 years ago by mhampton

Status: newneeds_review

OK, I think the attached patch corrects things.

Changed 13 years ago by Andrey Novoseltsev

Apply this patch only

comment:3 Changed 13 years ago by Andrey Novoseltsev

Authors: Marshall Hampton
Milestone: sage-4.4
Reviewers: Andrey Novoseltsev
Status: needs_reviewpositive_review

Thank you! I have added the code above to the TESTS section.

comment:4 Changed 13 years ago by John Palmieri

Merged in: sage-4.4.alpha0
Resolution: fixed
Status: positive_reviewclosed

Merged "trac_8650_fix_face_lattice_in_polyhedra.patch" in 4.4.alpha0.

comment:5 Changed 13 years ago by John Palmieri

See #8709 for a followup.

comment:6 Changed 13 years ago by Andrey Novoseltsev

And #8656.

Note: See TracTickets for help on using tickets.