proposition: Lemma fold_right_add2 : forall s' s i j x, NoDupA s -> NoDupA s' -> eqB i j -> ~ InA x s -> equivlistA s' (x::s) -> eqB (fold_right f i s') (f x (fold_right f j s)).
proof: Proof. intros s' s i j x **. replace (f x (fold_right f j s)) with (fold_right f j (x::s)) by auto. eapply fold_right_equivlistA2;auto. Qed.
imports: List Sorted Setoid Basics Morphisms