]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: more orthonormalization fixes.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 8 Dec 2020 01:57:39 +0000 (20:57 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 8 Dec 2020 01:57:39 +0000 (20:57 -0500)
mjo/eja/eja_algebra.py
mjo/eja/eja_element.py
mjo/eja/eja_element_subalgebra.py
mjo/eja/eja_subalgebra.py

index 2c68c8cdd1ff8eb5c3a1a90ccac7d3987bdfbce0..081abd303c32d35c9376ad99ecf2732a14ea3e9b 100644 (file)
@@ -1187,9 +1187,7 @@ class RationalBasisEJA(FiniteDimensionalEJA):
                  jordan_product,
                  inner_product,
                  field=AA,
-                 orthonormalize=True,
                  check_field=True,
-                 check_axioms=True,
                  **kwargs):
 
         if check_field:
@@ -1212,15 +1210,13 @@ class RationalBasisEJA(FiniteDimensionalEJA):
                                        field=QQ,
                                        orthonormalize=False,
                                        check_field=False,
-                                       check_axioms=False,
-                                       **kwargs)
+                                       check_axioms=False)
 
         super().__init__(basis,
                          jordan_product,
                          inner_product,
                          field=field,
                          check_field=check_field,
-                         check_axioms=check_axioms,
                          **kwargs)
 
     @cached_method
index f0f6da756e841e65b7d9272f5feb09404c9f1a09..d3e9a33ceba6e1fc4e58b417f3b953e2e2d1c3d7 100644 (file)
@@ -1057,7 +1057,7 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
                 # in the "normal" case without us having to think about it.
                 return self.operator().minimal_polynomial()
 
-        A = self.subalgebra_generated_by(orthonormalize_basis=False)
+        A = self.subalgebra_generated_by(orthonormalize=False)
         return A(self).operator().minimal_polynomial()
 
 
@@ -1358,7 +1358,7 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
             [(0, f2), (1, f0)]
 
         """
-        A = self.subalgebra_generated_by(orthonormalize_basis=True)
+        A = self.subalgebra_generated_by(orthonormalize=True)
         result = []
         for (evalue, proj) in A(self).operator().spectral_decomposition():
             result.append( (evalue, proj(A.one()).superalgebra_element()) )
index ee8e0c67db2773537aefc04d82ee58b7a0b4cca0..34a63afdc0be38fb34ab95bb211df6d926d9be57 100644 (file)
@@ -6,7 +6,7 @@ from mjo.eja.eja_subalgebra import FiniteDimensionalEJASubalgebra
 
 
 class FiniteDimensionalEJAElementSubalgebra(FiniteDimensionalEJASubalgebra):
-    def __init__(self, elt, orthonormalize=True, **kwargs):
+    def __init__(self, elt, **kwargs):
         superalgebra = elt.parent()
 
         # TODO: going up to the superalgebra dimension here is
@@ -52,7 +52,7 @@ class FiniteDimensionalEJAElementSubalgebra(FiniteDimensionalEJASubalgebra):
             sage: J.one()
             e0 + e1 + e2 + e3 + e4
             sage: x = sum(J.gens())
-            sage: A = x.subalgebra_generated_by()
+            sage: A = x.subalgebra_generated_by(orthonormalize=False)
             sage: A.one()
             f0
             sage: A.one().superalgebra_element()
@@ -74,7 +74,7 @@ class FiniteDimensionalEJAElementSubalgebra(FiniteDimensionalEJASubalgebra):
 
             sage: set_random_seed()
             sage: x = random_eja().random_element()
-            sage: A = x.subalgebra_generated_by(orthonormalize_basis=True)
+            sage: A = x.subalgebra_generated_by()
             sage: x = A.random_element()
             sage: A.one()*x == x and x*A.one() == x
             True
@@ -84,7 +84,7 @@ class FiniteDimensionalEJAElementSubalgebra(FiniteDimensionalEJASubalgebra):
 
             sage: set_random_seed()
             sage: x = random_eja(field=QQ,orthonormalize=False).random_element()
-            sage: A = x.subalgebra_generated_by()
+            sage: A = x.subalgebra_generated_by(orthonormalize=False)
             sage: actual = A.one().operator().matrix()
             sage: expected = matrix.identity(A.base_ring(), A.dimension())
             sage: actual == expected
@@ -95,7 +95,7 @@ class FiniteDimensionalEJAElementSubalgebra(FiniteDimensionalEJASubalgebra):
 
             sage: set_random_seed()
             sage: x = random_eja().random_element()
-            sage: A = x.subalgebra_generated_by(orthonormalize_basis=True)
+            sage: A = x.subalgebra_generated_by()
             sage: actual = A.one().operator().matrix()
             sage: expected = matrix.identity(A.base_ring(), A.dimension())
             sage: actual == expected
index 53038a50b5828aea75d57e72bf59aec0183a73ee..292660dcf771151536f1bbd1e7e0d154394afe9e 100644 (file)
@@ -15,7 +15,7 @@ class FiniteDimensionalEJASubalgebraElement(FiniteDimensionalEJAElement):
     the same as its matrix representation in the superalgebra::
 
         sage: set_random_seed()
-        sage: x = random_eja(field=QQ).random_element()
+        sage: x = random_eja(field=QQ,orthonormalize=False).random_element()
         sage: A = x.subalgebra_generated_by(orthonormalize=False)
         sage: y = A.random_element()
         sage: actual = y.to_matrix()