id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
29127 Implement an affine basis for polytopes gh-kliem "Sometimes it is useful to obtain `dim + 1` vertices of a polytope in general position -- an affine basis.
With #29117, which provides a maximal chain of faces, we can easily obtain those vertices that are even guaranteed to be in general position for any realization of the polytope.
We apply this affine basis to simplify `is_inscribed`. This is also faster, as the current approach requires to compute all neighbors of a vertex (which can be pretty hard, even once this is done efficiently through combinatorial polyhedron):
Time without this ticket:
{{{
sage: P = polytopes.hypercube(8)
sage: %time P.is_inscribed()
CPU times: user 17.5 s, sys: 32.4 ms, total: 17.5 s
Wall time: 17.5 s
True
}}}
Time with this ticket:
{{{
sage: P = polytopes.hypercube(8)
sage: %time P.is_inscribed()
CPU times: user 17.5 ms, sys: 10 µs, total: 17.5 ms
Wall time: 17.4 ms
True
}}}
While we are at it, we fix a bug for the empty polyhedron, so that `a_maximal_chain` returns just a list of one empty face, instead of two.
Follow ups:
- We use this to fix #29116.
- We implement `is_affinely_isomorphic`." enhancement closed major sage-9.1 geometry fixed polytopes, affine basis jipilab gh-LaisRast Jonathan Kliem Laith Rastanawi N/A ba31a5e505bb23ca2de502250bcc98352b66446b ba31a5e505bb23ca2de502250bcc98352b66446b #29117