Skip to content

Commit

Permalink
expand and explain doctest of _preprocess_intertwining_relations
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Jan 10, 2025
1 parent 1be0a58 commit bae3347
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/sage/combinat/bijectionist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit bae3347

Please sign in to comment.