#19737: SetPartition.to_permutation().cycle_tuples() is not the identity
-------------------------------------+-------------------------------------
Reporter: mantepse | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.11
Component: combinatorics | Resolution:
Keywords: set partitions, | Merged in:
permutations | Reviewers:
Authors: Martin Rubey | Work issues:
Report Upstream: N/A | Commit:
Branch: | 7d20d99b2d4b969b4ea2aa00cc71d279deeffbf4
u/mantepse/setpartition_to_permutation___cycle_tuples___is_not_the_identity|
Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by mantepse):
* commit: => 7d20d99b2d4b969b4ea2aa00cc71d279deeffbf4
Old description:
> The docstring of {{{SetPartition.to_permutation}}} says:
> {{{
> Convert self to a permutation by considering the partitions ascycles.
> }}}
> However, I was very surprised to learn that it does not do this by
> sorting the blocks. That is, there is currently no guarantee that:
> {{{
> SetPartition([[1,2,3]]).to_permutation() == Permutation([2,3,1])
> }}}
> Since this caused some discomfort (I thought a conjecture I like a lot
> would be wrong...) I propose to change this behaviour.
New description:
The docstring of {{{SetPartition.to_permutation}}} says:
{{{
Convert self to a permutation by considering the partitions as cycles.
}}}
However, I was very surprised to learn that it does not do this by sorting
the blocks. That is, there is currently no guarantee that:
{{{
SetPartition([[1,2,3]]).to_permutation() == Permutation([2,3,1])
}}}
Since this caused some discomfort (I thought a conjecture I like a lot
would be wrong...) I propose to change this behaviour.
The following looks reproducible:
{{{
p = SetPartition([(1, 9, 8), (2, 3, 4, 5, 6, 7)]);
p.to_permutation().cycle_tuples()
[(1, 9, 8), (2, 3, 4, 5, 6, 7)]
}}}
--
--
Ticket URL: <http://trac.sagemath.org/ticket/19737#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.