Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import itertools as it
- S4 = list(it.permutations(range(4)))
- X = {(0, 1, 2, 3), (1, 2, 0, 3), (2, 0, 1, 3)}
- S4_inv = { s: inv for s in S4 for inv in S4 if all([s[inv[n]] == n for n in range(4)]) }
- def aut(s, x):
- inv = S4_inv[s]
- return tuple(inv[x[s[n]]] for n in range(4))
- Gx = { tuple(sorted(aut(s, x) for x in X)) for s in S4 }
- G_x = { s for s in S4 if all(aut(s, x) in X for x in X) }
- print(f"Gx: {Gx}")
- print(f"G_x: {G_x}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement