From 206683c90a5fd290ff4fd16a9ed272d9f981b668 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 5 Jul 2019 17:27:39 -0400 Subject: [PATCH] eja: add quadratic_representation() for elements. --- mjo/eja/euclidean_jordan_algebra.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 038de61..d07425f 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -323,6 +323,35 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): return elt.minimal_polynomial() + def quadratic_representation(self): + """ + Return the quadratic representation of this element. + + EXAMPLES: + + The explicit form in the spin factor algebra is given by + Alizadeh's Example 11.12:: + + sage: n = ZZ.random_element(1,10).abs() + sage: J = eja_ln(n) + sage: x = J.random_element() + sage: x_vec = x.vector() + sage: x0 = x_vec[0] + sage: x_bar = x_vec[1:] + sage: A = matrix(QQ, 1, [x_vec.inner_product(x_vec)]) + sage: B = 2*x0*x_bar.row() + sage: C = 2*x0*x_bar.column() + sage: D = identity_matrix(QQ, n-1) + sage: D = (x0^2 - x_bar.inner_product(x_bar))*D + sage: D = D + 2*x_bar.tensor_product(x_bar) + sage: Q = block_matrix(2,2,[A,B,C,D]) + sage: Q == x.quadratic_representation() + True + + """ + return 2*(self.matrix()**2) - (self**2).matrix() + + def span_of_powers(self): """ Return the vector space spanned by successive powers of -- 2.44.2