]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add an inverse() example.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 6 Jul 2019 22:14:07 +0000 (18:14 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 6 Jul 2019 22:14:07 +0000 (18:14 -0400)
mjo/eja/euclidean_jordan_algebra.py

index 636149a92a33a143be9fca84e6a2924ca9377613..a1102461714c43e318130052669fb898d218914e 100644 (file)
@@ -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::