id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
28850,Polar of polytopes does not check if polytope is full-dimensional,gh-kliem,,"Currently, the polar of rational polyhedra does not check, whether the polyhedron is full-dimensional:
{{{
sage: P = polytopes.simplex(3, base_ring=QQ)
sage: P.polar()
A 4-dimensional polyhedron in QQ^4 defined as the convex hull of 4 vertices and 1 line
}}}
We fix this by adding an assertion
{{{
sage: P = polytopes.simplex(3, base_ring=QQ)
sage: P.polar()
Traceback (most recent call last):
...
AssertionError: must be full-dimensional
}}}
Also we add an extra keyword `in_affine_span` (default `False`). By this one can obtain the polar in its affine span (after translation as usual):
{{{
sage: P = polytopes.simplex(3, base_ring=QQ)
sage: P.polar(in_affine_span=True)
A 3-dimensional polyhedron in QQ^4 defined as the convex hull of 4 vertices
sage: point = Polyhedron([[0]])
sage: P = polytopes.cube().change_ring(QQ)
sage: (P*point).polar(in_affine_span=True) == P.polar()*point
True
}}}
This option seems reasonable and simplifies the current construction of barycentric subdivision.
We change the other message `""Not a polytope.""` according to conventions to `""not a polytope""`.",defect,closed,major,sage-9.0,geometry,fixed,"polar, polytopes",jipilab gh-LaisRast,,Jonathan Kliem,Travis Scrimshaw,N/A,,4ee9802afe3ef9e893e95756c980163146dd83fa,4ee9802afe3ef9e893e95756c980163146dd83fa,,