From cd5ba80d2e11bdce629933e09e7261aa0add2321 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 20 Jul 2019 22:53:41 -0400 Subject: [PATCH] eja: drop the inner_product argument to the EJA constructor. Beware, this will make the test suite fail if we ever get R^n as our EJA and try to take a (default trace) inner product involving an irregular element. --- mjo/eja/euclidean_jordan_algebra.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 3248162..e109b52 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -21,8 +21,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): assume_associative=False, category=None, rank=None, - natural_basis=None, - inner_product=None): + natural_basis=None): n = len(mult_table) mult_table = [b.base_extend(field) for b in mult_table] for b in mult_table: @@ -46,8 +45,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): names=names, category=cat, rank=rank, - natural_basis=natural_basis, - inner_product=inner_product) + natural_basis=natural_basis) def __init__(self, @@ -57,8 +55,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): assume_associative=False, category=None, rank=None, - natural_basis=None, - inner_product=None): + natural_basis=None): """ EXAMPLES: @@ -74,7 +71,6 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): """ self._rank = rank self._natural_basis = natural_basis - self._inner_product = inner_product fda = super(FiniteDimensionalEuclideanJordanAlgebra, self) fda.__init__(field, mult_table, @@ -94,7 +90,9 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): """ The inner product associated with this Euclidean Jordan algebra. - Will default to the trace inner product if nothing else. + Defaults to the trace inner product, but can be overridden by + subclasses if they are sure that the necessary properties are + satisfied. EXAMPLES: @@ -112,10 +110,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): """ if (not x in self) or (not y in self): raise TypeError("arguments must live in this algebra") - if self._inner_product is None: - return x.trace_inner_product(y) - else: - return self._inner_product(x,y) + return x.trace_inner_product(y) def natural_basis(self): @@ -1046,8 +1041,7 @@ def eja_rn(dimension, field=QQ): return FiniteDimensionalEuclideanJordanAlgebra(field, Qs, - rank=dimension, - inner_product=_usual_ip) + rank=dimension) -- 2.44.2