#!/usr/bin/env python3
-from pypol import *
+from linpy import *
a, x, y, z = symbols('a x y z')
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)
+sq6 = Le(1, x) & Le(x, 2) & Le(1, y) & Le(y, 3)
sq7 = Le(0, x) & Le(x, 2) & Le(0, y) & Eq(z, 2) & Le(a, 3)
+p = Le(2*x+1, y) & Le(-2*x-1, y) & Le(y, 1)
+
+
universe = Polyhedron([])
q = sq1 - sq2
e = Empty
print('lexographic min of sq2:', sq2.lexmin()) #test lexmax()
print('lexographic max of sq2:', sq2.lexmax()) #test lexmax()
print()
-print('Polyhedral hull of sq1 + sq2 is:', q.polyhedral_hull()) #test polyhedral hull
+print('Polyhedral hull of sq1 + sq2 is:', q.aspolyhedron()) #test polyhedral hull
print()
print('is sq1 bounded?', sq1.isbounded()) #unbounded should return True
print('is sq5 bounded?', sq5.isbounded()) #unbounded should return False
print('sq6:', sq6)
print('sq6 simplified:', sq6.sample())
print()
-print(universe.project_out([x]))
-print('sq7 with out constraints involving y and a', sq7.project_out([a, z, x, y])) #drops dims that are passed
+print(universe.project([x]))
+print('sq7 with out constraints involving y and a', sq7.project([a, z, x, y])) #drops dims that are passed
print()
print('sq1 has {} parameters'.format(sq1.num_parameters()))
print()
print('does sq1 constraints involve x?', sq1.involves_dims([x]))
+print()
+print('the verticies for s are:', p.vertices())
+print()
+print(p.plot())