]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: test the nonnegativity of trace() for squares.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 28 Jan 2022 02:12:11 +0000 (21:12 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 1 Feb 2022 23:28:56 +0000 (18:28 -0500)
mjo/eja/eja_element.py

index 0fd1c5f2032151de7d752494b4117825af3109a3..bef1289bbdd3820b990cf0b3ae0f4ff7334f3b01 100644 (file)
@@ -1512,6 +1512,12 @@ class FiniteDimensionalEJAElement(IndexedFreeModuleElement):
             sage: (alpha*x + y).trace() == alpha*x.trace() + y.trace()
             True
 
+        The trace of a square is nonnegative::
+
+            sage: x = random_eja().random_element()
+            sage: (x*x).trace() >= 0
+            True
+
         """
         P = self.parent()
         r = P.rank()