The predicate is indeed symmetric:
?- random_permutation([1,2,3,4],L). L = [3,4,1,2]. ?- random_permutation(L,[3,4,1,2]). L = [4,3,1,2].
But it does not accept a pair of permutations. For that, use permutation/2
?- random_permutation([1,2,3,4],[3,4,1,2]). false. ?- permutation([1,2,3,4],[3,4,1,2]). true ; false.
A better predicate would be:
random_permutation(List, Permutation, PicklistFromListToPermutation).
where PicklistFromListToPermutation would the list of indexes picked from the original List. This means no information loss and a proper "reversal" would be possible.
For example:
random_permutation([1,2,3,4],[3,4,1,2],[2,3,0,1]).
Note to self: write that predicate