X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fmatita%2Flib%2Fbasics%2Fbool.ma;h=587ab9ed6fde1a22ce752675be2313aaa60df731;hb=a87c9d012b588c381dc82c53fd0652762a9e50c9;hp=43a3369a393d0c9e4725610beac64ceb868b6e6a;hpb=dec09d382f401b62b3ee183c9b60b883d0d33255;p=helm.git diff --git a/matita/matita/lib/basics/bool.ma b/matita/matita/lib/basics/bool.ma index 43a3369a3..587ab9ed6 100644 --- a/matita/matita/lib/basics/bool.ma +++ b/matita/matita/lib/basics/bool.ma @@ -37,6 +37,14 @@ theorem notb_notb: ∀b:bool. notb (notb b) = b. theorem injective_notb: injective bool bool notb. #b1 #b2 #H // qed. +theorem noteq_to_eqnot: ∀b1,b2. b1 ≠ b2 → b1 = notb b2. +* * // #H @False_ind /2/ +qed. + +theorem eqnot_to_noteq: ∀b1,b2. b1 = notb b2 → b1 ≠ b2. +* * normalize // #_ @(not_to_not … not_eq_true_false) // +qed. + definition andb : bool → bool → bool ≝ λb1,b2:bool. match b1 with [ true ⇒ b2 | false ⇒ false ]. @@ -46,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. @@ -95,3 +107,4 @@ theorem true_or_false: ∀b:bool. b = true ∨ b = false. #b (cases b) /2/ qed. +