- In fact [Orlitzky/Gowda]_, no closed convex polyhedral cone can have
- Lyapunov rank `n-1` in `n` dimensions::
-
- sage: K = random_cone(max_dim=10, max_rays=16)
- sage: b = lyapunov_rank(K)
- sage: n = K.lattice_dim()
- sage: b == n-1
- False
-
- The calculation of the Lyapunov rank of an improper cone can be
- reduced to that of a proper cone [Orlitzky/Gowda]_::
-
- sage: K = random_cone(max_dim=15, max_rays=25)
- sage: actual = lyapunov_rank(K)
- sage: K_S = project_span(K)
- sage: J_T1 = project_span(K_S.dual()).dual()
- sage: J_T2 = project_span(K, K_S.dual())
- sage: J_T2 = Cone(J_T2.rays(), lattice=J_T1.lattice())
- sage: J_T1 == J_T2
- True
- sage: J_T = J_T1
- 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
-