]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/library/logic/connectives.ma
Added a new contrib div_and_mod and few modifs here and there.
[helm.git] / helm / matita / library / logic / connectives.ma
1 (**************************************************************************)
2 (*       ___                                                                *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||       A.Asperti, C.Sacerdoti Coen,                          *)
8 (*      ||A||       E.Tassi, S.Zacchiroli                                 *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU Lesser General Public License Version 2.1         *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/logic/connectives/".
16
17 inductive True: Prop \def
18 I : True.
19
20 default "true" cic:/matita/logic/connectives/True.ind.
21
22 inductive False: Prop \def .
23
24 default "false" cic:/matita/logic/connectives/False.ind.
25
26 definition Not: Prop \to Prop \def
27 \lambda A. (A \to False).
28
29 theorem absurd : \forall A,C:Prop. A \to Not A \to C.
30 intros. elim (H1 H).
31 qed.
32
33 default "absurd" cic:/matita/logic/connectives/absurd.con.
34
35 inductive And (A,B:Prop) : Prop \def
36     conj : A \to B \to (And A B).
37
38 theorem proj1: \forall A,B:Prop. (And A B) \to A.
39 intros. elim H. assumption.
40 qed.
41
42 theorem proj2: \forall A,B:Prop. (And A B) \to B.
43 intros. elim H. assumption.
44 qed.
45
46 inductive Or (A,B:Prop) : Prop \def
47      or_introl : A \to (Or A B)
48    | or_intror : B \to (Or A B).
49    
50 definition decidable : Prop \to Prop \def \lambda A:Prop. Or A (Not A).
51
52 inductive ex (A:Type) (P:A \to Prop) : Prop \def
53     ex_intro: \forall x:A. P x \to ex A P.
54
55 inductive ex2 (A:Type) (P,Q:A \to Prop) : Prop \def
56     ex_intro2: \forall x:A. P x \to Q x \to ex2 A P Q.