induction ls using rev_ind; intuition; simpl in *.
econstructor.
rewrite app_length.
simpl.
rewrite plus_comm.
simpl.
eapply list_pred_app_both.
eapply list_pred_impl.
eapply IHls.
intuition.
eapply nth_error_app_Some; intuition.
econstructor.
eapply  nth_error_app_length .
econstructor.
Qed.

(* Specifications: *)
Theorem permute_nth_equiv :
forall (A : Set)(ls : list A) a b,
list_pred (fun (a0 : A) (b0 : nat) => nth_error ls b0 = Some a0) a b ->
a = permute ls b.