Opened 8 years ago

Last modified 7 years ago

#14319 closed enhancement

Automorphism group with labeled vertices — at Version 17

Reported by: ncohen Owned by: jason, ncohen, rlm
Priority: major Milestone: sage-5.10
Component: graph theory Keywords:
Cc: dimpase, nthiery, hivert Merged in:
Authors: Nathann Cohen Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #14291, #14250 Stopgaps:

Status badges

Description (last modified by ncohen)

Permutation groups used to support only 1...n elements, but that is not the case anymore. We can return automorphism groups that do not need to be relabeled, and that is GREAT :-P

Apply

Change History (19)

comment:1 Changed 8 years ago by ncohen

  • Description modified (diff)
  • Status changed from new to needs_review

I hope the patchbot will like this one. I'm pretty sure that it will break 1000 doctests :-P

Nathann

comment:2 follow-up: Changed 8 years ago by dimpase

What are the allowed labels/doman elements of the underlying permutation groups? Can they be, say, tuples?

comment:3 in reply to: ↑ 2 Changed 8 years ago by ncohen

What are the allowed labels/doman elements of the underlying permutation groups? Can they be, say, tuples?

Well, it lookslike it can be anything that can be hashed. A PermutationGroup contains its own dictionary of "Sage things" <-> "Gap Things" and does the translations, soo... :-)

Nathann

Last edited 8 years ago by ncohen (previous) (diff)

comment:4 Changed 8 years ago by ncohen

  • Dependencies set to #14291

comment:5 Changed 8 years ago by vbraun

Various docstrings need fixing as they explicitly refer to integers, for example list():

Returns list of the images of the integers from 1 to n under this
permutation as a list of Python ints.

comment:6 Changed 8 years ago by ncohen

Where does this docstring come from ?

comment:7 follow-up: Changed 8 years ago by vbraun

Its in sage/groups/perm_gps/permgroup_element.pyx

comment:8 in reply to: ↑ 7 Changed 8 years ago by ncohen

Its in sage/groups/perm_gps/permgroup_element.pyx

Just for the record, #10335 is where this should have been done in the first place >_<

Nathann

comment:9 Changed 8 years ago by ncohen

This being said, I have no idea what to do with this list method. It just has no meaning if the elements are not integers :-/

Nathann

comment:10 Changed 8 years ago by ncohen

Patch updated ! I did not touch list(). What do you think we should do with it ? Update its docstring to say "returns the domain" ? Looks like this is all it is used for. And hopefully, because doing otherwise would assume that it is only defined on integers.

Nathann

comment:11 follow-up: Changed 8 years ago by vbraun

I would be in favor of having a domain method on the permutation group elements and deprecate list.

comment:12 Changed 8 years ago by vbraun

  • Description modified (diff)

comment:13 in reply to: ↑ 11 Changed 8 years ago by ncohen

  • Description modified (diff)

I would be in favor of having a domain method on the permutation group elements and deprecate list.

Done in this new patch ! Thank you for looking at fan_isomorphism :-)

Nathann

comment:14 Changed 8 years ago by ncohen

  • Dependencies changed from #14291 to #14291, #14250

Rebased on top of #14250 which is in 5.9.beta1.

Nathann

comment:15 Changed 8 years ago by ncohen

Apply trac_14319.patch, trac_14319_fix_fan_isomorphism.patch, trac_14319-from_list_to_domain.patch

Changed 8 years ago by ncohen

comment:16 Changed 8 years ago by vbraun

You forgot at least one corner case, if the automorphism group is trivial then still need to remember the domain:

sage: Graph({'a':['a'], 'b':[]}).automorphism_group()
Permutation Group with generators [()]
sage: Graph({'a':['a'], 'b':[]}).automorphism_group().domain()
{1}

Changed 8 years ago by vbraun

Updated patch

comment:17 Changed 8 years ago by ncohen

  • Description modified (diff)

Apply trac_14319.patch, trac_14319_fix_fan_isomorphism.patch, trac_14319-from_list_to_domain.patch, trac_14319-empty.patch

Note: See TracTickets for help on using tickets.