Proof using.
intros.
rewrite collate_ls_NoDup_in; auto.
- apply NoDup_filter_rel.
apply NoDup_remove_all.
assumption.
- apply related_filter_rel.
apply in_remove_all_preserve; auto.
assumption.
Qed.

Lemma collate_ls_f_eq :
forall ns (f : A -> A -> list B) g h mg n n',
f n n' = g n n' ->
collate_ls A_eq_dec ns f h mg n n' = collate_ls A_eq_dec ns g h mg n n'.