....: check=False)
sage: actual.is_equivalent(expected)
True
+
+ A transformation is positive on a cone if and only if its adjoint is
+ positive on the dual of that cone::
+
+ sage: set_random_seed()
+ sage: K = random_cone(max_ambient_dim=4)
+ sage: F = K.lattice().vector_space().base_field()
+ sage: n = K.lattice_dim()
+ sage: L = ToricLattice(n**2)
+ sage: W = VectorSpace(F, n**2)
+ sage: pi_of_K = positive_operator_gens(K)
+ sage: pi_of_K_star = positive_operator_gens(K.dual())
+ sage: pi_cone = Cone([p.list() for p in pi_of_K],
+ ....: lattice=L,
+ ....: check=False)
+ sage: pi_star = Cone([p.list() for p in pi_of_K_star],
+ ....: lattice=L,
+ ....: check=False)
+ sage: M = MatrixSpace(F, n)
+ sage: L = M(pi_cone.random_element(ring=QQ).list())
+ sage: pi_star.contains(W(L.transpose().list()))
+ True
+
+ sage: L = W.random_element()
+ sage: L_star = W(M(L.list()).transpose().list())
+ sage: pi_cone.contains(L) == pi_star.contains(L_star)
+ True
"""
# Matrices are not vectors in Sage, so we have to convert them
# to vectors explicitly before we can find a basis. We need these
....: check=False)
sage: actual.is_equivalent(expected)
True
+
+ A transformation is a Z-transformation on a cone if and only if its
+ adjoint is a Z-transformation on the dual of that cone::
+
+ sage: set_random_seed()
+ sage: K = random_cone(max_ambient_dim=4)
+ sage: F = K.lattice().vector_space().base_field()
+ sage: n = K.lattice_dim()
+ sage: L = ToricLattice(n**2)
+ sage: W = VectorSpace(F, n**2)
+ sage: Z_of_K = Z_transformation_gens(K)
+ sage: Z_of_K_star = Z_transformation_gens(K.dual())
+ sage: Z_cone = Cone([p.list() for p in Z_of_K],
+ ....: lattice=L,
+ ....: check=False)
+ sage: Z_star = Cone([p.list() for p in Z_of_K_star],
+ ....: lattice=L,
+ ....: check=False)
+ sage: M = MatrixSpace(F, n)
+ sage: L = M(Z_cone.random_element(ring=QQ).list())
+ sage: Z_star.contains(W(L.transpose().list()))
+ True
+
+ sage: L = W.random_element()
+ sage: L_star = W(M(L.list()).transpose().list())
+ sage: Z_cone.contains(L) == Z_star.contains(L_star)
+ True
"""
# Matrices are not vectors in Sage, so we have to convert them
# to vectors explicitly before we can find a basis. We need these