The fully_commutes_with_sum property was incorrectly using sum() on the flattened commuting structure, which does not yield a boolean. Changed to use all() to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.
#1286
+4
−1