From: Michael Orlitzky Date: Thu, 4 Jun 2015 18:11:29 +0000 (-0400) Subject: Update existing tests to use the codim() function. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=10142e85f34c47fa35df002f519d1d58a79a74f4;p=sage.d.git Update existing tests to use the codim() function. --- diff --git a/mjo/cone/cone.py b/mjo/cone/cone.py index 55d9a06..ff7d195 100644 --- a/mjo/cone/cone.py +++ b/mjo/cone/cone.py @@ -503,7 +503,7 @@ def lyapunov_rank(K): 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 @@ -579,8 +579,8 @@ def lyapunov_rank(K): 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