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/datatypes/bool/".
17 include "logic/equality.ma".
19 inductive bool : Set \def
23 theorem not_eq_true_false : \lnot true = false.
27 [ true \Rightarrow False
28 | flase \Rightarrow True].
29 rewrite > H.simplify.exact I.
32 definition notb : bool \to bool \def
35 [ true \Rightarrow false
36 | false \Rightarrow true ].
38 theorem notb_elim: \forall b:bool.\forall P:bool \to Prop.
40 [ true \Rightarrow P false
41 | false \Rightarrow P true] \to P (notb b).
42 intros 2.elim b.exact H. exact H.
45 (*CSC: the URI must disappear: there is a bug now *)
46 interpretation "boolean not" 'not x = (cic:/matita/datatypes/bool/notb.con x).
48 definition andb : bool \to bool \to bool\def
52 | false \Rightarrow false ].
54 theorem andb_elim: \forall b1,b2:bool. \forall P:bool \to Prop.
56 [ true \Rightarrow P b2
57 | false \Rightarrow P false] \to P (andb b1 b2).
58 intros 3.elim b1.exact H. exact H.
61 (*CSC: the URI must disappear: there is a bug now *)
62 interpretation "boolean and" 'and x y = (cic:/matita/datatypes/bool/andb.con x y).
64 definition orb : bool \to bool \to bool\def
67 [ true \Rightarrow true
68 | false \Rightarrow b2].
70 theorem orb_elim: \forall b1,b2:bool. \forall P:bool \to Prop.
72 [ true \Rightarrow P true
73 | false \Rightarrow P b2] \to P (orb b1 b2).
74 intros 3.elim b1.exact H. exact H.
77 (*CSC: the URI must disappear: there is a bug now *)
78 interpretation "boolean or" 'or x y = (cic:/matita/datatypes/bool/orb.con x y).
80 definition if_then_else : bool \to Prop \to Prop \to Prop \def
81 \lambda b:bool.\lambda P,Q:Prop.
84 | false \Rightarrow Q].
86 (*CSC: missing notation for if_then_else *)