And thus, the lineality of Z is the Lyapunov rank::
sage: set_random_seed()
- sage: K = random_cone(min_ambient_dim = 1, max_ambient_dim = 6)
- sage: z_cone = Cone([ z.list() for z in Z_transformation_gens(K) ])
+ sage: K = random_cone(max_ambient_dim=6)
+ sage: Z_of_K = Z_transformation_gens(K)
+ sage: L = ToricLattice(K.lattice_dim()**2)
+ sage: z_cone = Cone([ z.list() for z in Z_of_K ], lattice=L)
sage: z_cone.lineality() == K.lyapunov_rank()
True
+
+ The lineality spaces of pi-star and Z-star are equal:
+
+ sage: set_random_seed()
+ sage: K = random_cone(max_ambient_dim=5)
+ sage: pi_of_K = positive_operator_gens(K)
+ sage: Z_of_K = Z_transformation_gens(K)
+ sage: L = ToricLattice(K.lattice_dim()**2)
+ sage: pi_star = Cone([p.list() for p in pi_of_K], lattice=L).dual()
+ sage: z_star = Cone([ z.list() for z in Z_of_K], lattice=L).dual()
+ sage: pi_star.linear_subspace() == z_star.linear_subspace()
+ 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