X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/blobdiff_plain/7941e9e70af9f90f2fce0fd3ea694fc0b422f583..c774b95a5e3c664d7adaeac83aace2b045d38a9f:/examples/squares.py diff --git a/examples/squares.py b/examples/squares.py index 0f4e1a5..d23e636 100755 --- a/examples/squares.py +++ b/examples/squares.py @@ -2,15 +2,15 @@ from pypol import * -x, y = symbols('x y') +a, x, y, z = symbols('a x y z') sq1 = Le(0, x) & Le(x, 2) & Le(0, y) & Le(y, 2) sq2 = Le(2, x) & Le(x, 4) & Le(2, y) & Le(y, 4) - sq3 = Le(0, x) & Le(x, 3) & Le(0, y) & Le(y, 3) sq4 = Le(1, x) & Le(x, 2) & Le(1, y) & Le(y, 2) sq5 = Le(1, x) & Le(x, 2) & Le(1, y) sq6 = Le(1, x) & Le(x, 2) & Le(1, y) & Eq(y, 3) +sq7 = Le(0, x) & Le(x, 2) & Le(0, y) & Eq(z, 2) & Le(a, 3) u = Polyhedron([]) x = sq1 - sq2 @@ -62,4 +62,6 @@ print('is sq5 bounded?', sq5.isbounded()) #unbounded should return False print() print('sq6:', sq6) print('sq6 simplified:', sq6.sample()) +print() +print('sq7 with out constraints involving y and a', sq7.drop_dims('y a'))