]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
Update existing tests to use the codim() function.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 4 Jun 2015 18:11:29 +0000 (14:11 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 4 Jun 2015 18:11:29 +0000 (14:11 -0400)
mjo/cone/cone.py

index 55d9a06d55313c94f71be29783171c96233ccc31..ff7d195d134c15943dbb75c1f26b741bb4a0afba 100644 (file)
@@ -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