aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Logic/Decidable.v
blob: ebc21f7555c9a105f439544b6154d1d69f9ee5e8 (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
(***********************************************************************)
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team    *)
(* <O___,, *        INRIA-Rocquencourt  &  LRI-CNRS-Orsay              *)
(*   \VV/  *************************************************************)
(*    //   *      This file is distributed under the terms of the      *)
(*         *       GNU Lesser General Public License Version 2.1       *)
(***********************************************************************)
(*i 	$Id$	 i*)

(** Properties of decidable propositions *)

Definition decidable (P:Prop) := P \/ ~ P.

Theorem dec_not_not : forall P:Prop, decidable P -> (~ P -> False) -> P.
unfold decidable in |- *; tauto. 
Qed.

Theorem dec_True : decidable True.
unfold decidable in |- *; auto.
Qed.

Theorem dec_False : decidable False.
unfold decidable, not in |- *; auto.
Qed.

Theorem dec_or :
 forall A B:Prop, decidable A -> decidable B -> decidable (A \/ B).
unfold decidable in |- *; tauto. 
Qed.

Theorem dec_and :
 forall A B:Prop, decidable A -> decidable B -> decidable (A /\ B).
unfold decidable in |- *; tauto. 
Qed.

Theorem dec_not : forall A:Prop, decidable A -> decidable (~ A).
unfold decidable in |- *; tauto. 
Qed.

Theorem dec_imp :
 forall A B:Prop, decidable A -> decidable B -> decidable (A -> B).
unfold decidable in |- *; tauto. 
Qed.

Theorem not_not : forall P:Prop, decidable P -> ~ ~ P -> P.
unfold decidable in |- *; tauto. Qed.

Theorem not_or : forall A B:Prop, ~ (A \/ B) -> ~ A /\ ~ B.
tauto. Qed.

Theorem not_and : forall A B:Prop, decidable A -> ~ (A /\ B) -> ~ A \/ ~ B.
unfold decidable in |- *; tauto. Qed.

Theorem not_imp : forall A B:Prop, decidable A -> ~ (A -> B) -> A /\ ~ B.
unfold decidable in |- *; tauto.
Qed.

Theorem imp_simp : forall A B:Prop, decidable A -> (A -> B) -> ~ A \/ B.
unfold decidable in |- *; tauto.
Qed.