X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Fbasics%2Fbool.ma;h=0d790efc54c590f0e5e8b4f47257d5b9ad99ad3f;hb=600fba840c748f67593838673a6eb40eab9b68e5;hp=fb0106f12501b1d1b951f64dd912d669a1618203;hpb=c2c729ed092b9bad8b004bb8f8dea6e0f4471995;p=helm.git diff --git a/matita/matita/lib/basics/bool.ma b/matita/matita/lib/basics/bool.ma index fb0106f12..0d790efc5 100644 --- a/matita/matita/lib/basics/bool.ma +++ b/matita/matita/lib/basics/bool.ma @@ -54,6 +54,10 @@ theorem andb_elim: ∀ b1,b2:bool. ∀ P:bool → Prop. match b1 with [ true ⇒ P b2 | false ⇒ P false] → P (b1 ∧ b2). #b1 #b2 #P (elim b1) normalize // qed. +theorem true_to_andb_true: ∀b1,b2. b1 = true → b2 = true → (b1 ∧ b2) = true. +#b1 cases b1 normalize // +qed. + theorem andb_true_l: ∀ b1,b2. (b1 ∧ b2) = true → b1 = true. #b1 (cases b1) normalize // qed. @@ -93,7 +97,7 @@ definition xorb : bool → bool → bool ≝ notation > "'if' term 46 e 'then' term 46 t 'else' term 46 f" non associative with precedence 46 for @{ match $e in bool with [ true ⇒ $t | false ⇒ $f] }. notation < "hvbox('if' \nbsp term 46 e \nbsp break 'then' \nbsp term 46 t \nbsp break 'else' \nbsp term 49 f \nbsp)" non associative with precedence 46 - for @{ match $e with [ true ⇒ $t | false ⇒ $f] }. + for @{ match $e return $T with [ true ⇒ $t | false ⇒ $f] }. theorem bool_to_decidable_eq: ∀b1,b2:bool. decidable (b1=b2).