sage: K = Cone([e1, neg_e1, e2, neg_e2, zero, zero, zero])
sage: lyapunov_rank(K)
19
- sage: K.lattice_dim()**2 - K.dim()*(K.lattice_dim() - K.dim())
+ sage: K.lattice_dim()**2 - K.dim()*codim(K)
19
The Lyapunov rank should be additive on a product of proper cones
sage: K_S = project_span(K)
sage: P = project_span(K_S.dual()).dual()
sage: l = lineality(K)
- sage: codim = K.lattice_dim() - K.dim()
- sage: expected = lyapunov_rank(P) + K.dim()*(l + codim) + codim**2
+ sage: c = codim(K)
+ sage: expected = lyapunov_rank(P) + K.dim()*(l + c) + c**2
sage: actual == expected
True