X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fcone%2Fcone.py;h=1d04084fe2f971978af0ff42e75a03f265fa6690;hb=3f378f36cad7abf31e670a005408e637b1f9d760;hp=f3543a147ad8da3c5000015f3c53e837781180e5;hpb=fbaecc56ec029d6f813d76e26bd8891a41416bf0;p=sage.d.git 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