From: Michael Orlitzky Date: Tue, 20 Aug 2019 13:01:50 +0000 (-0400) Subject: eja: add tests to ensure the Jordan axiom for inner products is satisfied. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5264b3ce110d63d79b76ec3fa05daecd38a78e7c;p=sage.d.git eja: add tests to ensure the Jordan axiom for inner products is satisfied. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 42b2474..9b02880 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -722,6 +722,17 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: RealCartesianProductEJA(3, prefix='r').gens() (r0, r1, r2) + Our inner product satisfies the Jordan axiom:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = RealCartesianProductEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: z = J.random_element() + sage: (x*y).inner_product(z) == y.inner_product(x*z) + True + """ def __init__(self, n, field=QQ, **kwargs): V = VectorSpace(field, n) @@ -1213,6 +1224,17 @@ class RealSymmetricEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: RealSymmetricEJA(3, prefix='q').gens() (q0, q1, q2, q3, q4, q5) + Our inner product satisfies the Jordan axiom:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = RealSymmetricEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: z = J.random_element() + sage: (x*y).inner_product(z) == y.inner_product(x*z) + True + """ def __init__(self, n, field=QQ, **kwargs): S = _real_symmetric_basis(n, field=field) @@ -1271,6 +1293,17 @@ class ComplexHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: ComplexHermitianEJA(2, prefix='z').gens() (z0, z1, z2, z3) + Our inner product satisfies the Jordan axiom:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = ComplexHermitianEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: z = J.random_element() + sage: (x*y).inner_product(z) == y.inner_product(x*z) + True + """ def __init__(self, n, field=QQ, **kwargs): S = _complex_hermitian_basis(n) @@ -1337,6 +1370,17 @@ class QuaternionHermitianEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: QuaternionHermitianEJA(2, prefix='a').gens() (a0, a1, a2, a3, a4, a5) + Our inner product satisfies the Jordan axiom:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = QuaternionHermitianEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: z = J.random_element() + sage: (x*y).inner_product(z) == y.inner_product(x*z) + True + """ def __init__(self, n, field=QQ, **kwargs): S = _quaternion_hermitian_basis(n) @@ -1399,6 +1443,17 @@ class JordanSpinEJA(FiniteDimensionalEuclideanJordanAlgebra): sage: JordanSpinEJA(2, prefix='B').gens() (B0, B1) + Our inner product satisfies the Jordan axiom:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = JordanSpinEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: z = J.random_element() + sage: (x*y).inner_product(z) == y.inner_product(x*z) + True + """ def __init__(self, n, field=QQ, **kwargs): V = VectorSpace(field, n)