Skip to content

Commit

Permalink
chore(logic/basic): +2 simp lemmas (#5500)
Browse files Browse the repository at this point in the history
* simplify `a ∨ b ↔ a` to `b → a`;
* simplify `a ∨ b ↔ b` to `a → b`.
  • Loading branch information
urkud committed Dec 25, 2020
1 parent 1f0231d commit f60fd08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/ordmap/ordset.lean
Expand Up @@ -155,7 +155,7 @@ theorem balanced_sz.symm {l r : ℕ} : balanced_sz l r → balanced_sz r l :=
or.imp (by rw add_comm; exact id) and.symm

theorem balanced_sz_zero {l : ℕ} : balanced_sz l 0 ↔ l ≤ 1 :=
by simp [balanced_sz]; apply or_iff_left_of_imp; rintro rfl; exact zero_le_one
by simp [balanced_sz] { contextual := tt }

theorem balanced_sz_up {l r₁ r₂ : ℕ} (h₁ : r₁ ≤ r₂)
(h₂ : l + r₂ ≤ 1 ∨ r₂ ≤ delta * l)
Expand Down
6 changes: 6 additions & 0 deletions src/logic/basic.lean
Expand Up @@ -383,6 +383,12 @@ protected theorem decidable.not_imp_not [decidable a] : (¬ a → ¬ b) ↔ (b

theorem not_imp_not : (¬ a → ¬ b) ↔ (b → a) := decidable.not_imp_not

@[simp] theorem or_iff_left_iff_imp : (a ∨ b ↔ a) ↔ (b → a) :=
⟨λ h hb, h.1 (or.inr hb), or_iff_left_of_imp⟩

@[simp] theorem or_iff_right_iff_imp : (a ∨ b ↔ b) ↔ (a → b) :=
by rw [or_comm, or_iff_left_iff_imp]

/-! ### Declarations about distributivity -/

/-- `∧` distributes over `∨` (on the left). -/
Expand Down

0 comments on commit f60fd08

Please sign in to comment.