From 2edbb6042b34b4c366a52fa9be0d03bada22969d Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 15 Jul 2019 19:54:01 -0400 Subject: [PATCH] eja: remove pointless abs() calls. --- mjo/eja/euclidean_jordan_algebra.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 747e198..3a98324 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -188,7 +188,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): Example 11.11:: sage: set_random_seed() - sage: n = ZZ.random_element(1,10).abs() + sage: n = ZZ.random_element(1,10) sage: J = JordanSpinSimpleEJA(n) sage: x = J.random_element() sage: while x.is_zero(): @@ -355,7 +355,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): aren't multiples of the identity are regular:: sage: set_random_seed() - sage: n = ZZ.random_element(1,10).abs() + sage: n = ZZ.random_element(1,10) sage: J = JordanSpinSimpleEJA(n) sage: x = J.random_element() sage: x == x.coefficient(0)*J.one() or x.degree() == 2 @@ -454,7 +454,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): identity:: sage: set_random_seed() - sage: n = ZZ.random_element(2,10).abs() + sage: n = ZZ.random_element(2,10) sage: J = JordanSpinSimpleEJA(n) sage: y = J.random_element() sage: while y == y.coefficient(0)*J.one(): @@ -499,7 +499,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): Alizadeh's Example 11.12:: sage: set_random_seed() - sage: n = ZZ.random_element(1,10).abs() + sage: n = ZZ.random_element(1,10) sage: J = JordanSpinSimpleEJA(n) sage: x = J.random_element() sage: x_vec = x.vector() @@ -549,7 +549,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): Property 6: - sage: k = ZZ.random_element(1,10).abs() + sage: k = ZZ.random_element(1,10) sage: actual = (x^k).quadratic_representation() sage: expected = (x.quadratic_representation())^k sage: actual == expected @@ -790,7 +790,7 @@ def random_eja(): Euclidean Jordan algebra of degree... """ - n = ZZ.random_element(1,5).abs() + n = ZZ.random_element(1,5) constructor = choice([eja_rn, JordanSpinSimpleEJA, RealSymmetricSimpleEJA, @@ -825,7 +825,7 @@ def _complex_hermitian_basis(n, field=QQ): TESTS:: sage: set_random_seed() - sage: n = ZZ.random_element(1,5).abs() + sage: n = ZZ.random_element(1,5) sage: all( M.is_symmetric() for M in _complex_hermitian_basis(n) ) True @@ -1002,7 +1002,7 @@ def RealSymmetricSimpleEJA(n, field=QQ): The degree of this algebra is `(n^2 + n) / 2`:: sage: set_random_seed() - sage: n = ZZ.random_element(1,5).abs() + sage: n = ZZ.random_element(1,5) sage: J = RealSymmetricSimpleEJA(n) sage: J.degree() == (n^2 + n)/2 True @@ -1026,7 +1026,7 @@ def ComplexHermitianSimpleEJA(n, field=QQ): The degree of this algebra is `n^2`:: sage: set_random_seed() - sage: n = ZZ.random_element(1,5).abs() + sage: n = ZZ.random_element(1,5) sage: J = ComplexHermitianSimpleEJA(n) sage: J.degree() == n^2 True -- 2.44.2