@@ -50,7 +50,7 @@ eq_comm.trans of_to_bool_iff
50
50
@[simp] lemma ff_eq_to_bool_iff {p : Prop } [decidable p] : ff = to_bool p ↔ ¬ p :=
51
51
eq_comm.trans (to_bool_ff_iff _)
52
52
53
- @[simp] theorem to_bool_not (p : Prop ) [decidable p] : to_bool (¬ p) = bnot (to_bool p) :=
53
+ @[simp] theorem to_bool_not (p : Prop ) [decidable p] : to_bool (¬ p) = ! (to_bool p) :=
54
54
by by_cases p; simp *
55
55
56
56
@[simp] theorem to_bool_and (p q : Prop ) [decidable p] [decidable q] :
@@ -137,21 +137,29 @@ lemma band_bor_distrib_right (a b c : bool) : (a || b) && c = a && c || b && c :
137
137
lemma bor_band_distrib_left (a b c : bool) : a || b && c = (a || b) && (a || c) := by cases a; simp
138
138
lemma bor_band_distrib_right (a b c : bool) : a && b || c = (a || c) && (b || c) := by cases c; simp
139
139
140
- @[simp] theorem bnot_false : bnot ff = tt := rfl
140
+ @[simp] theorem bnot_ff : ! ff = tt := rfl
141
141
142
- @[simp] theorem bnot_true : bnot tt = ff := rfl
142
+ @[simp] theorem bnot_tt : !tt = ff := rfl
143
+
144
+ lemma eq_bnot_iff : ∀ {a b : bool}, a = !b ↔ a ≠ b := dec_trivial
145
+ lemma bnot_eq_iff : ∀ {a b : bool}, !a = b ↔ a ≠ b := dec_trivial
143
146
144
147
@[simp] lemma not_eq_bnot : ∀ {a b : bool}, ¬a = !b ↔ a = b := dec_trivial
145
148
@[simp] lemma bnot_not_eq : ∀ {a b : bool}, ¬!a = b ↔ a = b := dec_trivial
146
149
147
150
lemma ne_bnot {a b : bool} : a ≠ !b ↔ a = b := not_eq_bnot
148
151
lemma bnot_ne {a b : bool} : !a ≠ b ↔ a = b := bnot_not_eq
149
152
153
+ lemma bnot_ne_self : ∀ b : bool, !b ≠ b := dec_trivial
154
+ lemma self_ne_bnot : ∀ b : bool, b ≠ !b := dec_trivial
155
+
156
+ lemma eq_or_eq_bnot : ∀ a b, a = b ∨ a = !b := dec_trivial
157
+
150
158
@[simp] theorem bnot_iff_not : ∀ {b : bool}, !b ↔ ¬b := dec_trivial
151
159
152
- theorem eq_tt_of_bnot_eq_ff : ∀ {a : bool}, bnot a = ff → a = tt := dec_trivial
160
+ theorem eq_tt_of_bnot_eq_ff : ∀ {a : bool}, ! a = ff → a = tt := dec_trivial
153
161
154
- theorem eq_ff_of_bnot_eq_tt : ∀ {a : bool}, bnot a = tt → a = ff := dec_trivial
162
+ theorem eq_ff_of_bnot_eq_tt : ∀ {a : bool}, ! a = tt → a = ff := dec_trivial
155
163
156
164
@[simp] lemma band_bnot_self : ∀ x, x && !x = ff := dec_trivial
157
165
@[simp] lemma bnot_band_self : ∀ x, !x && x = ff := dec_trivial
0 commit comments