induction ls1; intuition; subst.
inversion H1; clear H1; subst.
inversion H2; clear H2; subst.
trivial.
inversion H1; clear H1; subst.
inversion H2; clear H2; subst.
f_equal.
eapply H0; eauto.
eapply IHls1; eauto.
Qed.

Lemma rel_map_eq : forall (A B : Type)(ls1 : list A)(rel1 : A -> B -> Prop) ls',
rel_map rel1 ls1 ls' ->
forall ls2 (rel2 : A -> B -> Prop),
ls1 = ls2 ->
(forall a b, In a ls1 -> In b ls' -> rel1 a b -> rel2 a b) ->
rel_map rel2 ls2 ls'.