]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add another test case for the Albert EJA determinant.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 5 Feb 2023 13:09:19 +0000 (08:09 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 5 Feb 2023 13:09:19 +0000 (08:09 -0500)
mjo/eja/eja_element.py

index 8af3b77698457486af3d5b64eb52bf6f6e7b5ea8..a229fa3f5290854bb3414280b6724f66d3918708 100644 (file)
@@ -332,7 +332,8 @@ class EJAElement(IndexedFreeModuleElement):
 
         SETUP::
 
-            sage: from mjo.eja.eja_algebra import (JordanSpinEJA,
+            sage: from mjo.eja.eja_algebra import (AlbertEJA,
+            ....:                                  JordanSpinEJA,
             ....:                                  TrivialEJA,
             ....:                                  RealSymmetricEJA,
             ....:                                  ComplexHermitianEJA,
@@ -395,6 +396,22 @@ class EJAElement(IndexedFreeModuleElement):
             sage: actual2 == expected
             True
 
+        There's a formula for the determinant of the Albert algebra
+        (Yokota, Section 2.1)::
+
+            sage: def albert_det(x):
+            ....:     X = x.to_matrix()
+            ....:     res  = X[0,0]*X[1,1]*X[2,2]
+            ....:     res += 2*(X[1,2]*X[2,0]*X[0,1]).real()
+            ....:     res -= X[0,0]*X[1,2]*X[2,1]
+            ....:     res -= X[1,1]*X[2,0]*X[0,2]
+            ....:     res -= X[2,2]*X[0,1]*X[1,0]
+            ....:     return res.leading_coefficient()
+            sage: J = AlbertEJA(field=QQ, orthonormalize=False)
+            sage: xs = J.random_elements(10)
+            sage: all( albert_det(x) == x.det() for x in xs )
+            True
+
         """
         P = self.parent()
         r = P.rank()