]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
cone/faces.py: add a relative interior test for face_generated_by().
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 00:19:01 +0000 (20:19 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 2 Nov 2018 00:19:01 +0000 (20:19 -0400)
mjo/cone/faces.py

index 9c6cfd4f2fc2a75d3c36ac3bc2b1a78b98938f7e..cd15695b6815bd9348a59835f3d1be255e13ef1f 100644 (file)
@@ -77,6 +77,20 @@ def face_generated_by(K,S):
         sage: all([face_generated_by(K, [r]) == Cone([r]) for r in K])
         True
 
+    For any point ``x`` in ``K`` and any face ``F`` of ``K``, we have
+    that ``x`` is in the relative interior of ``F`` if and only if
+    ``F`` is the face generated by ``x`` [Tam]_::
+
+        sage: set_random_seed()
+        sage: K = random_cone(max_ambient_dim=8, max_rays=10)
+        sage: x = K.random_element()
+        sage: S = [x]
+        sage: F = K.face_lattice().random_element()
+        sage: expected = F.relative_interior_contains(x)
+        sage: actual = (F == face_generated_by(K, S))
+        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])]