Skip to content

Put equations in stable position for backend cdd #31253

@kliem

Description

@kliem

Currently, equations positions in Hrepresentation of backend cdd depends on the input:

sage: P = polytopes.permutahedron(2, backend='cdd')                                                                                                                                 
sage: P.Hrepresentation()                                                                                                                                                           
(An equation (1, 1) x - 3 == 0,
 An inequality (0, 1) x - 1 >= 0,
 An inequality (1, 0) x - 1 >= 0)
sage: Q = Polyhedron(P.vertices(), backend='cdd')                                                                                                                                   
sage: Q.Hrepresentation()                                                                                                                                                           
(An inequality (-1, 0) x + 2 >= 0,
 An inequality (1, 0) x - 1 >= 0,
 An equation (1, 1) x - 3 == 0)

This leads to the following failure:

sage: [x.ambient_Hrepresentation() for x in P.facets()]                                                                                                                             
[(An inequality (1, 0) x - 1 >= 0, An inequality (0, 1) x - 1 >= 0),
 (An inequality (1, 0) x - 1 >= 0, An equation (1, 1) x - 3 == 0)]

We fix this by putting equations always in the same position.

CC: @jplab @LaisRast @mkoeppe

Component: geometry

Keywords: cdd, combinatorial polyhedron

Author: Jonathan Kliem

Branch/Commit: 1c6c90a

Reviewer: Matthias Koeppe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions