]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add two more tests to ensure the Jordan product is correct.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 20 Jul 2019 14:41:58 +0000 (10:41 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 29 Jul 2019 03:19:01 +0000 (23:19 -0400)
mjo/eja/euclidean_jordan_algebra.py

index 7c7c2d6ba3f0d54ab34c89d37e47e6bbd5844e40..204c6087bf04d91ca12bd1256e258f5d1cb5f6ba 100644 (file)
@@ -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)