Section In_gen.
Variable A : Type.
Variable ea : A -> A -> Prop.
Hypothesis ea_symm :
forall a1 a2, ea a1 a2 -> ea a2 a1.
Hypothesis ea_trans :
forall a1 a2 a3,
ea a1 a2 ->
ea a2 a3 ->
ea a1 a3.
Fixpoint In_gen(a : A)(ls : list A) : Prop :=
match ls with
| nil => False
| a' :: ls' =>
ea a a' \/ In_gen a ls'
end.
induction ls; intuition; simpl in *.
intuition.
left.
eapply ea_trans.
eapply ea_symm.
eauto.
trivial.
right.
eauto.
Qed.
End In_gen.

Theorem In_gen_eq :
forall (A : Type)(a : A)(ls : list A),
In a ls <-> In_gen eq a ls.