Add diamond example
authorVivien Maisonneuve <v.maisonneuve@gmail.com>
Tue, 1 Jul 2014 14:29:15 +0000 (16:29 +0200)
committerVivien Maisonneuve <v.maisonneuve@gmail.com>
Tue, 1 Jul 2014 14:29:21 +0000 (16:29 +0200)
examples/diamond.py [new file with mode: 0755]

diff --git a/examples/diamond.py b/examples/diamond.py
new file mode 100755 (executable)
index 0000000..148cdca
--- /dev/null
@@ -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'))
+