#15031: Counter-intuitive mismatch between permutations and permutation group
elements
-------------------------+-------------------------------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-5.12
Component: | Keywords: permutation, permutation
combinatorics | group, symmetric group, sage-combinat, groups
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Dependencies: | Stopgaps:
-------------------------+-------------------------------------------------
{{{
sage: T = Tableau([[1,2],[3,4]])
sage: for p in T.column_stabilizer():
....: print p
....:
()
(2,4)
(1,3)
(1,3)(2,4)
sage: for p in T.column_stabilizer():
....: print T.symmetric_group_action_on_values(p)
....:
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
<ipython-input-2-657a6c3879e0> in <module>()
1 for p in T.column_stabilizer():
----> 2 print T.symmetric_group_action_on_entries(p)
3
/home/darij/sage-5.11.beta3/local/lib/python2.7/site-
packages/sage/combinat/tableau.pyc in
symmetric_group_action_on_entries(self, w)
2631 Category of elements of Tableaux
2632 """
-> 2633 w = w + [i+1 for i in range(len(w), self.size())] #need
to ensure that it belongs to Sym_size
2634 try:
2635 return self.parent()([[w[entry-1] for entry in row]
for row in self])
TypeError: object of type
'sage.groups.perm_gps.permgroup_element.PermutationGroupElement' has no
len()
}}}
(This is when #14884 is applied; otherwise it would throw a different
error.) What is going on is that the {{{column_stabilizer}}} method of a
tableau returns permutation group elements rather than honest standard
permutations, whereas the {{{symmetric_group_action_on_entries}}} method
only eats standard permutations.
Of course, type casting does solve the problem, but this is ugly and not
completely trivial:
{{{
sage: p
(1,3)(2,4)
sage: parent(p)
Permutation Group with generators [(), (2,4), (1,3)]
sage: parent(SymmetricGroup(4)(p))
Symmetric group of order 4! as a permutation group
sage: parent(Permutation(p))
Standard permutations
}}}
So {{{T.symmetric_group_action_on_entries(SymmetricGroup(4)(p))}}}
wouldn't work either, but
{{{T.symmetric_group_action_on_entries(Permutation(p))}}} works.
This is not an error in the classical meaning of the word, but I think
this is something that should be fixed. How?
--
Ticket URL: <http://trac.sagemath.org/ticket/15031>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.