From bcdc6431e034e6f7a9d6ddcb3282cecadfab597b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Nov 2018 20:19:43 -0400 Subject: [PATCH] cone/faces.py: test a lattice join property of face_generated_by(). --- mjo/cone/faces.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mjo/cone/faces.py b/mjo/cone/faces.py index cd15695..70ecc20 100644 --- a/mjo/cone/faces.py +++ b/mjo/cone/faces.py @@ -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])] -- 2.43.2