]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
cone/faces.py: test the relationship between dual_face and face_generated_by.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 03:42:28 +0000 (23:42 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 04:43:11 +0000 (00:43 -0400)
mjo/cone/faces.py

index a6820164999e55d6396d5d1b081419e57f5c791b..ee16890dd6234cd0003cc0e8e9448674668386f5 100644 (file)
@@ -149,7 +149,7 @@ def dual_face(K,F):
 
     SETUP::
 
-        sage: from mjo.cone.faces import dual_face
+        sage: from mjo.cone.faces import (dual_face, face_generated_by)
 
     EXAMPLES:
 
@@ -189,6 +189,19 @@ def dual_face(K,F):
         sage: dual_face(K,trivial_face).is_equivalent(K.dual())
         True
 
+    The dual of the cone of ``K`` at ``y`` is the dual face of the face
+    of ``K`` generated by ``y`` ([Tam]_ Corollary 3.2)::
+
+        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: points_cone.dual().is_equivalent(dual_face(K, phi_y))
+        True
+
     """
     # Ensure that F is actually a face of K before continuing.
     if not F.is_face_of(K):