From 6e48d7f92e380202e94ea9400fd8359ed660fd73 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 22 Jul 2019 16:26:51 -0400 Subject: [PATCH] eja: use different bounds for "n" in the random_eja() function. --- mjo/eja/euclidean_jordan_algebra.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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) -- 2.44.2