From: Michael Orlitzky Date: Fri, 5 Jul 2019 21:35:23 +0000 (-0400) Subject: eja: add non-working trace_inner_product() for EJA elements. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=54822637a1347faf4a1fdc594e162d023dde7b1e;p=sage.d.git eja: add non-working trace_inner_product() for EJA elements. --- 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