]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/clan/normal_decomposition.py: add extra guards in a test
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 10 Apr 2026 16:25:58 +0000 (12:25 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 10 Apr 2026 16:25:58 +0000 (12:25 -0400)
Now that x.elt(i,j) will crash on invalid arguments, we check
that i >= j before calling it.

mjo/clan/normal_decomposition.py

index 5c60cd6c33b8fe6467c8c3ff95fd3c3744b2bc74..72c567cbcc28e9bf5660da377dbd3d56f0a1e1ef 100644 (file)
@@ -37,7 +37,8 @@ class NormalDecomposition(Clan):
         True
         sage: j != k or z.elt(i,l) == z
         True
-        sage: j != l or (z.elt(i,k) == z) or (z.elt(k,i) == z)
+        sage: ( j != l or (k <= i and z.elt(i,k) == z)
+        ....:          or (i <= k and z.elt(k,i) == z) )
         True
 
     If we start with a normal decomposition of a clan of rank ``r``