projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add diamond example
[linpy.git]
/
examples
/
diamond.py
diff --git a/examples/diamond.py
b/examples/diamond.py
new file mode 100755
(executable)
index 0000000..
148cdca
--- /dev/null
+++ b/
examples/diamond.py
@@ -0,0
+1,9
@@
+#!/usr/bin/env python3
+
+from pypol import *
+
+x, y = symbols('x y')
+diam = Ge(y, x - 1) & Le(y, x + 1) & Ge(y, -x - 1) & Le(y, -x + 1)
+print('diamond:', diam)
+print('projected on x:', diam.drop_dims('y'))
+