Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Mathlib/Analysis/SpecialFunctions/Log/PosLog.lean
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ theorem posLog_prod {α : Type*} (s : Finset α) (f : α → ℝ) :
## Estimates for Sums
-/

-- TODO: non-terminal simp followed by positivity
set_option linter.flexible false in
/-- Estimate for `log⁺` of a sum. See `Real.posLog_add` for a variant involving
just two summands. -/
theorem posLog_sum {α : Type*} (s : Finset α) (f : α → ℝ) :
Expand All @@ -176,7 +174,7 @@ theorem posLog_sum {α : Type*} (s : Finset α) (f : α → ℝ) :
apply monotoneOn_posLog (by simp) (by simp [Finset.sum_nonneg])
simp [Finset.abs_sum_le_sum_abs]
_ ≤ log⁺ (∑ t ∈ s, |f t_max|) := by
apply monotoneOn_posLog (by simp [Finset.sum_nonneg]) (by simp; positivity)
apply monotoneOn_posLog (by simp [Finset.sum_nonneg]) (by simp [mul_nonneg])
apply Finset.sum_le_sum (fun i ih ↦ ht_max.2 i ih)
_ = log⁺ (s.card * |f t_max|) := by
simp [Finset.sum_const]
Expand Down
Loading