]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/euclidean_jordan_algebra.py: add examples for eja_rn.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 19 Jun 2019 14:18:33 +0000 (10:18 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 19 Jun 2019 14:18:33 +0000 (10:18 -0400)
mjo/eja/euclidean_jordan_algebra.py

index 5ccf2f29fd480f4a499d55fc3d9dad85942dc6f4..e0a6f2da12982932838c2dbef2ae0e3d0fe8a1b0 100644 (file)
@@ -11,6 +11,26 @@ def eja_rn(dimension, field=QQ):
     """
     Return the Euclidean Jordan Algebra corresponding to the set
     `R^n` under the Hadamard product.
+
+    EXAMPLES:
+
+    This multiplication table can be verified by hand::
+
+        sage: J = eja_rn(3)
+        sage: e0,e1,e2 = J.gens()
+        sage: e0*e0
+        e0
+        sage: e0*e1
+        0
+        sage: e0*e2
+        0
+        sage: e1*e1
+        e1
+        sage: e1*e2
+        0
+        sage: e2*e2
+        e2
+
     """
     # The FiniteDimensionalAlgebra constructor takes a list of
     # matrices, the ith representing right multiplication by the ith