Opened 19 months ago
Last modified 3 months ago
#31803 new enhancement
Make CombinatorialPolyhedron an element class, define morphisms of combinatorial polyhedral sets
Reported by:  Matthias Köppe  Owned by:  

Priority:  major  Milestone:  sage9.8 
Component:  geometry  Keywords:  
Cc:  ghkliem, JeanPhilippe Labbé, Travis Scrimshaw, John Palmieri, Yuan Zhou  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/mkoeppe/make_combinatorialpolyhedron_an_element_class (Commits, GitHub, GitLab)  Commit:  0a15b4693842ef7d10595401a6bee180947fbd1a 
Dependencies:  Stopgaps: 
Description (last modified by )
... of a parent class CombinatorialPolyhedra
in a new category of CombinatorialPolyhedralSets
. A parent is defined by (possibly infinite) sets of allowed vertices and facets; every element's set of vertices and facets is a subset of these.
Morphisms in the category:
 permutations of the Vrep
 permutations of the Hrep
 relabelings of the Vrep
 relabelings of the Hrep
 degenerations.
This setup of element/parent/category is parallel to geometric polyhedra: Polyhedron
/Polyhedra
/PolyhedralSets
.
Assigning coordinates in QQ^3
to labeled vertices
then defines a morphism from CombinatorialPolyhedra(vertices, facets)
to Polyhedra(QQ, 3)
.
Change History (25)
comment:1 Changed 19 months ago by
Branch:  → u/mkoeppe/make_combinatorialpolyhedron_an_element_class 

comment:2 Changed 19 months ago by
Commit:  → 60f3ddb2d7e9570efb50c71074c326aa9eea6c5c 

comment:3 Changed 19 months ago by
Commit:  60f3ddb2d7e9570efb50c71074c326aa9eea6c5c → 4380cd09bdda4b28b797b83d82d3e45eb751d49b 

Branch pushed to git repo; I updated commit sha1. New commits:
4380cd0  src/sage/geometry/polyhedron/combinatorial_polyhedron/parent.py: Add missing imports

comment:4 Changed 19 months ago by
Commit:  4380cd09bdda4b28b797b83d82d3e45eb751d49b → 80026c213daedc6c28715df6a673f84701d110e0 

comment:5 Changed 19 months ago by
Commit:  80026c213daedc6c28715df6a673f84701d110e0 → f8307daa00f8386eba6eb2c16ee27125ab52592a 

Branch pushed to git repo; I updated commit sha1. New commits:
f8307da  CombinatorialPolyhedra: Use the category CombinatorialPolyhedralSets()

comment:6 Changed 19 months ago by
Authors:  → Matthias Koeppe 

Here's a beginning, without adding anything useful yet.
comment:7 Changed 19 months ago by
Cc:  Travis Scrimshaw added 

comment:8 Changed 19 months ago by
Thanks for taking care of this.
I have no experience with categories and what is best practice there. But I think it makes sense to mention my ideas/plans for this module so they can be considered if they need to.
Status quo (from my point of view):
CombinatorialPolyhedron
is mainly a wrapper around FaceIterator
. To make it complete, there is also PolyhedronFaceLattice
which collects all faces from the FaceIterator
and calculates all the cover relations.
FaceIterator
works for simplicial complexes and for the intersection lattice of reflection groups of a root system (as in ReflectionGroup(['E',6])
).
Plans, Ideas:
 #31245 uses the
FaceIterator
in parallel for the fvector. This parallel approach is applicable to other problems.  Now that we use
data_structures/bitset
the underlying bitsets are much easier to handle. This allows doing polyhedral constructions just on the combinatorial polyhedron (and trusting bitsets to do the right thing instead of rethinking everything).  Eventually some of the code should be moved to a more generic place in sage. Probably it makes sense to have
CombinatorialPolyhedron
inherit from a more generic interface toFaceIterator
. (I'm currently waiting for #31245). Then simplicial complexes and reflection groups should have access to it as well. In the end it is just an iterator that works over lattices with one of the following properties (atomic = all elements are joins of atoms): intervals of length 2 contain at least 2 elements (true for polytopes and true enough for unbounded polyhedra)
 simplicial coatomic lattices (or the dual thing)  a lattice where each interval not containing the upper bound is boolean (true for simplicial complexes and for simplicial polytopes), this iterator is much faster than the previous version
 it would also for atomic and coatomic lattices in general with some minor changes (however, I don't see a use case yet)
 There is still the big agenda that
CombinatorialPolyhedron
should replace all combinatorial things in cones, lattice polytopes and polyhedra. In particular it should deprecatesage/src/sage/geometry/hasse_diagram.py
.
comment:9 Changed 19 months ago by
Thanks a lot for sharing this valuable perspective.
Regarding PolyhedronFaceLattice
, perhaps this could become a parent class in the categories CombinatorialPolyhedralSets
and FiniteLatticePosets
. (Currently you go through making a digraph and calling Poset  perhaps this can be implemented more directly.)
I think most of the other things are orthogonal to this ticket.
comment:10 Changed 19 months ago by
Commit:  f8307daa00f8386eba6eb2c16ee27125ab52592a → c0c7631695706c8a8c8a85f64313360b051223c5 

Branch pushed to git repo; I updated commit sha1. New commits:
c0c7631  sage.geometry.polyhedron.combinatorial_polyhedron.{homset,morphism}: New

comment:11 Changed 19 months ago by
Summary:  Make CombinatorialPolyhedron an element class → Make CombinatorialPolyhedron an element class, define morphisms of combinatorial polyhedral sets 

comment:12 Changed 19 months ago by
Missing: The actual implementation of the morphism (CombinatorialPolyhedraMorphism.__call__
method).
comment:13 Changed 19 months ago by
Dependencies:  → #30469 

comment:14 Changed 19 months ago by
Dependencies:  #30469 → #30469, #31821 

comment:15 Changed 19 months ago by
Commit:  c0c7631695706c8a8c8a85f64313360b051223c5 → 25f7e34b64e7f17d9f2f0b77978f0e0006fd3e4d 

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
3896c32  fix naming and fix a doctest

82db408  reintroduce spaces to fix merge conflict

f460b23  improve documentation

479f743  better variable names for documentation

ab9d41e  Merge #30469

79983a9  fix pickling of representation objects with backend normaliz

5e65a5e  add doctest

b285d95  run testsuite on combinatorial polyhedron

db82c83  Merge #31821

25f7e34  CombinatorialPolyhedron: Make it a factory function, rename class to CombinatorialPolyhedron_class

comment:16 Changed 19 months ago by
Commit:  25f7e34b64e7f17d9f2f0b77978f0e0006fd3e4d → 24e2d5d92dc56b770739d5cd93376b0fcfc18218 

Branch pushed to git repo; I updated commit sha1. New commits:
24e2d5d  CombinatorialPolyhedraMorphism: Add example

comment:17 Changed 18 months ago by
Cc:  John Palmieri Yuan Zhou added 

Should SimplicialComplexes
become a subcategory of CombinatorialPolyhedralSets
?
comment:18 Changed 18 months ago by
Commit:  24e2d5d92dc56b770739d5cd93376b0fcfc18218 → df05a1a06f2efdf57760f6eb27ca880ac27fbe1b 

Branch pushed to git repo; I updated commit sha1. New commits:
df05a1a  SimplicialComplexes: Make it a subcategory of CombinatorialPolyhedralSets

comment:19 Changed 18 months ago by
Description:  modified (diff) 

comment:20 Changed 17 months ago by
Milestone:  sage9.4 → sage9.5 

comment:21 Changed 16 months ago by
Commit:  df05a1a06f2efdf57760f6eb27ca880ac27fbe1b → 0a15b4693842ef7d10595401a6bee180947fbd1a 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
f9d15f3  sage.categories.polyhedra (PolyhedralSets): Explain what the parents and elements are

1f1922a  sage.categories.combinatorial_polyhedral_sets: New

6728fdc  CombinatorialPolyhedra: New parent class, use it to make CombinatorialPolyhedron an element class

ced1988  CombinatorialPolyhedralSets: Add element methods dim/dimension, subcategory Finite with parent method dimension

633db6d  PolyhedralSets: Make it a subcategory of CombinatorialPolyhedralSets

c3ccc63  CombinatorialPolyhedra: Use the category CombinatorialPolyhedralSets()

05aa347  sage.geometry.polyhedron.combinatorial_polyhedron.{homset,morphism}: New

0aa274f  CombinatorialPolyhedron: Make it a factory function, rename class to CombinatorialPolyhedron_class

d0243fb  CombinatorialPolyhedraMorphism: Add example

0a15b46  SimplicialComplexes: Make it a subcategory of CombinatorialPolyhedralSets

comment:22 Changed 16 months ago by
Dependencies:  #30469, #31821 

comment:23 Changed 12 months ago by
Milestone:  sage9.5 → sage9.6 

comment:24 Changed 8 months ago by
Milestone:  sage9.6 → sage9.7 

comment:25 Changed 3 months ago by
Milestone:  sage9.7 → sage9.8 

Branch pushed to git repo; I updated commit sha1. New commits:
CombinatorialPolyhedra: New parent class, use it to make CombinatorialPolyhedron an element class