diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 2020b729917..1b2600aa786 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2124,11 +2124,6 @@ def _preprocess_intertwining_relations(self): In particular, if `P` consists only if singletons, this method has no effect. - .. TODO:: - - create one test with one and one test with two - intertwining relations - .. TODO:: it is not clear whether this method makes sense @@ -2144,6 +2139,17 @@ def _preprocess_intertwining_relations(self): sage: bij._P {{'a'}, {'b'}, {'c'}, {'d'}} + However, adding that `'a'` and `'c'` are in the same block, + we can infer that also `'b'` and `'d'` are in the same + block:: + + sage: bij.set_constant_blocks([['a', 'c']]) + sage: bij._P + {{'a', 'c'}, {'b'}, {'d'}} + sage: bij._preprocess_intertwining_relations() + sage: bij._P + {{'a', 'c'}, {'b', 'd'}} + Let a group act on permutations:: sage: A = B = Permutations(3) @@ -2152,6 +2158,11 @@ def _preprocess_intertwining_relations(self): sage: bij._preprocess_intertwining_relations() sage: bij._P {{[1, 2, 3]}, {[1, 3, 2]}, {[2, 1, 3]}, {[2, 3, 1]}, {[3, 1, 2]}, {[3, 2, 1]}} + + Thus, in this case we do not detect the constant blocks:: + + sage: bij.constant_blocks(optimal=True) + {{[1, 2, 3], [3, 2, 1]}, {[1, 3, 2], [2, 3, 1]}, {[2, 1, 3], [3, 1, 2]}} """ A = self._A P = self._P