]>
gitweb.michael.orlitzky.com - sage.d.git/blob - cone.py
d364a01834a8e1c37e00f8468f5ed7136b7e8408
3 def is_lyapunov_like(L
,K
):
5 Determine whether or not ``L`` is Lyapunov-like on ``K``.
7 We say that ``L`` is Lyapunov-like on ``K`` if `\left\langle
8 L\left\lparenx\right\rparen,s\right\rangle = 0` for all pairs
9 `\left\langle x,s \right\rangle` in the complementarity set of
10 ``K``. It is known [Orlitzky]_ that this property need only be
11 checked for generators of ``K`` and its dual.
13 There are faster ways of checking this property. For example, we
14 could compute a `lyapunov_like_basis` of the cone, and then test
15 whether or not the given matrix is contained in the span of that
16 basis. The value of this function is that it works on symbolic
21 - ``L`` -- A linear transformation or matrix.
23 - ``K`` -- A polyhedral closed convex cone.
27 ``True`` if it can be proven that ``L`` is Lyapunov-like on ``K``,
28 and ``False`` otherwise.
32 If this function returns ``True``, then ``L`` is Lyapunov-like
33 on ``K``. However, if ``False`` is returned, that could mean one
34 of two things. The first is that ``L`` is definitely not
35 Lyapunov-like on ``K``. The second is more of an "I don't know"
36 answer, returned (for example) if we cannot prove that an inner
41 M. Orlitzky. The Lyapunov rank of an improper cone.
42 http://www.optimization-online.org/DB_HTML/2015/10/5135.html
46 The identity is always Lyapunov-like in a nontrivial space::
48 sage: set_random_seed()
49 sage: K = random_cone(min_ambient_dim=1, max_ambient_dim=8)
50 sage: L = identity_matrix(K.lattice_dim())
51 sage: is_lyapunov_like(L,K)
54 As is the "zero" transformation::
56 sage: K = random_cone(min_ambient_dim=1, max_ambient_dim=8)
57 sage: R = K.lattice().vector_space().base_ring()
58 sage: L = zero_matrix(R, K.lattice_dim())
59 sage: is_lyapunov_like(L,K)
62 Everything in ``K.lyapunov_like_basis()`` should be Lyapunov-like
65 sage: K = random_cone(min_ambient_dim=1, max_ambient_dim=6)
66 sage: all([ is_lyapunov_like(L,K) for L in K.lyapunov_like_basis() ])
70 return all([(L
*x
).inner_product(s
) == 0
71 for (x
,s
) in K
.discrete_complementarity_set()])
74 def positive_operator_gens(K1
, K2
= None):
76 Compute generators of the cone of positive operators on this cone. A
77 linear operator on a cone is positive if the image of the cone under
78 the operator is a subset of the cone. This concept can be extended
79 to two cones, where the image of the first cone under a positive
80 operator is a subset of the second cone.
84 - ``K2`` -- (default: ``K1``) the codomain cone; the image of this
85 cone under the returned operators is a subset of ``K2``.
89 A list of `m`-by-``n`` matrices where ``m == K2.lattice_dim()`` and
90 ``n == K1.lattice_dim()``. Each matrix ``P`` in the list should have
91 the property that ``P*x`` is an element of ``K2`` whenever ``x`` is
92 an element of ``K1``. Moreover, any nonnegative linear combination of
93 these matrices shares the same property.
99 Positive and Z-operators on closed convex cones.
103 Some results of polyhedral cones and simplicial cones.
104 Linear and Multilinear Algebra, 4:4 (1977) 281--284.
108 Positive operators on the nonnegative orthant are nonnegative matrices::
110 sage: K = Cone([(1,)])
111 sage: positive_operator_gens(K)
114 sage: K = Cone([(1,0),(0,1)])
115 sage: positive_operator_gens(K)
117 [1 0] [0 1] [0 0] [0 0]
118 [0 0], [0 0], [1 0], [0 1]
121 The trivial cone in a trivial space has no positive operators::
123 sage: K = Cone([], ToricLattice(0))
124 sage: positive_operator_gens(K)
127 Every operator is positive on the trivial cone::
129 sage: K = Cone([(0,)])
130 sage: positive_operator_gens(K)
133 sage: K = Cone([(0,0)])
136 sage: positive_operator_gens(K)
138 [1 0] [-1 0] [0 1] [ 0 -1] [0 0] [ 0 0] [0 0] [ 0 0]
139 [0 0], [ 0 0], [0 0], [ 0 0], [1 0], [-1 0], [0 1], [ 0 -1]
142 Every operator is positive on the ambient vector space::
144 sage: K = Cone([(1,),(-1,)])
145 sage: K.is_full_space()
147 sage: positive_operator_gens(K)
150 sage: K = Cone([(1,0),(-1,0),(0,1),(0,-1)])
151 sage: K.is_full_space()
153 sage: positive_operator_gens(K)
155 [1 0] [-1 0] [0 1] [ 0 -1] [0 0] [ 0 0] [0 0] [ 0 0]
156 [0 0], [ 0 0], [0 0], [ 0 0], [1 0], [-1 0], [0 1], [ 0 -1]
159 A non-obvious application is to find the positive operators on the
162 sage: K = Cone([(1,0),(0,1),(0,-1)])
163 sage: positive_operator_gens(K)
165 [1 0] [0 0] [ 0 0] [0 0] [ 0 0]
166 [0 0], [1 0], [-1 0], [0 1], [ 0 -1]
171 Each positive operator generator should send the generators of one
172 cone into the other cone::
174 sage: set_random_seed()
175 sage: K1 = random_cone(max_ambient_dim=4)
176 sage: K2 = random_cone(max_ambient_dim=4)
177 sage: pi_K1_K2 = positive_operator_gens(K1,K2)
178 sage: all([ K2.contains(P*x) for P in pi_K1_K2 for x in K1 ])
181 Each positive operator generator should send a random element of one
182 cone into the other cone::
184 sage: set_random_seed()
185 sage: K1 = random_cone(max_ambient_dim=4)
186 sage: K2 = random_cone(max_ambient_dim=4)
187 sage: pi_K1_K2 = positive_operator_gens(K1,K2)
188 sage: all([ K2.contains(P*K1.random_element(QQ)) for P in pi_K1_K2 ])
191 A random element of the positive operator cone should send the
192 generators of one cone into the other cone::
194 sage: set_random_seed()
195 sage: K1 = random_cone(max_ambient_dim=4)
196 sage: K2 = random_cone(max_ambient_dim=4)
197 sage: pi_K1_K2 = positive_operator_gens(K1,K2)
198 sage: L = ToricLattice(K1.lattice_dim() * K2.lattice_dim())
199 sage: pi_cone = Cone([ g.list() for g in pi_K1_K2 ],
202 sage: P = matrix(K2.lattice_dim(),
203 ....: K1.lattice_dim(),
204 ....: pi_cone.random_element(QQ).list())
205 sage: all([ K2.contains(P*x) for x in K1 ])
208 A random element of the positive operator cone should send a random
209 element of one cone into the other cone::
211 sage: set_random_seed()
212 sage: K1 = random_cone(max_ambient_dim=4)
213 sage: K2 = random_cone(max_ambient_dim=4)
214 sage: pi_K1_K2 = positive_operator_gens(K1,K2)
215 sage: L = ToricLattice(K1.lattice_dim() * K2.lattice_dim())
216 sage: pi_cone = Cone([ g.list() for g in pi_K1_K2 ],
219 sage: P = matrix(K2.lattice_dim(),
220 ....: K1.lattice_dim(),
221 ....: pi_cone.random_element(QQ).list())
222 sage: K2.contains(P*K1.random_element(ring=QQ))
225 The lineality space of the dual of the cone of positive operators
226 can be computed from the lineality spaces of the cone and its dual::
228 sage: set_random_seed()
229 sage: K = random_cone(max_ambient_dim=4)
230 sage: pi_of_K = positive_operator_gens(K)
231 sage: L = ToricLattice(K.lattice_dim()**2)
232 sage: pi_cone = Cone([ g.list() for g in pi_of_K ],
235 sage: actual = pi_cone.dual().linear_subspace()
236 sage: U1 = [ vector((s.tensor_product(x)).list())
237 ....: for x in K.lines()
238 ....: for s in K.dual() ]
239 sage: U2 = [ vector((s.tensor_product(x)).list())
241 ....: for s in K.dual().lines() ]
242 sage: expected = pi_cone.lattice().vector_space().span(U1 + U2)
243 sage: actual == expected
246 The lineality of the dual of the cone of positive operators
247 is known from its lineality space::
249 sage: set_random_seed()
250 sage: K = random_cone(max_ambient_dim=4)
251 sage: n = K.lattice_dim()
253 sage: l = K.lineality()
254 sage: pi_of_K = positive_operator_gens(K)
255 sage: L = ToricLattice(n**2)
256 sage: pi_cone = Cone([p.list() for p in pi_of_K],
259 sage: actual = pi_cone.dual().lineality()
260 sage: expected = l*(m - l) + m*(n - m)
261 sage: actual == expected
264 The dimension of the cone of positive operators is given by the
265 corollary in my paper::
267 sage: set_random_seed()
268 sage: K = random_cone(max_ambient_dim=4)
269 sage: n = K.lattice_dim()
271 sage: l = K.lineality()
272 sage: pi_of_K = positive_operator_gens(K)
273 sage: L = ToricLattice(n**2)
274 sage: pi_cone = Cone([p.list() for p in pi_of_K],
277 sage: actual = pi_cone.dim()
278 sage: expected = n**2 - l*(m - l) - (n - m)*m
279 sage: actual == expected
282 The trivial cone, full space, and half-plane all give rise to the
283 expected dimensions::
285 sage: n = ZZ.random_element().abs()
286 sage: K = Cone([[0] * n], ToricLattice(n))
289 sage: L = ToricLattice(n^2)
290 sage: pi_of_K = positive_operator_gens(K)
291 sage: pi_cone = Cone([p.list() for p in pi_of_K],
294 sage: actual = pi_cone.dim()
298 sage: K.is_full_space()
300 sage: pi_of_K = positive_operator_gens(K)
301 sage: pi_cone = Cone([p.list() for p in pi_of_K],
304 sage: actual = pi_cone.dim()
307 sage: K = Cone([(1,0),(0,1),(0,-1)])
308 sage: pi_of_K = positive_operator_gens(K)
309 sage: actual = Cone([p.list() for p in pi_of_K], check=False).dim()
313 The lineality of the cone of positive operators follows from the
314 description of its generators::
316 sage: set_random_seed()
317 sage: K = random_cone(max_ambient_dim=4)
318 sage: n = K.lattice_dim()
319 sage: pi_of_K = positive_operator_gens(K)
320 sage: L = ToricLattice(n**2)
321 sage: pi_cone = Cone([p.list() for p in pi_of_K],
324 sage: actual = pi_cone.lineality()
325 sage: expected = n**2 - K.dim()*K.dual().dim()
326 sage: actual == expected
329 The trivial cone, full space, and half-plane all give rise to the
330 expected linealities::
332 sage: n = ZZ.random_element().abs()
333 sage: K = Cone([[0] * n], ToricLattice(n))
336 sage: L = ToricLattice(n^2)
337 sage: pi_of_K = positive_operator_gens(K)
338 sage: pi_cone = Cone([p.list() for p in pi_of_K],
341 sage: actual = pi_cone.lineality()
345 sage: K.is_full_space()
347 sage: pi_of_K = positive_operator_gens(K)
348 sage: pi_cone = Cone([p.list() for p in pi_of_K], lattice=L)
349 sage: pi_cone.lineality() == n^2
351 sage: K = Cone([(1,0),(0,1),(0,-1)])
352 sage: pi_of_K = positive_operator_gens(K)
353 sage: pi_cone = Cone([p.list() for p in pi_of_K], check=False)
354 sage: actual = pi_cone.lineality()
358 A cone is proper if and only if its cone of positive operators
361 sage: set_random_seed()
362 sage: K = random_cone(max_ambient_dim=4)
363 sage: pi_of_K = positive_operator_gens(K)
364 sage: L = ToricLattice(K.lattice_dim()**2)
365 sage: pi_cone = Cone([p.list() for p in pi_of_K],
368 sage: K.is_proper() == pi_cone.is_proper()
371 The positive operators of a permuted cone can be obtained by
374 sage: set_random_seed()
375 sage: K = random_cone(max_ambient_dim=4)
376 sage: L = ToricLattice(K.lattice_dim()**2)
377 sage: p = SymmetricGroup(K.lattice_dim()).random_element().matrix()
378 sage: pK = Cone([ p*k for k in K ], K.lattice(), check=False)
379 sage: pi_of_pK = positive_operator_gens(pK)
380 sage: actual = Cone([t.list() for t in pi_of_pK],
383 sage: pi_of_K = positive_operator_gens(K)
384 sage: expected = Cone([(p*t*p.inverse()).list() for t in pi_of_K],
387 sage: actual.is_equivalent(expected)
390 A transformation is positive on a cone if and only if its adjoint is
391 positive on the dual of that cone::
393 sage: set_random_seed()
394 sage: K = random_cone(max_ambient_dim=4)
395 sage: F = K.lattice().vector_space().base_field()
396 sage: n = K.lattice_dim()
397 sage: L = ToricLattice(n**2)
398 sage: W = VectorSpace(F, n**2)
399 sage: pi_of_K = positive_operator_gens(K)
400 sage: pi_of_K_star = positive_operator_gens(K.dual())
401 sage: pi_cone = Cone([p.list() for p in pi_of_K],
404 sage: pi_star = Cone([p.list() for p in pi_of_K_star],
407 sage: M = MatrixSpace(F, n)
408 sage: L = M(pi_cone.random_element(ring=QQ).list())
409 sage: pi_star.contains(W(L.transpose().list()))
412 sage: L = W.random_element()
413 sage: L_star = W(M(L.list()).transpose().list())
414 sage: pi_cone.contains(L) == pi_star.contains(L_star)
417 The Lyapunov rank of the positive operator cone is the product of
418 the Lyapunov ranks of the associated cones if they're all proper::
420 sage: K1 = random_cone(max_ambient_dim=4,
421 ....: strictly_convex=True,
423 sage: K2 = random_cone(max_ambient_dim=4,
424 ....: strictly_convex=True,
426 sage: pi_K1_K2 = positive_operator_gens(K1,K2)
427 sage: L = ToricLattice(K1.lattice_dim() * K2.lattice_dim())
428 sage: pi_cone = Cone([ g.list() for g in pi_K1_K2 ],
431 sage: beta1 = K1.lyapunov_rank()
432 sage: beta2 = K2.lyapunov_rank()
433 sage: pi_cone.lyapunov_rank() == beta1*beta2
440 # Matrices are not vectors in Sage, so we have to convert them
441 # to vectors explicitly before we can find a basis. We need these
442 # two values to construct the appropriate "long vector" space.
443 F
= K1
.lattice().base_field()
447 tensor_products
= [ s
.tensor_product(x
) for x
in K1
for s
in K2
.dual() ]
449 # Convert those tensor products to long vectors.
450 W
= VectorSpace(F
, n
*m
)
451 vectors
= [ W(tp
.list()) for tp
in tensor_products
]
454 if K1
.is_proper() and K2
.is_proper():
455 # All of the generators involved are extreme vectors and
456 # therefore minimal [Tam]_. If this cone is neither solid nor
457 # strictly convex, then the tensor product of ``s`` and ``x``
458 # is the same as that of ``-s`` and ``-x``. However, as a
459 # /set/, ``tensor_products`` may still be minimal.
462 # Create the dual cone of the positive operators, expressed as
464 pi_dual
= Cone(vectors
, ToricLattice(W
.dimension()), check
=check
)
466 # Now compute the desired cone from its dual...
467 pi_cone
= pi_dual
.dual()
469 # And finally convert its rays back to matrix representations.
470 M
= MatrixSpace(F
, m
, n
)
471 return [ M(v
.list()) for v
in pi_cone
]
474 def Z_operator_gens(K
):
476 Compute generators of the cone of Z-operators on this cone.
480 A list of `n`-by-``n`` matrices where ``n == K.lattice_dim()``.
481 Each matrix ``L`` in the list should have the property that
482 ``(L*x).inner_product(s) <= 0`` whenever ``(x,s)`` is an element of
483 this cone's :meth:`discrete_complementarity_set`. Moreover, any
484 conic (nonnegative linear) combination of these matrices shares the
490 Positive and Z-operators on closed convex cones.
494 Z-operators on the nonnegative orthant are just Z-matrices.
495 That is, matrices whose off-diagonal elements are nonnegative::
497 sage: K = Cone([(1,0),(0,1)])
498 sage: Z_operator_gens(K)
500 [ 0 -1] [ 0 0] [-1 0] [1 0] [ 0 0] [0 0]
501 [ 0 0], [-1 0], [ 0 0], [0 0], [ 0 -1], [0 1]
503 sage: K = Cone([(1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)])
504 sage: all([ z[i][j] <= 0 for z in Z_operator_gens(K)
505 ....: for i in range(z.nrows())
506 ....: for j in range(z.ncols())
510 The trivial cone in a trivial space has no Z-operators::
512 sage: K = Cone([], ToricLattice(0))
513 sage: Z_operator_gens(K)
516 Every operator is a Z-operator on the ambient vector space::
518 sage: K = Cone([(1,),(-1,)])
519 sage: K.is_full_space()
521 sage: Z_operator_gens(K)
524 sage: K = Cone([(1,0),(-1,0),(0,1),(0,-1)])
525 sage: K.is_full_space()
527 sage: Z_operator_gens(K)
529 [-1 0] [1 0] [ 0 -1] [0 1] [ 0 0] [0 0] [ 0 0] [0 0]
530 [ 0 0], [0 0], [ 0 0], [0 0], [-1 0], [1 0], [ 0 -1], [0 1]
533 A non-obvious application is to find the Z-operators on the
536 sage: K = Cone([(1,0),(0,1),(0,-1)])
537 sage: Z_operator_gens(K)
539 [-1 0] [1 0] [ 0 0] [0 0] [ 0 0] [0 0]
540 [ 0 0], [0 0], [-1 0], [1 0], [ 0 -1], [0 1]
543 Z-operators on a subspace are Lyapunov-like and vice-versa::
545 sage: K = Cone([(1,0),(-1,0),(0,1),(0,-1)])
546 sage: K.is_full_space()
548 sage: lls = span([ vector(l.list()) for l in K.lyapunov_like_basis() ])
549 sage: zs = span([ vector(z.list()) for z in Z_operator_gens(K) ])
555 The Z-property is possessed by every Z-operator::
557 sage: set_random_seed()
558 sage: K = random_cone(max_ambient_dim=4)
559 sage: Z_of_K = Z_operator_gens(K)
560 sage: dcs = K.discrete_complementarity_set()
561 sage: all([(z*x).inner_product(s) <= 0 for z in Z_of_K
562 ....: for (x,s) in dcs])
565 The lineality space of the cone of Z-operators is the space of
566 Lyapunov-like operators::
568 sage: set_random_seed()
569 sage: K = random_cone(max_ambient_dim=4)
570 sage: L = ToricLattice(K.lattice_dim()**2)
571 sage: Z_cone = Cone([ z.list() for z in Z_operator_gens(K) ],
574 sage: ll_basis = [ vector(l.list()) for l in K.lyapunov_like_basis() ]
575 sage: lls = L.vector_space().span(ll_basis)
576 sage: Z_cone.linear_subspace() == lls
579 The lineality of the Z-operators on a cone is the Lyapunov
582 sage: set_random_seed()
583 sage: K = random_cone(max_ambient_dim=4)
584 sage: Z_of_K = Z_operator_gens(K)
585 sage: L = ToricLattice(K.lattice_dim()**2)
586 sage: Z_cone = Cone([ z.list() for z in Z_of_K ],
589 sage: Z_cone.lineality() == K.lyapunov_rank()
592 The lineality spaces of the duals of the positive and Z-operator
593 cones are equal. From this it follows that the dimensions of the
594 Z-operator cone and positive operator cone are equal::
596 sage: set_random_seed()
597 sage: K = random_cone(max_ambient_dim=4)
598 sage: pi_of_K = positive_operator_gens(K)
599 sage: Z_of_K = Z_operator_gens(K)
600 sage: L = ToricLattice(K.lattice_dim()**2)
601 sage: pi_cone = Cone([p.list() for p in pi_of_K],
604 sage: Z_cone = Cone([ z.list() for z in Z_of_K],
607 sage: pi_cone.dim() == Z_cone.dim()
609 sage: pi_star = pi_cone.dual()
610 sage: z_star = Z_cone.dual()
611 sage: pi_star.linear_subspace() == z_star.linear_subspace()
614 The trivial cone, full space, and half-plane all give rise to the
615 expected dimensions::
617 sage: n = ZZ.random_element().abs()
618 sage: K = Cone([[0] * n], ToricLattice(n))
621 sage: L = ToricLattice(n^2)
622 sage: Z_of_K = Z_operator_gens(K)
623 sage: Z_cone = Cone([z.list() for z in Z_of_K],
626 sage: actual = Z_cone.dim()
630 sage: K.is_full_space()
632 sage: Z_of_K = Z_operator_gens(K)
633 sage: Z_cone = Cone([z.list() for z in Z_of_K],
636 sage: actual = Z_cone.dim()
639 sage: K = Cone([(1,0),(0,1),(0,-1)])
640 sage: Z_of_K = Z_operator_gens(K)
641 sage: Z_cone = Cone([z.list() for z in Z_of_K], check=False)
642 sage: Z_cone.dim() == 3
645 The Z-operators of a permuted cone can be obtained by conjugation::
647 sage: set_random_seed()
648 sage: K = random_cone(max_ambient_dim=4)
649 sage: L = ToricLattice(K.lattice_dim()**2)
650 sage: p = SymmetricGroup(K.lattice_dim()).random_element().matrix()
651 sage: pK = Cone([ p*k for k in K ], K.lattice(), check=False)
652 sage: Z_of_pK = Z_operator_gens(pK)
653 sage: actual = Cone([t.list() for t in Z_of_pK],
656 sage: Z_of_K = Z_operator_gens(K)
657 sage: expected = Cone([(p*t*p.inverse()).list() for t in Z_of_K],
660 sage: actual.is_equivalent(expected)
663 An operator is a Z-operator on a cone if and only if its
664 adjoint is a Z-operator on the dual of that cone::
666 sage: set_random_seed()
667 sage: K = random_cone(max_ambient_dim=4)
668 sage: F = K.lattice().vector_space().base_field()
669 sage: n = K.lattice_dim()
670 sage: L = ToricLattice(n**2)
671 sage: W = VectorSpace(F, n**2)
672 sage: Z_of_K = Z_operator_gens(K)
673 sage: Z_of_K_star = Z_operator_gens(K.dual())
674 sage: Z_cone = Cone([p.list() for p in Z_of_K],
677 sage: Z_star = Cone([p.list() for p in Z_of_K_star],
680 sage: M = MatrixSpace(F, n)
681 sage: L = M(Z_cone.random_element(ring=QQ).list())
682 sage: Z_star.contains(W(L.transpose().list()))
685 sage: L = W.random_element()
686 sage: L_star = W(M(L.list()).transpose().list())
687 sage: Z_cone.contains(L) == Z_star.contains(L_star)
690 # Matrices are not vectors in Sage, so we have to convert them
691 # to vectors explicitly before we can find a basis. We need these
692 # two values to construct the appropriate "long vector" space.
693 F
= K
.lattice().base_field()
696 # These tensor products contain generators for the dual cone of
697 # the cross-positive operators.
698 tensor_products
= [ s
.tensor_product(x
)
699 for (x
,s
) in K
.discrete_complementarity_set() ]
701 # Turn our matrices into long vectors...
702 W
= VectorSpace(F
, n
**2)
703 vectors
= [ W(m
.list()) for m
in tensor_products
]
707 # All of the generators involved are extreme vectors and
708 # therefore minimal. If this cone is neither solid nor
709 # strictly convex, then the tensor product of ``s`` and ``x``
710 # is the same as that of ``-s`` and ``-x``. However, as a
711 # /set/, ``tensor_products`` may still be minimal.
714 # Create the dual cone of the cross-positive operators,
715 # expressed as long vectors.
716 Sigma_dual
= Cone(vectors
, lattice
=ToricLattice(W
.dimension()), check
=check
)
718 # Now compute the desired cone from its dual...
719 Sigma_cone
= Sigma_dual
.dual()
721 # And finally convert its rays back to matrix representations.
722 # But first, make them negative, so we get Z-operators and
723 # not cross-positive ones.
724 M
= MatrixSpace(F
, n
)
725 return [ -M(v
.list()) for v
in Sigma_cone
]
729 gens
= K
.lyapunov_like_basis()
730 L
= ToricLattice(K
.lattice_dim()**2)
731 return Cone([ g
.list() for g
in gens
], lattice
=L
, check
=False)
734 gens
= Z_operator_gens(K
)
735 L
= ToricLattice(K
.lattice_dim()**2)
736 return Cone([ g
.list() for g
in gens
], lattice
=L
, check
=False)
739 gens
= positive_operator_gens(K
)
740 L
= ToricLattice(K
.lattice_dim()**2)
741 return Cone([ g
.list() for g
in gens
], lattice
=L
, check
=False)