From bae33473b64b926842447b492813b51fd2394bf1 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 10 Jan 2025 10:09:24 +0100 Subject: [PATCH 1/2] expand and explain doctest of _preprocess_intertwining_relations --- src/sage/combinat/bijectionist.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) 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 From 7d53e28ac300fcc8b7d300de225330f602dd6834 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 17 Jan 2025 16:51:54 +0100 Subject: [PATCH 2/2] correct backticks --- src/sage/combinat/bijectionist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 1b2600aa786..084c60d7026 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2139,8 +2139,8 @@ 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 + 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']])