# Ticket #5134(closed defect: fixed)

Opened 4 years ago

## Polyhedron: conversion from V-form to H-form fails if no extreme point is given

Reported by: Owned by: sbarthelemy mhampton major sage-4.4 geometry mhampton N/A

### Description

Let's consider the first diagonal in R^2 as a polyhedron. It has one extreme point (the origin) and one ray. It can be defined in sage in V-form and converted to H-form as shown

```sage: p1v1r = Polyhedron([[0,0]],[[1,1]])
sage: p1v1r
A Polyhedron with 1 vertex with 1 rays.
sage: p1v1r.ieqs()
[[1, 0, 0], [0, 1, 0]]
sage: p1v1r.linearities()
[[0, -1, 1]]
```

the H-form can be read as

```p1v1r = { (x,y) such that
1 + 0*x + 0*y >= 0 and
1 + 1*x + 0*y >= 0 and
1 - 1*x + 1*y >= 0
```

Sage also allows us to define the polyhedron without the vertex

```sage: p0v1r = Polyhedron([], [[1,1]])
sage: p0v1r
A Polyhedron with 1 vertex.
sage: p0v1r.ieqs()
[]
sage: p0v1r.linearities()
[]
```

However, then

1. the _repr_() text is different
2. the conversion to H-form failed

problem 2 comes from cdd which requires to be given the extreme point. We could fix it by adding the point before calling cdd.

However, from a theorical point of view, I think that it would also make sense to always require at least one vertex:

One can consider the polyhedron as a region of an euclidean space. In such a case, vertices are *points* and rays are * free vectors*. Then one would always require at least one point.

What do you think?

## Change History

### comment:1 Changed 4 years ago by mabshoff

• Milestone set to sage-3.4.1

Please remember to assign a milestone for each ticket opened.

Cheers,

Michael

### comment:2 Changed 4 years ago by mhampton

I think this will be addressed by #7109 once it is done. If a ray is entered without a vertex, the current behavior is to assume that the ray starts at the origin. I think this is reasonable.

### comment:3 Changed 3 years ago by novoselt

• Status changed from new to needs_info
• Report Upstream set to N/A

Should this ticket be closed now that #7109 is merged? Current outputs are different from the ones described here and as I understand now both representations are computed during construction and are always correct.

### comment:4 Changed 3 years ago by mhampton

• Status changed from needs_info to closed
• Resolution set to fixed

Yes, I think it can be closed.

Note: See TracTickets for help on using tickets.