From: Michael Orlitzky Date: Tue, 3 Feb 2026 00:20:18 +0000 (-0500) Subject: mjo/cone/decomposition.py: remove that NOTE X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=sage.d.git mjo/cone/decomposition.py: remove that NOTE I found an example where PPL does not remove the lineal components of the remaining generators. It is now included as a doctest. --- diff --git a/mjo/cone/decomposition.py b/mjo/cone/decomposition.py index d581d83..56005fc 100644 --- a/mjo/cone/decomposition.py +++ b/mjo/cone/decomposition.py @@ -89,15 +89,6 @@ def pointed_linspace_decomposition(K): to the lineality space and its orthogonal complement. This is a direct sum decomposition of the original cone. - .. NOTE:: - - I strongly believe that PPL does this anyway, since it claims to - implement the double-description method from Fukuda and Prodon, - and they mention this. If we're implementing an algorithm in Sage, - it probably suffices to verify that the lineal subset (the - generators that live in the cone's ``linear_subspace()`` is - orthogonal to the remaining generators. - SETUP:: sage: from mjo.cone.decomposition import ( @@ -137,6 +128,31 @@ def pointed_linspace_decomposition(K): N(-1, 0, 0) in 3-d lattice N + Here is an example where PPL does not do this implicitly:: + + sage: K = Cone([(-13, 3, 0, -1), + ....: (11, -1, -1, 0), + ....: (-11, 1, 1, 0)]) + sage: K.lines() + N(11, -1, -1, 0) + in 4-d lattice N + sage: M = K.lattice().dual() + sage: K.ray(0)*M(K.lines()[0].dense_coefficient_list()) + -146 + + But we get it right:: + + sage: P,L = pointed_linspace_decomposition(K) + sage: P.rays() + N(7, 223, -146, -123) + in 4-d lattice N + sage: L.rays() + N( 11, -1, -1, 0), + N(-11, 1, 1, 0) + in 4-d lattice N + sage: P.ray(0)*M(L.ray(0).dense_coefficient_list()) + 0 + TESTS:: sage: K = random_cone(strictly_convex=False) @@ -150,6 +166,7 @@ def pointed_linspace_decomposition(K): sage: J = Cone(P.rays() + L.rays(), lattice=lat) sage: J.is_equivalent(K) True + """ from sage.geometry.cone import Cone