PermListList( list1, list2 )
PermListList
returns a permutation that may be applied to list1 to
obtain list2, if there is one. Otherwise it returns false
.
gap> list1 := [ 5, 4, 6, 1, 7, 5 ];; gap> list2 := [ 4, 1, 7, 5, 5, 6 ];; gap> perm := PermListList(list1, list2); (1,2,4)(3,5,6) gap> Permuted( list2, perm ); [ 5, 4, 6, 1, 7, 5 ]
GAP 3.4.4