From: Michael Orlitzky Date: Wed, 21 Aug 2019 15:00:58 +0000 (-0400) Subject: eja: add a test for basis-invariance of minimal polynomial. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=517fbc3c451b7b3914d455653bccf2ec647dbc30;p=sage.d.git eja: add a test for basis-invariance of minimal polynomial. --- diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 90c236a..03376bd 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -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