X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Fdatatypes%2Fbool.ma;h=c9a86165a24f1aaea48b235d4f5b140df29a97db;hb=0e9f9d6d7a0466ee132553fb7a983eac282fb12f;hp=37a2a377d6fd39320fc8dfbdeeb1820de0fd1b25;hpb=6d49a181a1b771f797d37b02661b5743aee86ac1;p=helm.git diff --git a/helm/software/matita/library/datatypes/bool.ma b/helm/software/matita/library/datatypes/bool.ma index 37a2a377d..c9a86165a 100644 --- a/helm/software/matita/library/datatypes/bool.ma +++ b/helm/software/matita/library/datatypes/bool.ma @@ -12,9 +12,8 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/datatypes/bool/". - include "logic/equality.ma". +include "higher_order_defs/functions.ma". inductive bool : Set \def | true : bool @@ -36,7 +35,7 @@ unfold Not.intro. change with match true with [ true \Rightarrow False -| flase \Rightarrow True]. +| false \Rightarrow True]. rewrite > H.simplify.exact I. qed. @@ -53,6 +52,20 @@ match b with intros 2.elim b.exact H. exact H. qed. +theorem notb_notb: \forall b:bool. notb (notb b) = b. +intros. +elim b;reflexivity. +qed. + +theorem injective_notb: injective bool bool notb. +unfold injective. +intros. +rewrite < notb_notb. +rewrite < (notb_notb y). +apply eq_f. +assumption. +qed. + (*CSC: the URI must disappear: there is a bug now *) interpretation "boolean not" 'not x = (cic:/matita/datatypes/bool/notb.con x). @@ -72,6 +85,18 @@ match b1 with intros 3.elim b1.exact H. exact H. qed. +theorem and_true: \forall a,b:bool. +andb a b =true \to a =true \land b= true. +intro.elim a + [split + [reflexivity|assumption] + |apply False_ind. + apply not_eq_true_false. + apply sym_eq. + assumption + ] +qed. + theorem andb_true_true: \forall b1,b2. (b1 \land b2) = true \to b1 = true. intro. elim b1. reflexivity. @@ -169,4 +194,4 @@ intros. rewrite > H. rewrite > H1. reflexivity. -qed. \ No newline at end of file +qed.