From 54822637a1347faf4a1fdc594e162d023dde7b1e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 5 Jul 2019 17:35:23 -0400 Subject: [PATCH] eja: add non-working trace_inner_product() for EJA elements. --- mjo/eja/euclidean_jordan_algebra.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index d07425f..7820db5 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -503,6 +503,16 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): raise ValueError('charpoly had fewer than 2 coefficients') + def trace_inner_product(self, other): + """ + Return the trace inner product of myself and ``other``. + """ + if not other in self.parent(): + raise ArgumentError("'other' must live in the same algebra") + + return (self*other).trace() + + def eja_rn(dimension, field=QQ): """ Return the Euclidean Jordan Algebra corresponding to the set -- 2.44.2