X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2Fdatatypes%2Fbool.ma;h=3292e6789610f6114c590be58d18c729a3bf92fe;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=a4667da30249730b98bc4f39c522dd824a180019;hpb=69dc6031c9e0574fa7a74ced74deeb7f9ec5695b;p=helm.git diff --git a/helm/matita/library/datatypes/bool.ma b/helm/matita/library/datatypes/bool.ma index a4667da30..3292e6789 100644 --- a/helm/matita/library/datatypes/bool.ma +++ b/helm/matita/library/datatypes/bool.ma @@ -19,9 +19,20 @@ include "logic/equality.ma". inductive bool : Set \def | true : bool | false : bool. - + +theorem bool_elim: \forall P:bool \to Prop. \forall b:bool. + (b = true \to P true) + \to (b = false \to P false) + \to P b. + intros 2 (P b). + elim b; + [ apply H; reflexivity + | apply H1; reflexivity + ] +qed. + theorem not_eq_true_false : true \neq false. -simplify.intro. +unfold Not.intro. change with match true with [ true \Rightarrow False @@ -51,15 +62,21 @@ definition andb : bool \to bool \to bool\def [ true \Rightarrow b2 | false \Rightarrow false ]. +(*CSC: the URI must disappear: there is a bug now *) +interpretation "boolean and" 'and x y = (cic:/matita/datatypes/bool/andb.con x y). + theorem andb_elim: \forall b1,b2:bool. \forall P:bool \to Prop. match b1 with [ true \Rightarrow P b2 -| false \Rightarrow P false] \to P (andb b1 b2). +| false \Rightarrow P false] \to P (b1 \land b2). intros 3.elim b1.exact H. exact H. qed. -(*CSC: the URI must disappear: there is a bug now *) -interpretation "boolean and" 'and x y = (cic:/matita/datatypes/bool/andb.con x y). +theorem andb_true_true: \forall b1,b2. (b1 \land b2) = true \to b1 = true. +intro. elim b1. +reflexivity. +assumption. +qed. definition orb : bool \to bool \to bool\def \lambda b1,b2:bool.