]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: rename RealCartesianProductEJA -> HadamardEJA.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 27 Dec 2019 15:09:55 +0000 (10:09 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 27 Dec 2019 15:09:55 +0000 (10:09 -0500)
mjo/eja/eja_algebra.py
mjo/eja/eja_element.py
mjo/eja/eja_element_subalgebra.py
mjo/eja/eja_operator.py

index d31b5b71a0df190dee14d86f1544cff547f025ef..166ed1e322dfa6c966f79231c03d5837cdc3b165 100644 (file)
@@ -111,7 +111,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
         SETUP::
 
             sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
-            ....:                                  RealCartesianProductEJA,
+            ....:                                  HadamardEJA,
             ....:                                  RealSymmetricEJA)
 
         EXAMPLES:
@@ -139,7 +139,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
         vector representations) back and forth faithfully::
 
             sage: set_random_seed()
-            sage: J = RealCartesianProductEJA.random_instance()
+            sage: J = HadamardEJA.random_instance()
             sage: x = J.random_element()
             sage: J(x.to_vector().column()) == x
             True
@@ -582,12 +582,12 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule):
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import (RealCartesianProductEJA,
+            sage: from mjo.eja.eja_algebra import (HadamardEJA,
             ....:                                  random_eja)
 
         EXAMPLES::
 
-            sage: J = RealCartesianProductEJA(5)
+            sage: J = HadamardEJA(5)
             sage: J.one()
             e0 + e1 + e2 + e3 + e4
 
@@ -903,8 +903,7 @@ class KnownRankEJA(object):
         return cls(n, field, **kwargs)
 
 
-class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
-                              KnownRankEJA):
+class HadamardEJA(FiniteDimensionalEuclideanJordanAlgebra, KnownRankEJA):
     """
     Return the Euclidean Jordan Algebra corresponding to the set
     `R^n` under the Hadamard product.
@@ -915,13 +914,13 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
 
     SETUP::
 
-        sage: from mjo.eja.eja_algebra import RealCartesianProductEJA
+        sage: from mjo.eja.eja_algebra import HadamardEJA
 
     EXAMPLES:
 
     This multiplication table can be verified by hand::
 
-        sage: J = RealCartesianProductEJA(3)
+        sage: J = HadamardEJA(3)
         sage: e0,e1,e2 = J.gens()
         sage: e0*e0
         e0
@@ -940,7 +939,7 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
 
     We can change the generator prefix::
 
-        sage: RealCartesianProductEJA(3, prefix='r').gens()
+        sage: HadamardEJA(3, prefix='r').gens()
         (r0, r1, r2)
 
     """
@@ -949,7 +948,7 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
         mult_table = [ [ V.gen(i)*(i == j) for j in range(n) ]
                        for i in range(n) ]
 
-        fdeja = super(RealCartesianProductEJA, self)
+        fdeja = super(HadamardEJA, self)
         return fdeja.__init__(field, mult_table, rank=n, **kwargs)
 
     def inner_product(self, x, y):
@@ -958,7 +957,7 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import RealCartesianProductEJA
+            sage: from mjo.eja.eja_algebra import HadamardEJA
 
         TESTS:
 
@@ -966,7 +965,7 @@ class RealCartesianProductEJA(FiniteDimensionalEuclideanJordanAlgebra,
         over `R^n`::
 
             sage: set_random_seed()
-            sage: J = RealCartesianProductEJA.random_instance()
+            sage: J = HadamardEJA.random_instance()
             sage: x,y = J.random_elements(2)
             sage: X = x.natural_representation()
             sage: Y = y.natural_representation()
index f78af2519c15eb1aeb07eaa4a45b56cbd0a40d4f..7c4c79ddcd7315e654620a0be8f8bccf5ab9ac11 100644 (file)
@@ -96,7 +96,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import (RealCartesianProductEJA,
+            sage: from mjo.eja.eja_algebra import (HadamardEJA,
             ....:                                  random_eja)
 
         EXAMPLES::
@@ -104,7 +104,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
             sage: R = PolynomialRing(QQ, 't')
             sage: t = R.gen(0)
             sage: p = t^4 - t^3 + 5*t - 2
-            sage: J = RealCartesianProductEJA(5)
+            sage: J = HadamardEJA(5)
             sage: J.one().apply_univariate_polynomial(p) == 3*J.one()
             True
 
@@ -137,7 +137,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import RealCartesianProductEJA
+            sage: from mjo.eja.eja_algebra import HadamardEJA
 
         EXAMPLES:
 
@@ -145,14 +145,14 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         the identity element is `(t-1)` from which it follows that
         the characteristic polynomial should be `(t-1)^3`::
 
-            sage: J = RealCartesianProductEJA(3)
+            sage: J = HadamardEJA(3)
             sage: J.one().characteristic_polynomial()
             t^3 - 3*t^2 + 3*t - 1
 
         Likewise, the characteristic of the zero element in the
         rank-three algebra `R^{n}` should be `t^{3}`::
 
-            sage: J = RealCartesianProductEJA(3)
+            sage: J = HadamardEJA(3)
             sage: J.zero().characteristic_polynomial()
             t^3
 
@@ -162,7 +162,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         to zero on that element::
 
             sage: set_random_seed()
-            sage: x = RealCartesianProductEJA(3).random_element()
+            sage: x = HadamardEJA(3).random_element()
             sage: p = x.characteristic_polynomial()
             sage: x.apply_univariate_polynomial(p)
             0
@@ -170,7 +170,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         The characteristic polynomials of the zero and unit elements
         should be what we think they are in a subalgebra, too::
 
-            sage: J = RealCartesianProductEJA(3)
+            sage: J = HadamardEJA(3)
             sage: p1 = J.one().characteristic_polynomial()
             sage: q1 = J.zero().characteristic_polynomial()
             sage: e0,e1,e2 = J.gens()
@@ -996,11 +996,11 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         SETUP::
 
             sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
-            ....:                                  RealCartesianProductEJA)
+            ....:                                  HadamardEJA)
 
         EXAMPLES::
 
-            sage: J = RealCartesianProductEJA(2)
+            sage: J = HadamardEJA(2)
             sage: x = sum(J.gens())
             sage: x.norm()
             sqrt(2)
@@ -1350,7 +1350,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         SETUP::
 
             sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
-            ....:                                  RealCartesianProductEJA,
+            ....:                                  HadamardEJA,
             ....:                                  TrivialEJA,
             ....:                                  random_eja)
 
@@ -1368,7 +1368,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
 
         ::
 
-            sage: J = RealCartesianProductEJA(5)
+            sage: J = HadamardEJA(5)
             sage: J.one().trace()
             5
 
@@ -1446,11 +1446,11 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement):
         SETUP::
 
             sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
-            ....:                                  RealCartesianProductEJA)
+            ....:                                  HadamardEJA)
 
         EXAMPLES::
 
-            sage: J = RealCartesianProductEJA(2)
+            sage: J = HadamardEJA(2)
             sage: x = sum(J.gens())
             sage: x.trace_norm()
             sqrt(2)
index c058613e1b650a3c3007ad8700d1c36d0b2567c9..292871afb86415b845f1e1feee2a5560e75f3cf2 100644 (file)
@@ -100,12 +100,12 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import (RealCartesianProductEJA,
+            sage: from mjo.eja.eja_algebra import (HadamardEJA,
             ....:                                  random_eja)
 
         EXAMPLES::
 
-            sage: J = RealCartesianProductEJA(5)
+            sage: J = HadamardEJA(5)
             sage: J.one()
             e0 + e1 + e2 + e3 + e4
             sage: x = sum(J.gens())
index 030b94f73c5b4d1da8762a9cd9613e3d5725c4ad..ee33dbf53b36fd9851d31169d5699041f460328e 100644 (file)
@@ -117,13 +117,13 @@ class FiniteDimensionalEuclideanJordanAlgebraOperator(Map):
             sage: from mjo.eja.eja_operator import FiniteDimensionalEuclideanJordanAlgebraOperator
             sage: from mjo.eja.eja_algebra import (
             ....:   JordanSpinEJA,
-            ....:   RealCartesianProductEJA,
+            ....:   HadamardEJA,
             ....:   RealSymmetricEJA)
 
         EXAMPLES::
 
             sage: J1 = JordanSpinEJA(3)
-            sage: J2 = RealCartesianProductEJA(2)
+            sage: J2 = HadamardEJA(2)
             sage: J3 = RealSymmetricEJA(1)
             sage: mat1 = matrix(QQ, [[1,2,3],
             ....:                    [4,5,6]])