From ce3d3c5a22123dd16d074e2909e6d647fd721ce2 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 6 Jul 2019 18:14:07 -0400 Subject: [PATCH] eja: add an inverse() example. --- mjo/eja/euclidean_jordan_algebra.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 636149a..a110246 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -160,6 +160,26 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): We can't use the superclass method because it relies on the algebra being associative. + EXAMPLES: + + The inverse in the spin factor algebra is given in Alizadeh's + Example 11.11:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,10).abs() + sage: J = JordanSpinSimpleEJA(n) + sage: x = J.random_element() + sage: while x.is_zero(): + ....: x = J.random_element() + sage: x_vec = x.vector() + sage: x0 = x_vec[0] + sage: x_bar = x_vec[1:] + sage: coeff = 1/(x0^2 - x_bar.inner_product(x_bar)) + sage: inv_vec = x_vec.parent()([x0] + (-x_bar).list()) + sage: x_inverse = coeff*inv_vec + sage: x.inverse() == J(x_inverse) + True + TESTS: The identity element is its own inverse:: -- 2.44.2