induction 1; intuition.
exists (fun a1 a2 => if e a1 a2 then true else false).
intuition.
destruct (e x y); simpl in *; trivial. discriminate.
subst.
destruct (e y y); trivial; congruence.
eapply H.
eapply comp_base_exists; eauto.
Qed.

Lemma comp_eq_dec : forall (A : Set),
Comp A ->
eq_dec A.