Skip to content

Commit

Permalink
feat(logic/basic): eq_iff_eq_cancel (#1447)
Browse files Browse the repository at this point in the history
* feat(logic/basic): eq_iff_eq_cancel

These lemmas or not meant for `rw` but to be applied, as a sort of congruence lemma.

* State lemmas as iff

* Make'm simp
  • Loading branch information
jcommelin authored and mergify[bot] committed Sep 17, 2019
1 parent c412527 commit d4cc179
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/logic/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ attribute [symm] ne.symm

lemma ne_comm {α} {a b : α} : a ≠ b ↔ b ≠ a := ⟨ne.symm, ne.symm⟩

@[simp] lemma eq_iff_eq_cancel_left {b c : α} :
(∀ {a}, a = b ↔ a = c) ↔ (b = c) :=
⟨λ h, by rw [← h], λ h a, by rw h⟩

@[simp] lemma eq_iff_eq_cancel_right {a b : α} :
(∀ {c}, a = c ↔ b = c) ↔ (a = b) :=
⟨λ h, by rw h, λ h a, by rw h⟩

end miscellany

/-
Expand Down

0 comments on commit d4cc179

Please sign in to comment.