Skip to content

Commit

Permalink
feat(Algebra/GroupWithZero/Units/Lemmas): div_div_div_cancel_left' (#…
Browse files Browse the repository at this point in the history
…6606)

Co-authored-by: Moritz Firsching <firsching@google.com>
  • Loading branch information
mo271 and mo271 committed Aug 16, 2023
1 parent 38c0722 commit ee38ee9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
Expand Up @@ -199,6 +199,9 @@ theorem div_helper (b : G₀) (h : a ≠ 0) : 1 / (a * b) * a = 1 / b := by
rw [div_mul_eq_mul_div, one_mul, div_mul_right _ h]
#align div_helper div_helper

theorem div_div_div_cancel_left' (a b : G₀) (hc : c ≠ 0) : c / a / (c / b) = b / a := by
rw [div_div_div_eq, mul_comm, mul_div_mul_right _ _ hc]

end CommGroupWithZero

section MonoidWithZero
Expand Down
6 changes: 2 additions & 4 deletions Mathlib/Analysis/SpecialFunctions/Log/Base.lean
Expand Up @@ -102,10 +102,8 @@ theorem mul_logb {a b c : ℝ} (h₁ : b ≠ 0) (h₂ : b ≠ 1) (h₃ : b ≠ -
#align real.mul_logb Real.mul_logb

theorem div_logb {a b c : ℝ} (h₁ : c ≠ 0) (h₂ : c ≠ 1) (h₃ : c ≠ -1) :
logb a c / logb b c = logb a b := by
unfold logb
-- TODO: div_div_div_cancel_left is missing for `group_with_zero`,
rw [div_div_div_eq, mul_comm, mul_div_mul_right _ _ (log_ne_zero.mpr ⟨h₁, h₂, h₃⟩)]
logb a c / logb b c = logb a b :=
div_div_div_cancel_left' _ _ <| log_ne_zero.mpr ⟨h₁, h₂, h₃⟩
#align real.div_logb Real.div_logb

section BPosAndNeOne
Expand Down

0 comments on commit ee38ee9

Please sign in to comment.