Proof using.
intros.
revert f.
induction ns; intros.
- rewrite remove_all_nil.
trivial.
- pose proof (remove_all_cons A_eq_dec ns' a ns) as H_cn.
break_or_hyp; break_and; find_rewrite.
* rewrite IHns.
trivial.
* simpl in *.
break_if; auto.
simpl.
assert (H_neq: a <> n).
intro.
subst.
intuition.
rewrite IHns.
unfold update2.
break_if; auto.
break_and; subst.
intuition.
Qed.

Lemma collate_ls_app :
forall l1 l2 (f : A -> A -> list B) h m,
collate_ls A_eq_dec (l1 ++ l2) f h m = collate_ls A_eq_dec l2 (collate_ls A_eq_dec l1 f h m) h m.