]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: use random_eja() where applicable in tests.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 5 Jul 2019 15:36:18 +0000 (11:36 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 5 Jul 2019 15:36:18 +0000 (11:36 -0400)
mjo/eja/euclidean_jordan_algebra.py

index 96b62a37a0ef00a49985c18b6ccc9d7bfa7a3319..038de61f481c4036dec9032806f22bdf5d2e2602 100644 (file)
@@ -98,8 +98,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             EXAMPLES:
 
                 sage: set_random_seed()
-                sage: J = eja_ln(5)
-                sage: x = J.random_element()
+                sage: x = random_eja().random_element()
                 sage: x.matrix()*x.vector() == (x**2).vector()
                 True
 
@@ -168,23 +167,13 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             The identity element is never nilpotent::
 
                 sage: set_random_seed()
-                sage: n = ZZ.random_element(2,10).abs()
-                sage: J = eja_rn(n)
-                sage: J.one().is_nilpotent()
-                False
-                sage: J = eja_ln(n)
-                sage: J.one().is_nilpotent()
+                sage: random_eja().one().is_nilpotent()
                 False
 
             The additive identity is always nilpotent::
 
                 sage: set_random_seed()
-                sage: n = ZZ.random_element(2,10).abs()
-                sage: J = eja_rn(n)
-                sage: J.zero().is_nilpotent()
-                True
-                sage: J = eja_ln(n)
-                sage: J.zero().is_nilpotent()
+                sage: random_eja().zero().is_nilpotent()
                 True
 
             """
@@ -282,18 +271,14 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             EXAMPLES::
 
                 sage: set_random_seed()
-                sage: n = ZZ.random_element(1,10).abs()
-                sage: J = eja_rn(n)
-                sage: x = J.random_element()
+                sage: x = random_eja().random_element()
                 sage: x.degree() == x.minimal_polynomial().degree()
                 True
 
             ::
 
                 sage: set_random_seed()
-                sage: n = ZZ.random_element(1,10).abs()
-                sage: J = eja_ln(n)
-                sage: x = J.random_element()
+                sage: x = random_eja().random_element()
                 sage: x.degree() == x.minimal_polynomial().degree()
                 True
 
@@ -358,13 +343,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             TESTS::
 
                 sage: set_random_seed()
-                sage: n = ZZ.random_element(1,10).abs()
-                sage: J = eja_rn(n)
-                sage: x = J.random_element()
-                sage: x.subalgebra_generated_by().is_associative()
-                True
-                sage: J = eja_ln(n)
-                sage: x = J.random_element()
+                sage: x = random_eja().random_element()
                 sage: x.subalgebra_generated_by().is_associative()
                 True
 
@@ -372,8 +351,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             squaring in the superalgebra::
 
                 sage: set_random_seed()
-                sage: J = eja_ln(5)
-                sage: x = J.random_element()
+                sage: x = random_eja().random_element()
                 sage: u = x.subalgebra_generated_by().random_element()
                 sage: u.matrix()*u.vector() == (u**2).vector()
                 True