Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From CombinatorialPolyhedron and H-representation to Polyhedron (with double description) #31799

Open
mkoeppe opened this issue May 9, 2021 · 19 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented May 9, 2021

Given an (abstract) CombinatorialPolyhedron such that at least one of H-representation and V-representation are labeled geometrically, the new method CombinatorialPolyhedron.as_polyhedron constructs a geometric polyhedron.

If check=True (default), it checks that the result is OK.

We should be able to efficiently build a polyhedron, avoiding to run the double description method when setting up the polyhedron, for the backends that accept double description input:

Ideally, an optional argument allow_degeneration would allow that the given representation data actually gives a degeneration of the given combinatorial polyhedron.

In the context of #31803, this would be a morphism.

Depends on #31823
Depends on #26366

CC: @kliem @yuan-zhou @jplab

Component: geometry

Branch/Commit: u/mkoeppe/from_combinatorialpolyhedron_and_h_representation_to_polyhedron__with_double_description_ @ 789eada

Issue created by migration from https://trac.sagemath.org/ticket/31799

@mkoeppe mkoeppe added this to the sage-9.4 milestone May 9, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@kliem
Copy link
Contributor

kliem commented May 10, 2021

comment:3

It only seems to make sense for those backends that allow initialization from both V-representation and H-representation.

(Normaliz somehow allows precomputed data, but it appears that initializing from precomputed data isn't really an advantage in terms of computation time.)

The method a_maximal_chain can be generalized to allow this. Currently it only gives some maximal chain, but we can easily obtain a maximal chain for each facet. This allows computing a unique inequality for each facet (in the non-degenerate case), given the V-representation. a_maximal_chain also allows obtaining the equations.

Given the H-representation we might as well be lazy and just use CombinatorialPolyhedron.polar for this.

I'm not exactly sure what you mean by allow_degeneration. This is what I think for the case that the V-representation is given:

  • let d be the dimension of the affine hull of the V-representation, either d=0 or for each facet, the corresponding V-representation objects must have affine hull dimension less than d
  • if allow_degeneration=False than d must be the dimension of the CombinatorialPolyhedron and the objects corresponding to the facets must have affine hull dimension d-1 and those affine hulls must be unique for each facet
  • a maximal chain corresponding to a d-1 dimensional affine hull defines a unique inequality, those inequalities are the computed H-representation
  • if allow_degeneration=True the remaining facets must have degenerated to a subset of some proper facet
  • the slack matrix (of the given V-representation and the computed H-representation) must always be non-negative
  • if allow_degeneration=False the incidence matrix (of the given V-representation and the computed H-representation) must be the same as the incidence matrix of the combinatorial polyhedron

It all depends on how much degeneration we allow. Another approach is that allow_degeneration=True only allows facets to collaps. So for any face of the combinatorial polyhedron the affine hull dimension of the given V-representation must be as expected.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 10, 2021

comment:4

Replying to @kliem:

It only seems to make sense for those backends that allow initialization from both V-representation and H-representation.

Yes, that's right. For the moment I am fine with just creating polyhedra in the field backend. In fact, my main application will be for parametric polyhedra (where the coefficient field is a ParametricRealField).

(Normaliz somehow allows precomputed data, but it appears that initializing from precomputed data isn't really an advantage in terms of computation time.)

Hopefully at some point this can be improved - but it's not the main direction of this ticket.

The method a_maximal_chain can be generalized to allow this. Currently it only gives some maximal chain, but we can easily obtain a maximal chain for each facet. This allows computing a unique inequality for each facet (in the non-degenerate case), given the V-representation. a_maximal_chain also allows obtaining the equations.

Given the H-representation we might as well be lazy and just use CombinatorialPolyhedron.polar for this.

Sounds great!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 10, 2021

comment:5

Replying to @kliem:

I'm not exactly sure what you mean by allow_degeneration. This is what I think for the case that the V-representation is given: [...]

  • the slack matrix (of the given V-representation and the computed H-representation) must always be non-negative

Yes

  • if allow_degeneration=False the incidence matrix (of the given V-representation and the computed H-representation) must be the same as the incidence matrix of the combinatorial polyhedron

Yes, and for allow_degeneration=True, we would just drop this requirement, I think.

It all depends on how much degeneration we allow.

Let's consider the generalized permutahedron as a model. I would like to include its degenerations in full generality.

A related question is how to do recognize degenerations on the level of abstract combinatorial polyhedra (without coordinates). Given two (abstract) combinatorial polyhedra P, Q and a map sending vertices to vertices, can we detect whether Q is a degeneration of P? I don't know how to check this without coordinates.

@kliem
Copy link
Contributor

kliem commented May 10, 2021

comment:6

In light of #31801 we should probably add an optional argument verify with default True.

@kliem
Copy link
Contributor

kliem commented May 10, 2021

comment:7

Replying to @mkoeppe:

[...]

A related question is how to do recognize degenerations on the level of abstract combinatorial polyhedra (without coordinates). Given two (abstract) combinatorial polyhedra P, Q and a map sending vertices to vertices, can we detect whether Q is a degeneration of P? I don't know how to check this without coordinates.

Ah, ok. From my intuition (which might be wrong as well), the following happens at a degeneration map:

  • There exists a list of disjoint faces, which get contracted (so only one vertex remains for each of those faces).
  • First step is to contract the vertices according to the map and apply a bitwise OR to the (old) coatom incidences.
  • The new coatoms are the inclusion maximal coatoms.
  • Each old coatom should still define a face (I think this holds automatically).

What needs to be checked:

  • Whether each equivalence class of vertices corresponds to a face (compute the join of those atoms).

If this is correct, this ticket should depend on #29683.

We also need to check that the incidence matrix is correct then, which is quite obvious of course (probably best to check this via the bipartite digraph isomorphism of the vertex-facet graph).

Do we allow degenerations that might be obtained by iteratively degenerating? Might be a bit harder to check.

@kliem
Copy link
Contributor

kliem commented May 12, 2021

Dependencies: #31823

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 12, 2021

comment:9

As for designing the interface, I would like to introduce a method CombinatorialPolyhedra.hom to construct the morphism
(as you suggest, with a verify (or check?) keyword argument)

@kliem
Copy link
Contributor

kliem commented May 12, 2021

comment:10

Should be a check keyword according to git grep. verify is used (almost) exclusively for sage_input.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 12, 2021

comment:11

So something like this:

class CombinatorialPolyhedra(UniqueRepresentation, Parent):
    ...
    def hom(self, Vrep_dict, codomain=None, check=True, category=None):

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 12, 2021

comment:12

... it should return an instance of a class similar to SimplicialComplexMorphism

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 14, 2021

comment:13

A skeleton of the classes to implement morphisms is now on #31803.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 26, 2021

Changed dependencies from #31823 to #31823, #26366

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 26, 2021

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 26, 2021

Commit: 789eada

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 26, 2021

New commits:

05fef94src/sage/geometry/polyhedron/constructor.py: Add more constructors
624ec2bMerge #26366
789eadaCombinatorialPolyhedron.as_polyhedron: New

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Jul 19, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 14, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 Apr 2, 2022
@mkoeppe mkoeppe removed this from the sage-9.7 milestone Aug 31, 2022
@mkoeppe mkoeppe added this to the sage-9.8 milestone Aug 31, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.8, sage-9.9 Jan 7, 2023
@mkoeppe mkoeppe modified the milestones: sage-10.0, sage-10.1 Apr 30, 2023
@mkoeppe mkoeppe removed this from the sage-10.1 milestone Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants