aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Logic/Classical_Pred_Set.v
blob: 3b4e17041ccc43e9a5e02ac3e87c22180b3da322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

(* $Id$ *)

(* Classical Predicate Logic on Set*)

Require Classical_Prop.

Section Generic.
Variable U: Set.

(* de Morgan laws for quantifiers *)

Lemma not_all_ex_not : (P:U->Prop)(~(n:U)(P n)) -> (EX n:U | ~(P n)).
Proof.
Unfold not; Intros P notall.
Apply NNPP; Unfold not.
Intro abs.
Cut ((n:U)(P n)); Auto.
Intro n; Apply NNPP.
Unfold not; Intros.
Apply abs; Exists n; Trivial.
Qed.

Lemma not_all_not_ex : (P:U->Prop)(~(n:U)~(P n)) -> (EX n:U |(P n)).
Proof.
Intros P H.
Elim (not_all_ex_not [n:U]~(P n) H); Intros n Pn; Exists n.
Apply NNPP; Trivial.
Qed.

Lemma not_ex_all_not : (P:U->Prop) (~(EX n:U |(P n))) -> (n:U)~(P n).
Proof.
Unfold not; Intros P notex n abs.
Apply notex.
Exists n; Trivial.
Qed. 

Lemma not_ex_not_all : (P:U->Prop)(~(EX n:U | ~(P n))) -> (n:U)(P n).
Proof.
Intros P H n.
Apply NNPP.
Red; Intro K; Apply H; Exists n; Trivial.
Qed.

Lemma ex_not_not_all : (P:U->Prop) (EX n:U | ~(P n)) -> ~(n:U)(P n).
Proof.
Unfold not; Intros P exnot allP.
Elim exnot; Auto.
Qed.

Lemma all_not_not_ex : (P:U->Prop) ((n:U)~(P n)) -> ~(EX n:U |(P n)).
Proof.
Unfold not; Intros P allnot exP; Elim exP; Intros n p.
Apply allnot with n; Auto.
Qed.

End Generic.