@@ -248,6 +248,8 @@ iff_true_intro $ λ_, trivial
248
248
theorem imp_iff_right (ha : a) : (a → b) ↔ b :=
249
249
⟨λf, f ha, imp_intro⟩
250
250
251
+ lemma imp_iff_not (hb : ¬ b) : a → b ↔ ¬ a := imp_congr_right $ λ _, iff_false_intro hb
252
+
251
253
theorem decidable.imp_iff_right_iff [decidable a] : ((a → b) ↔ b) ↔ (a ∨ b) :=
252
254
⟨λ H, (decidable.em a).imp_right $ λ ha', H.1 $ λ ha, (ha' ha).elim,
253
255
λ H, H.elim imp_iff_right $ λ hb, ⟨λ hab, hb, λ _ _, hb⟩⟩
@@ -1423,6 +1425,23 @@ lemma ite_eq_iff : ite P a b = c ↔ P ∧ a = c ∨ ¬ P ∧ b = c := by by_cas
1423
1425
@[simp] lemma ite_eq_left_iff : ite P a b = a ↔ (¬ P → b = a) := by by_cases P; simp *
1424
1426
@[simp] lemma ite_eq_right_iff : ite P a b = b ↔ (P → a = b) := by by_cases P; simp *
1425
1427
1428
+ lemma ite_ne_left_iff : ite P a b ≠ a ↔ ¬ P ∧ a ≠ b :=
1429
+ by rw [ne.def, ite_eq_left_iff, ne_comm, not_imp]
1430
+
1431
+ lemma ite_ne_right_iff : ite P a b ≠ b ↔ P ∧ a ≠ b := by rw [ne.def, ite_eq_right_iff, not_imp]
1432
+
1433
+ protected lemma ne.ite_eq_left_iff (h : a ≠ b) : ite P a b = a ↔ P :=
1434
+ ite_eq_left_iff.trans $ not_imp_comm.trans $ imp_iff_right h.symm
1435
+
1436
+ protected lemma ne.ite_eq_right_iff (h : a ≠ b) : ite P a b = b ↔ ¬ P :=
1437
+ ite_eq_right_iff.trans $ imp_iff_not h
1438
+
1439
+ protected lemma ne.ite_ne_left_iff (h : a ≠ b) : ite P a b ≠ a ↔ ¬ P :=
1440
+ ite_ne_left_iff.trans $ and_iff_left h
1441
+
1442
+ protected lemma ne.ite_ne_right_iff (h : a ≠ b) : ite P a b ≠ b ↔ P :=
1443
+ ite_ne_right_iff.trans $ and_iff_left h
1444
+
1426
1445
variables (P Q) (a b)
1427
1446
1428
1447
lemma ite_eq_or_eq : ite P a b = a ∨ ite P a b = b :=
0 commit comments