#14319: Automorphism group with labeled vertices
-------------------------------------------------+-------------------------
       Reporter:  ncohen                         |        Owner:  jason,
           Type:  enhancement                    |  ncohen, rlm
       Priority:  major                          |       Status:  closed
      Component:  graph theory                   |    Milestone:  sage-5.10
       Keywords:                                 |   Resolution:  fixed
        Authors:  Nathann Cohen                  |    Merged in:
Report Upstream:  N/A                            |  sage-5.10.beta2
         Branch:                                 |    Reviewers:  Volker
   Dependencies:  #14291, #14250, #14477,        |  Braun
  #14435                                         |  Work issues:
                                                 |       Commit:
                                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by ncohen):

 > I'm confused.  What is the problem with renaming the current
 `p.domain()` to `p.list()`, and saying `p.list()` is going to return the
 list representation of the permutation (in terms of the domain)?  That's
 how it always was---but before, the domain was always [1...n].  In other
 words, if you aren't using the domain argument of the permutation group,
 p.list() does what it always has done.  If you are using the domain
 argument, it makes sense that `p.list()` will speak in terms of the
 domain.

 I am only worried of what I saw in the code of Permutations : that there
 are assumptions made by some developpers which are not known by others,
 and that code will end up being broken because the assumptions are never
 checked. `.list()` does not *mean* that "the output represents the
 permutations when the elements are integers". Having a `.to_permutation()`
 function which would return a `Permutation` object (i.e. that only handle
 integers) and a dictionary associating the elements of the
 `PermutationGroupElement` to integers is okay.

 I just want to be sure that the code stays correct. Right now the list
 that is returned by `.list()` is a private attribute, and with a name like
 that there is absolutely no reason to believe that a code which creates
 this private attribute should ensure the property that you expect.

 Exactly like the labeling of a poset's vertices with integers is a linear
 extension : that is assumed nearly everywhere in poset code, and you will
 sweat for a while before finding it out. If this variable was named
 "linear_extension" there would be no problem, though.

 And changing the code of `list` to ensure that the list it returns
 satisfies the property that you expect would ensure that the code is good,
 but `.list()` really isn't right name for such a function. If you need
 "the integer permutation represented by a `PermutationGroupElement`, it
 looks like what you want is a way to create a Permutation object from a
 `PermutationGroupElement`.

 Well. What do you think ?

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/14319#comment:60>
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.

Reply via email to