summaryrefslogtreecommitdiff
path: root/theories7/Logic/Classical_Prop.v
blob: 1dc7ec57a2246fcc09c6dc1ef67375c6399d14c7 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
(************************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
(*   \VV/  **************************************************************)
(*    //   *      This file is distributed under the terms of the       *)
(*         *       GNU Lesser General Public License Version 2.1        *)
(************************************************************************)

(*i $Id: Classical_Prop.v,v 1.1.2.1 2004/07/16 19:31:29 herbelin Exp $ i*)

(** Classical Propositional Logic *)

Require ProofIrrelevance.

Hints Unfold not : core.

Axiom classic: (P:Prop)(P \/ ~(P)).

Lemma NNPP : (p:Prop)~(~(p))->p.
Proof.
Unfold not; Intros; Elim (classic p); Auto.
Intro NP; Elim (H NP).
Qed.

Lemma not_imply_elim : (P,Q:Prop)~(P->Q)->P.
Proof.
Intros; Apply NNPP; Red.
Intro; Apply H; Intro; Absurd P; Trivial.
Qed.

Lemma not_imply_elim2 : (P,Q:Prop)~(P->Q) -> ~Q.
Proof.
Intros; Elim (classic Q); Auto.
Qed.

Lemma imply_to_or : (P,Q:Prop)(P->Q) -> ~P \/ Q.
Proof.
Intros; Elim (classic P); Auto.
Qed.

Lemma imply_to_and : (P,Q:Prop)~(P->Q) -> P /\ ~Q.
Proof.
Intros; Split.
Apply not_imply_elim with Q;  Trivial.
Apply not_imply_elim2 with P; Trivial.
Qed.

Lemma or_to_imply : (P,Q:Prop)(~P \/ Q) -> P->Q.
Proof.
Induction 1; Auto.
Intros H1 H2; Elim (H1 H2).
Qed.

Lemma not_and_or : (P,Q:Prop)~(P/\Q)-> ~P \/ ~Q.
Proof.
Intros; Elim (classic P); Auto.
Qed.

Lemma or_not_and : (P,Q:Prop)(~P \/ ~Q) -> ~(P/\Q).
Proof.
Induction 1; Red; Induction 2; Auto.
Qed.

Lemma not_or_and : (P,Q:Prop)~(P\/Q)-> ~P /\ ~Q.
Proof.
Intros; Elim (classic P); Auto.
Qed.

Lemma and_not_or : (P,Q:Prop)(~P /\ ~Q) -> ~(P\/Q).
Proof.
Induction 1; Red; Induction 3; Trivial.
Qed.

Lemma imply_and_or: (P,Q:Prop)(P->Q) -> P \/ Q -> Q.
Proof.
Induction 2; Trivial.
Qed.

Lemma imply_and_or2: (P,Q,R:Prop)(P->Q) -> P \/ R -> Q \/ R.
Proof.
Induction 2; Auto.
Qed.

Lemma proof_irrelevance: (P:Prop)(p1,p2:P)p1==p2.
Proof (proof_irrelevance_cci classic).