From a4f0908c2216ff989161d33873102805d1c6aabd Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 4 Jan 2021 14:04:41 -0500 Subject: [PATCH] eja: add trace linearity and charpoly homogeneity tests. --- mjo/eja/eja_algebra.py | 15 +++++++++++++++ mjo/eja/eja_element.py | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 39703dd..7c8adc7 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1101,6 +1101,21 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): r""" The `r` polynomial coefficients of the "characteristic polynomial of" function. + + SETUP:: + + sage: from mjo.eja.eja_algebra import random_eja + + TESTS: + + The theory shows that these are all homogeneous polynomials of + a known degree:: + + sage: set_random_seed() + sage: J = random_eja() + sage: all(p.is_homogeneous() for p in J._charpoly_coefficients()) + True + """ n = self.dimension() R = self.coordinate_polynomial_ring() diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 66138b2..c2f2b7c 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -1526,6 +1526,15 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement): sage: J.random_element().trace() in RLF True + The trace is linear:: + + sage: set_random_seed() + sage: J = random_eja() + sage: x,y = J.random_elements(2) + sage: alpha = J.base_ring().random_element() + sage: (alpha*x + y).trace() == alpha*x.trace() + y.trace() + True + """ P = self.parent() r = P.rank() -- 2.43.2