From: Michael Orlitzky Date: Sat, 6 Jul 2019 22:14:07 +0000 (-0400) Subject: eja: add an inverse() example. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=ce3d3c5a22123dd16d074e2909e6d647fd721ce2;p=sage.d.git eja: add an inverse() example. --- 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::