From: Michael Orlitzky Date: Sat, 20 Jul 2019 14:41:58 +0000 (-0400) Subject: eja: add two more tests to ensure the Jordan product is correct. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=4d84b146c7d5cdb6a01ad85c4c4688e5f6610bdc;p=sage.d.git eja: add two more tests to ensure the Jordan product is correct. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 7c7c2d6..204c608 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1387,6 +1387,22 @@ def RealSymmetricSimpleEJA(n, field=QQ): sage: J.degree() == (n^2 + n)/2 True + The Jordan multiplication is what we think it is:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = RealSymmetricSimpleEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: actual = (x*y).natural_representation() + sage: X = x.natural_representation() + sage: Y = y.natural_representation() + sage: expected = (X*Y + Y*X)/2 + sage: actual == expected + True + sage: J(expected) == x*y + True + """ S = _real_symmetric_basis(n, field=field) (Qs, T) = _multiplication_table_from_matrix_basis(S) @@ -1415,6 +1431,22 @@ def ComplexHermitianSimpleEJA(n, field=QQ): sage: J.degree() == n^2 True + The Jordan multiplication is what we think it is:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,5) + sage: J = ComplexHermitianSimpleEJA(n) + sage: x = J.random_element() + sage: y = J.random_element() + sage: actual = (x*y).natural_representation() + sage: X = x.natural_representation() + sage: Y = y.natural_representation() + sage: expected = (X*Y + Y*X)/2 + sage: actual == expected + True + sage: J(expected) == x*y + True + """ S = _complex_hermitian_basis(n) (Qs, T) = _multiplication_table_from_matrix_basis(S)