]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/library/logic.ma
version 0.7.1
[helm.git] / helm / matita / library / logic.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/".
16
17
18 inductive True: Prop \def
19 I : True.
20
21 default "true" cic:/matita/logic/True.ind.
22
23 inductive False: Prop \def .
24
25 default "false" cic:/matita/logic/False.ind.
26
27 definition Not: Prop \to Prop \def
28 \lambda A. (A \to False).
29
30 theorem absurd : \forall A,C:Prop. A \to Not A \to C.
31 intros. elim (H1 H).
32 qed.
33
34 default "absurd" cic:/matita/logic/absurd.ind.
35
36 inductive And (A,B:Prop) : Prop \def
37     conj : A \to B \to (And A B).
38
39 theorem proj1: \forall A,B:Prop. (And A B) \to A.
40 intros. elim H. assumption.
41 qed.
42
43 theorem proj2: \forall A,B:Prop. (And A B) \to A.
44 intros. elim H. assumption.
45 qed.
46
47 inductive Or (A,B:Prop) : Prop \def
48      or_introl : A \to (Or A B)
49    | or_intror : B \to (Or A B).
50
51 inductive ex (A:Type) (P:A \to Prop) : Prop \def
52     ex_intro: \forall x:A. P x \to ex A P.
53
54 inductive ex2 (A:Type) (P,Q:A \to Prop) : Prop \def
55     ex_intro2: \forall x:A. P x \to Q x \to ex2 A P Q.