Question: Check if two lists of vectors are equal under some permutation.

Hello friends, I have the following problem:
I have two lists of vectors, L1 and L2. The lists have the same number of vectors, and all the vectors have the same length.
I need to check if there is a permutation that, when applied to all the elements of one list, will obtain all the elements of the other list. For example, consider the following lists :

L1:=[<0|0|0>,<2|1|2>,<1|2|1>];
L2:=[<1|1|2>,<2|2|1>,<0|0|0>];

In this example the vectors are of length 3. Therefore, there are 3!=6 possible permutations. Namely:

P1:=<<1,0,0>|<0,1,0>|<0,0,1>>;
P2:=<<0,1,0>|<0,0,1>|<1,0,0>>;
P3:=<<0,0,1>|<1,0,0>|<0,1,0>>;
P4:=<<0,0,1>|<0,1,0>|<1,0,0>>;
P5:=<<0,1,0>|<1,0,0>|<0,0,1>>;
P6:=<<1,0,0>|<0,0,1>|<0,1,0>>;

In this case there are two permutations that satisfy the condition above, namely:

P3:=<<0,0,1>|<1,0,0>|<0,1,0>>;
P6:=<<1,0,0>|<0,0,1>|<0,1,0>>;

Cause

for i in L1 do Multiply(i, P3) end do;
>[0 0 0]
  [2 2 1]
  [1 1 2]
 
The same result is obtained using the permutation P6.
I'm working with larger lists and longer vectors so I'm looking for a quick way to check this. Thanks for your valuable help.

Please Wait...