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.
simple induction x.
simple induction y.
auto.
intros.
right.
unfold not in |- *; intro D; discriminate D.
intros.
induction  y as [| a0 y Hrecy].
right; unfold not in |- *; intro D; discriminate D.
elim (H0 y).
intro.
rewrite a1.
elim (H a a0).
intro.
rewrite a2.
left; auto.
intro.
right.
unfold not in |- *.
unfold not in b.
intro; apply b.
injection H1.
auto.
unfold not in |- *; intro.
right.
intro; apply b.
injection H1.
auto.
Qed.
Hint Resolve Listeq_dec.

Lemma Prodeq_dec :
forall A B : Set,
(forall x y : A, {x = y} + {x <> y}) ->
(forall v w : B, {v = w} + {v <> w}) ->
forall c d : A * B, {c = d} + {c <> d}.