X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fcone%2Fcone.py;h=1d04084fe2f971978af0ff42e75a03f265fa6690;hb=d2f0486c20951b059b5d46c67e8a6cff1ce43092;hp=f3543a147ad8da3c5000015f3c53e837781180e5;hpb=a4f22c00f915d4c20f5105039d647540c18b3d83;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