]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
Add more positive operator examples from the paper.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 6 Jan 2016 21:34:25 +0000 (16:34 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 6 Jan 2016 21:34:25 +0000 (16:34 -0500)
mjo/cone/cone.py

index d33a1c5bc317bf7a627f964ca11b78c45045b08a..ae3ec48cddc9700d4f63ae378fc01b178dee6e3b 100644 (file)
@@ -179,12 +179,6 @@ def positive_operator_gens(K):
 
     EXAMPLES:
 
-    The trivial cone in a trivial space has no positive operators::
-
-        sage: K = Cone([], ToricLattice(0))
-        sage: positive_operator_gens(K)
-        []
-
     Positive operators on the nonnegative orthant are nonnegative matrices::
 
         sage: K = Cone([(1,)])
@@ -198,6 +192,27 @@ def positive_operator_gens(K):
         [0 0], [0 0], [1 0], [0 1]
         ]
 
+    The trivial cone in a trivial space has no positive operators::
+
+        sage: K = Cone([], ToricLattice(0))
+        sage: positive_operator_gens(K)
+        []
+
+    Every operator is positive on the trivial cone::
+
+        sage: K = Cone([(0,)])
+        sage: positive_operator_gens(K)
+        [[1], [-1]]
+
+        sage: K = Cone([(0,0)])
+        sage: K.is_trivial()
+        True
+        sage: positive_operator_gens(K)
+        [
+        [1 0]  [-1  0]  [0 1]  [ 0 -1]  [0 0]  [ 0  0]  [0 0]  [ 0  0]
+        [0 0], [ 0  0], [0 0], [ 0  0], [1 0], [-1  0], [0 1], [ 0 -1]
+        ]
+
     Every operator is positive on the ambient vector space::
 
         sage: K = Cone([(1,),(-1,)])
@@ -215,6 +230,16 @@ def positive_operator_gens(K):
         [0 0], [ 0  0], [0 0], [ 0  0], [1 0], [-1  0], [0 1], [ 0 -1]
         ]
 
+    A non-obvious application is to find the positive operators on the
+    right half-plane::
+
+        sage: K = Cone([(1,0),(0,1),(0,-1)])
+        sage: positive_operator_gens(K)
+        [
+        [1 0]  [0 0]  [ 0  0]  [0 0]  [ 0  0]
+        [0 0], [1 0], [-1  0], [0 1], [ 0 -1]
+        ]
+
     TESTS:
 
     Each positive operator generator should send the generators of the