sage: actual == expected
True
+ Repeat the previous test with different ``random_cone()`` params::
+
+ sage: K = random_cone(max_dim=15, solid=False, strictly_convex=True)
+ sage: actual = lyapunov_rank(K)
+ sage: (phi1, _) = span_iso(K)
+ sage: K_S = phi1(K)
+ sage: (phi2, _) = span_iso(K_S.dual())
+ sage: J_T = phi2(K_S.dual()).dual()
+ sage: l = K.linear_subspace().dimension()
+ sage: codim = K.lattice_dim() - K.dim()
+ sage: expected = lyapunov_rank(J_T) + K.dim()*(l + codim) + codim**2
+ sage: actual == expected
+ True
+
+ sage: K = random_cone(max_dim=15, solid=True, strictly_convex=False)
+ sage: actual = lyapunov_rank(K)
+ sage: (phi1, _) = span_iso(K)
+ sage: K_S = phi1(K)
+ sage: (phi2, _) = span_iso(K_S.dual())
+ sage: J_T = phi2(K_S.dual()).dual()
+ sage: l = K.linear_subspace().dimension()
+ sage: codim = K.lattice_dim() - K.dim()
+ sage: expected = lyapunov_rank(J_T) + K.dim()*(l + codim) + codim**2
+ sage: actual == expected
+ True
+
+ sage: K = random_cone(max_dim=15, solid=True, strictly_convex=True)
+ sage: actual = lyapunov_rank(K)
+ sage: (phi1, _) = span_iso(K)
+ sage: K_S = phi1(K)
+ sage: (phi2, _) = span_iso(K_S.dual())
+ sage: J_T = phi2(K_S.dual()).dual()
+ sage: l = K.linear_subspace().dimension()
+ sage: codim = K.lattice_dim() - K.dim()
+ sage: expected = lyapunov_rank(J_T) + K.dim()*(l + codim) + codim**2
+ sage: actual == expected
+ True
+
+ sage: K = random_cone(max_dim=15)
+ sage: actual = lyapunov_rank(K)
+ sage: (phi1, _) = span_iso(K)
+ sage: K_S = phi1(K)
+ sage: (phi2, _) = span_iso(K_S.dual())
+ sage: J_T = phi2(K_S.dual()).dual()
+ sage: l = K.linear_subspace().dimension()
+ sage: codim = K.lattice_dim() - K.dim()
+ sage: expected = lyapunov_rank(J_T) + K.dim()*(l + codim) + codim**2
+ sage: actual == expected
+ True
+
"""
return len(LL(K))