X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_operator.py;h=0b52f555d51f58341fe56f5b63984f88cdf99da0;hb=4c6ab92d378613a9a053b62382b7e0cda7c450ab;hp=468a921fc2788176a696f93a9e042a5333a199e7;hpb=1ba4748f125c32d51ed1b3b89188f34546c9136f;p=sage.d.git diff --git a/mjo/eja/eja_operator.py b/mjo/eja/eja_operator.py index 468a921..0b52f55 100644 --- a/mjo/eja/eja_operator.py +++ b/mjo/eja/eja_operator.py @@ -419,6 +419,73 @@ class FiniteDimensionalEuclideanJordanAlgebraOperator(Map): return (self + (-other)) + def is_self_adjoint(self): + r""" + Return whether or not this operator is self-adjoint. + + At least in Sage, the fact that the base field is real means + that the algebra elements have to be real as well (this is why + we embed the complex numbers and quaternions). As a result, the + matrix of this operator will contain only real entries, and it + suffices to check only symmetry, not conjugate symmetry. + + SETUP:: + + sage: from mjo.eja.eja_algebra import (JordanSpinEJA) + + EXAMPLES:: + + sage: J = JordanSpinEJA(4) + sage: J.one().operator().is_self_adjoint() + True + + """ + return self.matrix().is_symmetric() + + + def is_zero(self): + r""" + Return whether or not this map is the zero operator. + + SETUP:: + + sage: from mjo.eja.eja_operator import FiniteDimensionalEuclideanJordanAlgebraOperator + sage: from mjo.eja.eja_algebra import (random_eja, + ....: JordanSpinEJA, + ....: RealSymmetricEJA) + + EXAMPLES:: + + sage: J1 = JordanSpinEJA(2) + sage: J2 = RealSymmetricEJA(2) + sage: R = J1.base_ring() + sage: M = matrix(R, [ [0, 0], + ....: [0, 0], + ....: [0, 0] ]) + sage: L = FiniteDimensionalEuclideanJordanAlgebraOperator(J1,J2,M) + sage: L.is_zero() + True + sage: M = matrix(R, [ [0, 0], + ....: [0, 1], + ....: [0, 0] ]) + sage: L = FiniteDimensionalEuclideanJordanAlgebraOperator(J1,J2,M) + sage: L.is_zero() + False + + TESTS: + + The left-multiplication-by-zero operation on a given algebra + is its zero map:: + + sage: set_random_seed() + sage: J = random_eja() + sage: J.zero().operator().is_zero() + True + + """ + return self.matrix().is_zero() + + def inverse(self): """ Return the inverse of this operator, if it exists.