1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/logic/connectives/".
17 inductive True: Prop \def
20 default "true" cic:/matita/logic/connectives/True.ind.
22 inductive False: Prop \def .
24 default "false" cic:/matita/logic/connectives/False.ind.
26 definition Not: Prop \to Prop \def
27 \lambda A. (A \to False).
29 (*CSC: the URI must disappear: there is a bug now *)
30 interpretation "logical not" 'not x = (cic:/matita/logic/connectives/Not.con x).
32 theorem absurd : \forall A,C:Prop. A \to \lnot A \to C.
36 default "absurd" cic:/matita/logic/connectives/absurd.con.
38 inductive And (A,B:Prop) : Prop \def
39 conj : A \to B \to (And A B).
41 (*CSC: the URI must disappear: there is a bug now *)
42 interpretation "logical and" 'and x y = (cic:/matita/logic/connectives/And.ind#xpointer(1/1) x y).
44 theorem proj1: \forall A,B:Prop. A \land B \to A.
45 intros. elim H. assumption.
48 theorem proj2: \forall A,B:Prop. A \land B \to B.
49 intros. elim H. assumption.
52 inductive Or (A,B:Prop) : Prop \def
53 or_introl : A \to (Or A B)
54 | or_intror : B \to (Or A B).
56 (*CSC: the URI must disappear: there is a bug now *)
57 interpretation "logical or" 'or x y =
58 (cic:/matita/logic/connectives/Or.ind#xpointer(1/1) x y).
62 \forall P: A \lor B \to Prop.
63 (\forall p:A. P (or_introl ? ? p)) \to
64 (\forall q:B. P (or_intror ? ? q)) \to
65 \forall p:A \lor B. P p.
68 (match p return \lambda p.P p with
69 [(or_introl p) \Rightarrow H p
70 |(or_intror q) \Rightarrow H1 q]).
73 definition decidable : Prop \to Prop \def \lambda A:Prop. A \lor \lnot A.
75 inductive ex (A:Type) (P:A \to Prop) : Prop \def
76 ex_intro: \forall x:A. P x \to ex A P.
78 (*CSC: the URI must disappear: there is a bug now *)
79 interpretation "exists" 'exists \eta.x =
80 (cic:/matita/logic/connectives/ex.ind#xpointer(1/1) _ x).
82 notation < "hvbox(\exists ident i opt (: ty) break . p)"
83 right associative with precedence 20
84 for @{ 'exists ${default
85 @{\lambda ${ident i} : $ty. $p)}
86 @{\lambda ${ident i} . $p}}}.
88 inductive ex2 (A:Type) (P,Q:A \to Prop) : Prop \def
89 ex_intro2: \forall x:A. P x \to Q x \to ex2 A P Q.