1 | initial version |
If the inequalities are linear (as in your example), you can define a polyhedron P
from them. Then given a new inequality, it also defines a polyhedron Q
(a half space), and ask wether this new polyhedron Q
contains the initial one P
.
You can define polytopes fro inequalities using the Polyhedron(ieqs=...)
syntax, see, for example:
To test that Q
contains P
, you can do:
sage: P.intersection(Q) == P
Note that inequalities have to be large (<=
), not strict (<
). If you absolutely want to test strict inequalities, you can use vertices and test inclusion in the interior, using P.interior_contains
method.