From: Michael Orlitzky Date: Mon, 22 Jul 2019 20:26:51 +0000 (-0400) Subject: eja: use different bounds for "n" in the random_eja() function. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=6e48d7f92e380202e94ea9400fd8359ed660fd73;p=sage.d.git eja: use different bounds for "n" in the random_eja() function. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 8f508bc..c4b0850 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1172,12 +1172,17 @@ def random_eja(): Euclidean Jordan algebra of degree... """ - n = ZZ.random_element(1,5) - constructor = choice([RealCartesianProductEJA, - JordanSpinEJA, - RealSymmetricEJA, - ComplexHermitianEJA, - QuaternionHermitianEJA]) + + # The max_n component lets us choose different upper bounds on the + # value "n" that gets passed to the constructor. This is needed + # because e.g. R^{10} is reasonable to test, while the Hermitian + # 10-by-10 quaternion matrices are not. + (constructor, max_n) = choice([(RealCartesianProductEJA, 6), + (JordanSpinEJA, 6), + (RealSymmetricEJA, 5), + (ComplexHermitianEJA, 4), + (QuaternionHermitianEJA, 3)]) + n = ZZ.random_element(1, max_n) return constructor(n, field=QQ)