From: Michael Orlitzky Date: Thu, 11 Mar 2021 19:36:30 +0000 (-0500) Subject: eja: add randomness to a test. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=9550136d8a78dbc1d1aa891e31a66eb993d4be3e;p=sage.d.git eja: add randomness to a test. --- diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 16e15e5..fbfd127 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -156,10 +156,10 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement): to zero on that element:: sage: set_random_seed() - sage: x = HadamardEJA(3).random_element() + sage: x = random_eja().random_element() sage: p = x.characteristic_polynomial() - sage: x.apply_univariate_polynomial(p) - 0 + sage: x.apply_univariate_polynomial(p).is_zero() + True The characteristic polynomials of the zero and unit elements should be what we think they are in a subalgebra, too::