From: Michael Orlitzky Date: Mon, 4 Jan 2021 19:04:41 +0000 (-0500) Subject: eja: add trace linearity and charpoly homogeneity tests. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a4f0908c2216ff989161d33873102805d1c6aabd;p=sage.d.git eja: add trace linearity and charpoly homogeneity tests. --- 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()