From: Michael Orlitzky Date: Sun, 22 Nov 2020 22:58:08 +0000 (-0500) Subject: eja: factor out some common tests. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=0fc6cf97abf8e091787ebae4e9cd60534ebdbc32;p=sage.d.git eja: factor out some common tests. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index d9a3abc..3b5828f 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1061,6 +1061,33 @@ class ConcreteEuclideanJordanAlgebra: rank, and so on are known a priori. More to the point, they are the Euclidean Jordan algebras for which we are able to conjure up a "random instance." + + SETUP:: + + sage: from mjo.eja.eja_algebra import ConcreteEuclideanJordanAlgebra + + TESTS: + + Our natural basis is normalized with respect to the natural inner + product unless we specify otherwise:: + + sage: set_random_seed() + sage: J = ConcreteEuclideanJordanAlgebra.random_instance() + sage: all( b.norm() == 1 for b in J.gens() ) + True + + Since our natural basis is normalized with respect to the natural + inner product, and since we know that this algebra is an EJA, any + left-multiplication operator's matrix will be symmetric because + natural->EJA basis representation is an isometry and within the EJA + the operator is self-adjoint by the Jordan axiom:: + + sage: set_random_seed() + sage: J = ConcreteEuclideanJordanAlgebra.random_instance() + sage: x = J.random_element() + sage: x.operator().matrix().is_symmetric() + True + """ @staticmethod @@ -1335,25 +1362,6 @@ class RealSymmetricEJA(RealMatrixEuclideanJordanAlgebra, sage: RealSymmetricEJA(3, prefix='q').gens() (q0, q1, q2, q3, q4, q5) - Our natural basis is normalized with respect to the natural inner - product unless we specify otherwise:: - - sage: set_random_seed() - sage: J = RealSymmetricEJA.random_instance() - sage: all( b.norm() == 1 for b in J.gens() ) - True - - Since our natural basis is normalized with respect to the natural - inner product, and since we know that this algebra is an EJA, any - left-multiplication operator's matrix will be symmetric because - natural->EJA basis representation is an isometry and within the EJA - the operator is self-adjoint by the Jordan axiom:: - - sage: set_random_seed() - sage: x = RealSymmetricEJA.random_instance().random_element() - sage: x.operator().matrix().is_symmetric() - True - We can construct the (trivial) algebra of rank zero:: sage: RealSymmetricEJA(0) @@ -1623,25 +1631,6 @@ class ComplexHermitianEJA(ComplexMatrixEuclideanJordanAlgebra, sage: ComplexHermitianEJA(2, prefix='z').gens() (z0, z1, z2, z3) - Our natural basis is normalized with respect to the natural inner - product unless we specify otherwise:: - - sage: set_random_seed() - sage: J = ComplexHermitianEJA.random_instance() - sage: all( b.norm() == 1 for b in J.gens() ) - True - - Since our natural basis is normalized with respect to the natural - inner product, and since we know that this algebra is an EJA, any - left-multiplication operator's matrix will be symmetric because - natural->EJA basis representation is an isometry and within the EJA - the operator is self-adjoint by the Jordan axiom:: - - sage: set_random_seed() - sage: x = ComplexHermitianEJA.random_instance().random_element() - sage: x.operator().matrix().is_symmetric() - True - We can construct the (trivial) algebra of rank zero:: sage: ComplexHermitianEJA(0) @@ -1937,25 +1926,6 @@ class QuaternionHermitianEJA(QuaternionMatrixEuclideanJordanAlgebra, sage: QuaternionHermitianEJA(2, prefix='a').gens() (a0, a1, a2, a3, a4, a5) - Our natural basis is normalized with respect to the natural inner - product unless we specify otherwise:: - - sage: set_random_seed() - sage: J = QuaternionHermitianEJA.random_instance() - sage: all( b.norm() == 1 for b in J.gens() ) - True - - Since our natural basis is normalized with respect to the natural - inner product, and since we know that this algebra is an EJA, any - left-multiplication operator's matrix will be symmetric because - natural->EJA basis representation is an isometry and within the EJA - the operator is self-adjoint by the Jordan axiom:: - - sage: set_random_seed() - sage: x = QuaternionHermitianEJA.random_instance().random_element() - sage: x.operator().matrix().is_symmetric() - True - We can construct the (trivial) algebra of rank zero:: sage: QuaternionHermitianEJA(0)