Hi!
Here is how I would approach it.
- for any lists
L1
,L2
and a functionf
,Permutation L1 L2 -> Permutation (map f L1) (map f L2)
. - for any list
L
of lengthn
,L = map (fun i => nth i L 0) (seq 0 n)
. - let
f i = nth i L1 0
, and writeL1 ~ L2
forPermutation L1 L2
. Then
(the firstmap f L2 ~ map f (seq 0 n) ~ L1 ~ seq 0 n
~
is by (1), the second one by (2) and the third one by hypothesis).
Cheers!
Nicolás