Proof using.
intros.
rewrite collate_app.
revert f.
induction l1; intros; simpl in *; auto.
break_let.
rewrite IHl1.
- destruct a.
find_injection.
simpl in *.
assert (H_neq: a0 <> h').
intro.
contradict H.
left.
trivial.
rewrite collate_neq_update2; trivial.
- intro.
contradict H.
right.
trivial.
Qed.

Lemma collate_not_in_rest :
forall h h' l1 l2 (f : A -> A -> list B),
~ In h' (map fst l2) ->
collate A_eq_dec h f (l1 ++ l2) h h' = collate A_eq_dec h f l1 h h'.