Advertisement
JoelSjogren

Untitled

Aug 19th, 2020
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. P = PolynomialRing(QQ, 'x', 6)
  2. xs = x0,x1,x2,x3,x4,x5 = P.gens()
  3.  
  4. def act_single(g, p):
  5. return p.subs({xs[i-1]: xs[j-1] for i, j in g.dict().items()})
  6.  
  7. def act_all(G, p):
  8. return [act_single(g, p) for g in G]
  9.  
  10. G = PermutationGroup([[(2,4,6,5,3)], [(1,2),(3,5),(4,6)]])
  11. p = x0^2 + x0*x1
  12. print(G[:10])
  13. print(act_all(G, p)[:10])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement