]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/lib/basics/bool.ma
Extensions to finset (sum) and auxiliary lemmas.
[helm.git] / matita / matita / lib / basics / bool.ma
index 43a3369a393d0c9e4725610beac64ceb868b6e6a..587ab9ed6fde1a22ce752675be2313aaa60df731 100644 (file)
@@ -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.
 
+