Skip to content
Merged
Prev Previous commit
incorporation into catalog of polytopes
  • Loading branch information
fchapoton committed Jan 1, 2026
commit 4c9ba87f818ef0b237a2009bfee8e4ea385e76af
7 changes: 3 additions & 4 deletions src/sage/combinat/posets/sashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,21 @@ def pellytope(n: int) -> Polyhedron:

EXAMPLES::

sage: from sage.combinat.posets.sashes import pellytope
sage: P3 = pellytope(3); P3
sage: P3 = polytopes.pellytope(3); P3
A 3-dimensional polyhedron in ZZ^3 defined as
the convex hull of 12 vertices
sage: P3.f_vector()
(1, 12, 18, 8, 1)

TESTS::

sage: pellytope(0)
sage: polytopes.pellytope(0)
Traceback (most recent call last):
...
ValueError: n must be positive

sage: G = posets.Sashes(3).hasse_diagram().to_undirected()
sage: pellytope(3).graph().is_isomorphic(G)
sage: polytopes.pellytope(3).graph().is_isomorphic(G)
True

REFERENCES:
Expand Down
3 changes: 3 additions & 0 deletions src/sage/geometry/polyhedron/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:meth:`~sage.geometry.polyhedron.library.Polytopes.omnitruncated_six_hundred_cell`
:meth:`~sage.geometry.polyhedron.library.Polytopes.one_hundred_twenty_cell`
:meth:`~sage.geometry.polyhedron.library.Polytopes.parallelotope`
:meth:`~sage.geometry.polyhedron.library.Polytopes.pellytope`
:meth:`~sage.geometry.polyhedron.library.Polytopes.pentakis_dodecahedron`
:meth:`~sage.geometry.polyhedron.library.Polytopes.permutahedron`
:meth:`~sage.geometry.polyhedron.library.Polytopes.generalized_permutahedron`
Expand Down Expand Up @@ -92,6 +93,7 @@
lazy_import('sage.graphs.digraph', 'DiGraph')
lazy_import('sage.graphs.graph', 'Graph')
lazy_import('sage.combinat.root_system.associahedron', 'Associahedron')
lazy_import('sage.combinat.posets.sashes', 'pellytope')


def zero_sum_projection(d, base_ring=None):
Expand Down Expand Up @@ -3548,6 +3550,7 @@ def parallelotope(self, generators, backend=None):
flow_polytope = staticmethod(DiGraph.flow_polytope)
edge_polytope = staticmethod(Graph.edge_polytope)
symmetric_edge_polytope = staticmethod(Graph.symmetric_edge_polytope)
pellytope = staticmethod(pellytope)
except ImportError:
pass

Expand Down
Loading