]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: pass check=False for known-good constructions.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Nov 2020 14:28:21 +0000 (09:28 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 9 Nov 2020 14:37:43 +0000 (09:37 -0500)
mjo/eja/eja_algebra.py
mjo/eja/eja_element_subalgebra.py

index 0da3eef9aa6e7835b6a6291d008bed4e31571872..b681296b698287bdb506ee0519fcf098711b380b 100644 (file)
@@ -1049,8 +1049,10 @@ class HadamardEJA(FiniteDimensionalEuclideanJordanAlgebra):
         mult_table = [ [ V.gen(i)*(i == j) for j in range(n) ]
                        for i in range(n) ]
 
-        fdeja = super(HadamardEJA, self)
-        fdeja.__init__(field, mult_table, **kwargs)
+        super(HadamardEJA, self).__init__(field,
+                                          mult_table,
+                                          check=False,
+                                          **kwargs)
         self.rank.set_cache(n)
 
     def inner_product(self, x, y):
@@ -1139,9 +1141,10 @@ class MatrixEuclideanJordanAlgebra(FiniteDimensionalEuclideanJordanAlgebra):
 
         Qs = self.multiplication_table_from_matrix_basis(basis)
 
-        fdeja = super(MatrixEuclideanJordanAlgebra, self)
-        fdeja.__init__(field, Qs, natural_basis=basis, **kwargs)
-        return
+        super(MatrixEuclideanJordanAlgebra, self).__init__(field,
+                                                           Qs,
+                                                           natural_basis=basis,
+                                                           **kwargs)
 
 
     @cached_method
@@ -1409,7 +1412,10 @@ class RealSymmetricEJA(RealMatrixEuclideanJordanAlgebra):
 
     def __init__(self, n, field=AA, **kwargs):
         basis = self._denormalized_basis(n, field)
-        super(RealSymmetricEJA, self).__init__(field, basis, **kwargs)
+        super(RealSymmetricEJA, self).__init__(field,
+                                               basis,
+                                               check=False,
+                                               **kwargs)
         self.rank.set_cache(n)
 
 
@@ -1705,7 +1711,10 @@ class ComplexHermitianEJA(ComplexMatrixEuclideanJordanAlgebra):
 
     def __init__(self, n, field=AA, **kwargs):
         basis = self._denormalized_basis(n,field)
-        super(ComplexHermitianEJA,self).__init__(field, basis, **kwargs)
+        super(ComplexHermitianEJA,self).__init__(field,
+                                                 basis,
+                                                 check=False,
+                                                 **kwargs)
         self.rank.set_cache(n)
 
 
@@ -2006,7 +2015,10 @@ class QuaternionHermitianEJA(QuaternionMatrixEuclideanJordanAlgebra):
 
     def __init__(self, n, field=AA, **kwargs):
         basis = self._denormalized_basis(n,field)
-        super(QuaternionHermitianEJA,self).__init__(field, basis, **kwargs)
+        super(QuaternionHermitianEJA,self).__init__(field,
+                                                    basis,
+                                                    check=False,
+                                                    **kwargs)
         self.rank.set_cache(n)
 
 
@@ -2089,8 +2101,10 @@ class BilinearFormEJA(FiniteDimensionalEuclideanJordanAlgebra):
         # The rank of this algebra is two, unless we're in a
         # one-dimensional ambient space (because the rank is bounded
         # by the ambient dimension).
-        fdeja = super(BilinearFormEJA, self)
-        fdeja.__init__(field, mult_table, **kwargs)
+        super(BilinearFormEJA, self).__init__(field,
+                                              mult_table,
+                                              check=False,
+                                              **kwargs)
         self.rank.set_cache(min(n,2))
 
     def inner_product(self, x, y):
@@ -2182,7 +2196,7 @@ class JordanSpinEJA(BilinearFormEJA):
     def __init__(self, n, field=AA, **kwargs):
         # This is a special case of the BilinearFormEJA with the identity
         # matrix as its bilinear form.
-        return super(JordanSpinEJA, self).__init__(n, field, **kwargs)
+        super(JordanSpinEJA, self).__init__(n, field, **kwargs)
 
 
 class TrivialEJA(FiniteDimensionalEuclideanJordanAlgebra):
@@ -2216,10 +2230,12 @@ class TrivialEJA(FiniteDimensionalEuclideanJordanAlgebra):
     """
     def __init__(self, field=AA, **kwargs):
         mult_table = []
-        fdeja = super(TrivialEJA, self)
+        super(TrivialEJA, self).__init__(field,
+                                         mult_table,
+                                         check=False,
+                                         **kwargs)
         # The rank is zero using my definition, namely the dimension of the
         # largest subalgebra generated by any element.
-        fdeja.__init__(field, mult_table, **kwargs)
         self.rank.set_cache(0)
 
 
@@ -2265,6 +2281,8 @@ class DirectSumEJA(FiniteDimensionalEuclideanJordanAlgebra):
                 p = (J2.monomial(i)*J2.monomial(j)).to_vector()
                 mult_table[n1+i][n1+j] = V([field.zero()]*n1 + p.list())
 
-        fdeja = super(DirectSumEJA, self)
-        fdeja.__init__(field, mult_table, **kwargs)
+        super(DirectSumEJA, self).__init__(field,
+                                           mult_table,
+                                           check=False,
+                                           **kwargs)
         self.rank.set_cache(J1.rank() + J2.rank())
index 608cbc2ed2004235b1f0a356d4a9f89119a2f6c0..a4d7d1f3de4c43347b43451be15cc38b5e1c9556 100644 (file)
@@ -52,7 +52,8 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide
         fdeja = super(FiniteDimensionalEuclideanJordanElementSubalgebra, self)
         fdeja.__init__(self._superalgebra,
                        superalgebra_basis,
-                       category=category)
+                       category=category,
+                       check=False)
 
         # The rank is the highest possible degree of a minimal
         # polynomial, and is bounded above by the dimension. We know