Section ListSetLemmas.
Variable A : Set.
Hypothesis Aeq_dec : forall x y : A, {x = y} + {x <> y}.
intros.
cut (set_In x B \/ set_In x C).
intro H1; elim H1.
tauto.
auto.
eapply (set_union_elim (Aeq_dec:=Aeq_dec)); auto.
Qed.
intros.
cut (set_In x C \/ set_In x B).
intro; apply set_union_intro.
auto.
cut (set_In x B \/ set_In x C).
tauto.
eapply (set_union_elim (Aeq_dec:=Aeq_dec)).
auto.
Qed.
intro; intro; intro.
induction  B as [| a B HrecB].
auto.
simpl in |- *.
elim (Aeq_dec y a).
intros.
right.
auto.
simpl in |- *.
intro.
intro.
elim H.
intro.
left; auto.
intro.
right.
auto.
Qed.
intros.
cut (x = y \/ set_In x B).
intro.
elim H1.
intro.
absurd (x = y).
auto.
auto.
intro.
auto.
eapply (set_add_elim (A:=A) (Aeq_dec:=Aeq_dec) (a:=x) (b:=y) (x:=B)).
auto.
Qed.
intros.
intro.
apply H0.
eapply (Set_add1 (B:=B) (x:=x) (y:=y)); auto.
Qed.
End ListSetLemmas.
Hint Unfold IsEmpty Included.
Hint Resolve Set_remove2 Set_add1 AllWaysIncluded Set_union1 Set_union2
Set_add2.

Lemma Listeq_dec :
forall A : Set,
(forall a b : A, {a = b} + {a <> b}) ->
forall x y : list A, {x = y} + {x <> y}.