]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
cone/faces.py: test a lattice join property of face_generated_by().
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 00:19:43 +0000 (20:19 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 00:19:43 +0000 (20:19 -0400)
mjo/cone/faces.py

index cd15695b6815bd9348a59835f3d1be255e13ef1f..70ecc20d31577d74a59a6d2655d3b93ccc3f710d 100644 (file)
@@ -91,6 +91,20 @@ def face_generated_by(K,S):
         sage: actual == expected
         True
 
+    If ``F`` and ``G`` are two faces of ``K``, then the join of ``F``
+    and ``G`` in the face lattice is equal to the face generated by
+    ``F + G`` (in the Minkowski sense) [Tam]_::
+
+        sage: set_random_seed()
+        sage: K = random_cone(max_ambient_dim=8, max_rays=10)
+        sage: L = K.face_lattice()
+        sage: F = L.random_element()
+        sage: G = L.random_element()
+        sage: expected = L.join(F,G)
+        sage: actual = face_generated_by(K, F.rays() + G.rays())
+        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])]