Proof using.
intros.
generalize dependent f.
induction ns.
- auto.
- intros.
simpl.
eapply IHns; eauto.
destruct (A_eq_dec a a0), (A_eq_dec to b); subst.
+ rewrite update2_eq; auto using in_or_app.
+ rewrite update2_diff2; auto using in_or_app.
+ rewrite update2_diff1; auto using in_or_app.
+ rewrite update2_diff1; auto using in_or_app.
Qed.

Lemma collate_ls_neq_to :
forall ns (f : A -> A -> list B) h mg from to,
h <> to ->
collate_ls A_eq_dec ns f h mg from to = f from to.