From: Stefano Zacchiroli Date: Mon, 7 Nov 2005 10:04:22 +0000 (+0000) Subject: added bool_elim (elimination which preserves infos on the eliminated value) X-Git-Tag: V_0_7_2_3~123 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=8881e203658bb17d37bdea24ea3e104d0466e2e8;p=helm.git added bool_elim (elimination which preserves infos on the eliminated value) --- diff --git a/helm/matita/library/datatypes/bool.ma b/helm/matita/library/datatypes/bool.ma index a4667da30..11f1d7a8c 100644 --- a/helm/matita/library/datatypes/bool.ma +++ b/helm/matita/library/datatypes/bool.ma @@ -19,7 +19,18 @@ 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. change with