]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
cone/faces.py: add test for Proposition 3.1 and Corollary 3.9 in Tam.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 00:41:49 +0000 (20:41 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 00:41:49 +0000 (20:41 -0400)
mjo/cone/faces.py

index 70ecc20d31577d74a59a6d2655d3b93ccc3f710d..8e5f2436c47802f4e8c61fbb2166f44d7370537d 100644 (file)
@@ -105,6 +105,21 @@ def face_generated_by(K,S):
         sage: actual == expected
         True
 
+    Combining Proposition 3.1 and Corollary 3.9 in [Tam]_ gives the
+    following equality for any ``y`` in ``K``::
+
+        sage: set_random_seed()
+        sage: K = random_cone(max_ambient_dim=8, max_rays=10)
+        sage: y = K.random_element()
+        sage: S = [y]
+        sage: phi_y = face_generated_by(K,S)
+        sage: points_cone_gens = list(K.rays()) + [-z for z in phi_y.rays()]
+        sage: points_cone = Cone(points_cone_gens, K.lattice())
+        sage: actual = phi_y.span(QQ)
+        sage: expected = points_cone.linear_subspace()
+        sage: actual == expected
+        True
+
     """
     face_lattice = K.face_lattice()
     candidates = [F for F in face_lattice if all([F.contains(x) for x in S])]