]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/library/logic/connectives.ma
More notation (up to where the open bugs allow me to put it without adding
[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 (*CSC: the URI must disappear: there is a bug now *)
30 interpretation "logical not" 'not x = (cic:/matita/logic/connectives/Not.con x).
31 (*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *)
32 alias symbol "not" (instance 0) = "logical not".
33
34 theorem absurd : \forall A,C:Prop. A \to \lnot A \to C.
35 intros. elim (H1 H).
36 qed.
37
38 default "absurd" cic:/matita/logic/connectives/absurd.con.
39
40 inductive And (A,B:Prop) : Prop \def
41     conj : A \to B \to (And A B).
42
43 (*CSC: the URI must disappear: there is a bug now *)
44 interpretation "logical and" 'and x y = (cic:/matita/logic/connectives/And.ind#xpointer(1/1) x y).
45 (*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *)
46 alias symbol "and" (instance 0) = "logical and".
47
48 theorem proj1: \forall A,B:Prop. A \land B \to A.
49 intros. elim H. assumption.
50 qed.
51
52 theorem proj2: \forall A,B:Prop. A \land B \to B.
53 intros. elim H. assumption.
54 qed.
55
56 inductive Or (A,B:Prop) : Prop \def
57      or_introl : A \to (Or A B)
58    | or_intror : B \to (Or A B).
59
60 (*CSC: the URI must disappear: there is a bug now *)
61 interpretation "logical or" 'or x y = (cic:/matita/logic/connectives/Or.ind#xpointer(1/1) x y).
62 (*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *)
63 alias symbol "or" (instance 0) = "logical or".
64    
65 definition decidable : Prop \to Prop \def \lambda A:Prop. A \lor \not A.
66
67 inductive ex (A:Type) (P:A \to Prop) : Prop \def
68     ex_intro: \forall x:A. P x \to ex A P.
69
70 inductive ex2 (A:Type) (P,Q:A \to Prop) : Prop \def
71     ex_intro2: \forall x:A. P x \to Q x \to ex2 A P Q.