From: Michael Orlitzky Date: Fri, 26 Jul 2019 00:41:12 +0000 (-0400) Subject: eja: randomize and fix a bug in the subalgebra_idempotent() test. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=2f83e55614ad1f21e98ae256f4e81eb3b77bc41a;p=sage.d.git eja: randomize and fix a bug in the subalgebra_idempotent() test. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index a469bb0..920ecc9 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1211,12 +1211,11 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): TESTS:: sage: set_random_seed() - sage: J = RealCartesianProductEJA(5) - sage: c = J.random_element().subalgebra_idempotent() - sage: c^2 == c - True - sage: J = JordanSpinEJA(5) - sage: c = J.random_element().subalgebra_idempotent() + sage: J = random_eja() + sage: x = J.random_element() + sage: while x.is_nilpotent(): + ....: x = J.random_element() + sage: c = x.subalgebra_idempotent() sage: c^2 == c True