EXAMPLES:
+ Z-transformations on the nonnegative orthant are just Z-matrices.
+ That is, matrices whose off-diagonal elements are nonnegative::
+
+ sage: K = Cone([(1,0),(0,1)])
+ sage: Z_transformations(K)
+ [
+ [ 0 -1] [ 0 0] [-1 0] [1 0] [ 0 0] [0 0]
+ [ 0 0], [-1 0], [ 0 0], [0 0], [ 0 -1], [0 1]
+ ]
+ sage: K = Cone([(1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)])
+ sage: all([ z[i][j] <= 0 for z in Z_transformations(K)
+ ....: for i in range(z.nrows())
+ ....: for j in range(z.ncols())
+ ....: if i != j ])
+ True
+
The trivial cone in a trivial space has no Z-transformations::
sage: K = Cone([], ToricLattice(0))
The Z-property is possessed by every Z-transformation::
+ sage: set_random_seed()
sage: K = random_cone(max_ambient_dim = 6)
sage: Z_of_K = Z_transformations(K)
sage: dcs = K.discrete_complementarity_set()
- sage: all([z(x).inner_product(s) <= 0 for z in Z_of_K
- ....: for (x,s) in dcs])
+ sage: all([(z*x).inner_product(s) <= 0 for z in Z_of_K
+ ....: for (x,s) in dcs])
True
The lineality space of Z is LL::
+ sage: set_random_seed()
sage: K = random_cone(min_ambient_dim = 1, max_ambient_dim = 6)
sage: llvs = span([ vector(l.list()) for l in K.LL() ])
sage: z_cone = Cone([ z.list() for z in Z_transformations(K) ])
# Turn our matrices into long vectors...
vectors = [ W(m.list()) for m in tensor_products ]
- # Create the *dual* cone of the positive operators, expressed as
- # long vectors..
+ # Create the *dual* cone of the cross-positive operators,
+ # expressed as long vectors..
L = ToricLattice(W.dimension())
- Z_dual = Cone(vectors, lattice=L)
+ Sigma_dual = Cone(vectors, lattice=L)
# Now compute the desired cone from its dual...
- Z_cone = Z_dual.dual()
+ Sigma_cone = Sigma_dual.dual()
# And finally convert its rays back to matrix representations.
+ # But first, make them negative, so we get Z-transformations and
+ # not cross-positive ones.
M = MatrixSpace(V.base_ring(), V.dimension())
- return [ M(v.list()) for v in Z_cone.rays() ]
+ return [ -M(v.list()) for v in Sigma_cone.rays() ]