From: Michael Orlitzky Date: Fri, 2 Nov 2018 00:41:49 +0000 (-0400) Subject: cone/faces.py: add test for Proposition 3.1 and Corollary 3.9 in Tam. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=c00b0cce43e8345d88097c74a3421f71e3b45e2b;p=sage.d.git cone/faces.py: add test for Proposition 3.1 and Corollary 3.9 in Tam. --- diff --git a/mjo/cone/faces.py b/mjo/cone/faces.py index 70ecc20..8e5f243 100644 --- a/mjo/cone/faces.py +++ b/mjo/cone/faces.py @@ -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])]