]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/clan/normal_decomposition.py: test the multiplication table
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 10 Apr 2026 01:13:17 +0000 (21:13 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 10 Apr 2026 01:13:17 +0000 (21:13 -0400)
mjo/clan/normal_decomposition.py

index 3bfc97f0e95225c2314ff202df7532bbcf61cd8e..5c60cd6c33b8fe6467c8c3ff95fd3c3744b2bc74 100644 (file)
@@ -21,6 +21,25 @@ class NormalDecomposition(Clan):
 
     TESTS:
 
+    Confirm the multiplication table for a normal decomposition::
+
+        sage: C = random_clan(nontrivial=True)
+        sage: x = C.random_element()
+        sage: y = C.random_element()
+        sage: i = ZZ.random_element(C.rank())
+        sage: j = ZZ.random_element(i+1)
+        sage: k = ZZ.random_element(C.rank())
+        sage: l = ZZ.random_element(k+1)
+        sage: x_ij = x.elt(i,j)
+        sage: y_kl = y.elt(k,l)
+        sage: z = x_ij * y_kl
+        sage: j in [k,l] or z.is_zero()
+        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)
+        True
+
     If we start with a normal decomposition of a clan of rank ``r``
     and if we "delete" the first idempotent, the result should still
     be a (non unital) clan in its principal decomposition: a unital