Orbit "OnSets" in Sage

asked 2019-12-15 21:30:46 +0200

DanP gravatar image

I have the following code from GAP which works in Sage 8.9 using gap.eval:

gap.eval("grp := Group([ (1,2,3,4,5), (1,2,4,3) ])")
gap.eval("els := Elements(grp)")
gap.eval("aut := AutomorphismGroup(grp)")
gap.eval("forbidden_orbit := Orbit(aut, els{[1,2,3,4]}, OnSets)")
F_orbit = gap.new("forbidden_orbit")

I'd like to do this directly in Sage. However, is there a Sage function analogous to Gap's "AutomorphismGroup()" and is there a Sage function analogous to how I'm using the "Orbit" function in GAP? I can't seem to find one that outputs the same as above, which should be:

[ [ (), (2,3,5,4), (2,4,5,3), (2,5)(3,4) ],
  [ (), (1,2,4,3), (1,3,4,2), (1,4)(2,3) ],
  [ (), (1,2)(3,5), (1,3,2,5), (1,5,2,3) ],
  [ (), (1,3)(4,5), (1,4,3,5), (1,5,3,4) ],
  [ (), (1,2,5,4), (1,4,5,2), (1,5)(2,4) ] ]
edit retag flag offensive close merge delete