From: Michael Orlitzky Date: Sun, 20 Sep 2015 02:34:52 +0000 (-0400) Subject: Add examples for the is_lyapunov_like() function. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;ds=inline;h=d2f0486c20951b059b5d46c67e8a6cff1ce43092;p=sage.d.git Add examples for the is_lyapunov_like() function. --- diff --git a/mjo/cone/cone.py b/mjo/cone/cone.py index f3543a1..1d04084 100644 --- a/mjo/cone/cone.py +++ b/mjo/cone/cone.py @@ -725,11 +725,27 @@ def is_lyapunov_like(L,K): EXAMPLES: - todo. + The identity is always Lyapunov-like in a nontrivial space:: - TESTS: + sage: set_random_seed() + sage: K = random_cone(min_ambient_dim = 1, max_rays = 8) + sage: L = identity_matrix(K.lattice_dim()) + sage: is_lyapunov_like(L,K) + True + + As is the "zero" transformation:: - todo. + sage: K = random_cone(min_ambient_dim = 1, max_rays = 5) + sage: R = K.lattice().vector_space().base_ring() + sage: L = zero_matrix(R, K.lattice_dim()) + sage: is_lyapunov_like(L,K) + True + + Everything in ``LL(K)`` should be Lyapunov-like on ``K``:: + + sage: K = random_cone(min_ambient_dim = 1, max_rays = 5) + sage: all([is_lyapunov_like(L,K) for L in LL(K)]) + True """ return all([(L*x).inner_product(s) == 0