]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/cone/cone.py
Don't check the cones constructed in motzkin_decomposition().
[sage.d.git] / mjo / cone / cone.py
index adba809cf26722f52b0ec75432b2e6068683c3d9..68fd1931e9d7a4a7fdf3a00a5636011c963e58dd 100644 (file)
@@ -135,6 +135,14 @@ def motzkin_decomposition(K):
         sage: S.lineality() == S.dim()
         True
 
+    A strictly convex cone should be equal to its strictly convex component::
+
+        sage: set_random_seed()
+        sage: K = random_cone(max_ambient_dim=8, strictly_convex=True)
+        sage: (P,_) = motzkin_decomposition(K)
+        sage: K.is_equivalent(P)
+        True
+
     The generators of the components are obtained from orthogonal
     projections of the original generators [Stoer-Witzgall]_::
 
@@ -155,11 +163,11 @@ def motzkin_decomposition(K):
     # The lines() method only returns one generator per line. For a true
     # line, we also need a generator pointing in the opposite direction.
     S_gens = [ direction*gen for direction in [1,-1] for gen in K.lines() ]
-    S = Cone(S_gens, K.lattice())
+    S = Cone(S_gens, K.lattice(), check=False)
 
     # Since ``S`` is a subspace, the rays of its dual generate its
     # orthogonal complement.
-    S_perp = Cone(S.dual(), K.lattice())
+    S_perp = Cone(S.dual(), K.lattice(), check=False)
     P = K.intersection(S_perp)
 
     return (P,S)