induction p generalizing k with
| refl => simp [permuted.to_map]
| step i j fi ij jl p ih =>
  simp [permuted.to_map]
  rw [←ih]
  split
  case step.inl ki => simp [ki, Vec.get_swap_right]
  case step.inr nki =>
    split
    case inl kj => simp [kj, Vec.get_swap_left]
    case inr nkj => rw [Vec.get_swap_neq _ i j k nki nkj]
n first last : Nat
α✝ : Type
arr1 arr2 : Vec α✝ n
p : permuted n first last arr1 arr2
k : Fin n
⊢ arr1[k] = arr2[p.to_map k]
no goals