Skip to content

Commit

Permalink
Trac #22275: Implement duality of faces for reflexive polytopes
Browse files Browse the repository at this point in the history
It was "secretly" implemented in the old code removed in #22122 by order
of faces and while it was not documented in Sage, it was dissipated in
some worksheets and papers.

URL: https://trac.sagemath.org/22275
Reported by: novoselt
Ticket author(s): Andrey Novoseltsev
Reviewer(s): Julian Rüth
  • Loading branch information
Release Manager authored and vbraun committed Feb 2, 2017
2 parents 6bc1a2d + 4109827 commit 48a6610
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/sage/geometry/lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,36 @@ def distances(self, point=None):
self._distances.set_immutable()
return self._distances

@cached_method
def dual(self):
r"""
Return the dual face under face duality of polar reflexive polytopes.
This duality extends the correspondence between vertices and facets.
OUTPUT:
- a :class:`lattice polytope <LatticePolytopeClass>`.
EXAMPLES::
sage: o = lattice_polytope.cross_polytope(4)
sage: e = o.edges()[0]; e
1-d face of 4-d reflexive polytope in 4-d lattice M
sage: ed = e.dual(); ed
2-d face of 4-d reflexive polytope in 4-d lattice N
sage: ed.ambient() is e.ambient().polar()
True
sage: e.ambient_vertex_indices() == ed.ambient_facet_indices()
True
sage: e.ambient_facet_indices() == ed.ambient_vertex_indices()
True
"""
for f in self._ambient.polar().faces(codim=self.dim() + 1):
if f._ambient_vertex_indices == self._ambient_facet_indices:
f.dual.set_cache(self)
return f

@cached_method
def dual_lattice(self):
r"""
Expand Down

0 comments on commit 48a6610

Please sign in to comment.