]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add a test for basis-invariance of minimal polynomial.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 21 Aug 2019 15:00:58 +0000 (11:00 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 21 Aug 2019 15:00:58 +0000 (11:00 -0400)
mjo/eja/eja_element.py

index 90c236af8ef4dd46784007cb4927d00ba6b4e33e..03376bda408b8fde98597ca8e8669e7e72a3e81a 100644 (file)
@@ -709,6 +709,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         SETUP::
 
             sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
+            ....:                                  RealSymmetricEJA,
             ....:                                  random_eja)
 
         TESTS:
@@ -758,6 +759,20 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
             sage: x.apply_univariate_polynomial(p)
             0
 
+        The minimal polynomial is invariant under a change of basis,
+        and in particular, a re-scaling of the basis::
+
+            sage: set_random_seed()
+            sage: n = ZZ.random_element(1,5).abs()
+            sage: J1 = RealSymmetricEJA(n)
+            sage: J2 = RealSymmetricEJA(n,QQ,False)
+            sage: X = random_matrix(QQ,n)
+            sage: X = X*X.transpose()
+            sage: x1 = J1(X)
+            sage: x2 = J2(X)
+            sage: x1.minimal_polynomial() == x2.minimal_polynomial()
+            True
+
         """
         if self.is_zero():
             # We would generate a zero-dimensional subalgebra