proposition: Lemma InA_app_cons_swap {A} eqA : Equivalence eqA -> forall (a a' : A) l l', InA eqA a (l ++ (a' :: l')) <-> InA eqA a ((a' :: l) ++ l').
proof: Proof. split; intros; [ eapply InA_app_swap; eauto | ]; let H := match goal with H : InA _ _ _ |- _ => constr:(H) end in intros; eapply InA_app_iff; eapply InA_app_iff in H; eauto; intuition; let H := match goal with H : InA _ _ _ |- _ => constr:(H) end in inversion H; subst; eauto. Qed.
imports: Coq.Sorting.Permutation Fiat.Common Coq.Lists.List Fiat.Common.List.ListFacts Coq.Program.Program Coq.Lists.SetoidList