It seems that this is intended? The correct equivalent code is:

sage: gens = [[(2, 4)], [(1, 2)]]
sage: pg = PermutationGroup(gens=gens); pg
Permutation Group with generators [(2,4), (1,2)]
sage: pg._libgap_()
Group([ (2,4), (1,2) ])
sage: pg = PermutationGroup(gens=gens, domain={1, 2, 4}); pg
Permutation Group with generators [(2,4), (1,2)]
sage: pg._libgap_()
Group([ (2,3), (1,2) ])

Which is what's done at
https://github.com/sagemath/sage/blob/develop/src/sage/graphs/generic_graph.py#L24161-L24170.
But I'm not an expert in this part of the code.

Also, I didn't know we have a 25k lines file.

On 1/28/25 10:27 AM, 'Peter Mueller' via sage-devel wrote:
> The following code shows that subgroups of automorphism groups of graphs are
> handled wrongly:
> 
> sage: g = Graph([[1, 2, 4], []])
> sage: a = g.automorphism_group()
> sage: print(a)
> Permutation Group with generators [(2,4), (1,2)]
> sage: print(a.commutator())
> Permutation Group with generators [(1,2,3)]
> 
> Note that  a.commutator() moves 3 though 3 is not a vertex of the graph.
> Somewhat strangely, if one defines directly a = PermutationGroup([[(2, 4)], 
> [(1,
> 2)]]), then a.commutator() returns the correct subgroup.
> 
> By the way, it doesn't help if the n vertices of the graph consist of the list
> [1..n]. I have a complicated example where the automorphism group is computed
> correctly, but the action of the commutator subgroup is with respect to a
> different labeling of the vertices.
> 
> -- Peter Mueller
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sage-
> devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email
> to sage-devel+unsubscr...@googlegroups.com <mailto:sage-
> devel+unsubscr...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/
> fec1df7a-9db7-43b2-9af2-8dcdf6658585n%40googlegroups.com <https://
> groups.google.com/d/msgid/sage-devel/
> fec1df7a-9db7-43b2-9af2-8dcdf6658585n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/dfa81010-69db-4ccb-a4a1-804d89c14968%40gmail.com.

Reply via email to