From 95ae8e7b0ddca840da9631603a2f37cca888468b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 7 Dec 2020 20:57:39 -0500 Subject: [PATCH] eja: more orthonormalization fixes. --- mjo/eja/eja_algebra.py | 6 +----- mjo/eja/eja_element.py | 4 ++-- mjo/eja/eja_element_subalgebra.py | 10 +++++----- mjo/eja/eja_subalgebra.py | 2 +- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 2c68c8c..081abd3 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -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 diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index f0f6da7..d3e9a33 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -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()) ) diff --git a/mjo/eja/eja_element_subalgebra.py b/mjo/eja/eja_element_subalgebra.py index ee8e0c6..34a63af 100644 --- a/mjo/eja/eja_element_subalgebra.py +++ b/mjo/eja/eja_element_subalgebra.py @@ -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 diff --git a/mjo/eja/eja_subalgebra.py b/mjo/eja/eja_subalgebra.py index 53038a5..292660d 100644 --- a/mjo/eja/eja_subalgebra.py +++ b/mjo/eja/eja_subalgebra.py @@ -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() -- 2.44.2