Skip to content

Commit d066754

Browse files
committed
feat(MeasureTheory/Integral/Average): add exists_eq_setAverage; delete Average/MeanValue file
1 parent 07e3875 commit d066754

2 files changed

Lines changed: 18 additions & 55 deletions

File tree

Mathlib/MeasureTheory/Integral/Average.lean

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
22
Copyright (c) 2022 Yury Kudryashov. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Yury Kudryashov, Yaël Dillies
4+
Authors: Yury Kudryashov, Yaël Dillies, Louis (Yiyang) Liu
55
-/
66
module
77

@@ -33,7 +33,7 @@ function, we provide a convenience lemma `MeasureTheory.Integrable.to_average`.
3333
3434
## Tags
3535
36-
integral, center mass, average value
36+
integral, center mass, average value, set average
3737
-/
3838

3939
@[expose] public section
@@ -797,4 +797,20 @@ theorem tendsto_integral_smul_of_tendsto_average_norm_sub
797797
simp only [one_smul, zero_add] at this
798798
exact Tendsto.congr' I this
799799

800+
/-- If `s` is a connected set of finite, nonzero `μ`-measure and `f : α → ℝ` is continuous on `s`
801+
and integrable on `s` w.r.t. `μ`, then `f` attains its `μ`-average on `s`. -/
802+
theorem exists_eq_setAverage
803+
[TopologicalSpace α] {f : α → ℝ} (hs : IsConnected s) (hf : ContinuousOn f s)
804+
(hint : IntegrableOn f s μ) (hμfin : μ s ≠ ⊤) (hμ0 : μ s ≠ 0) :
805+
∃ c ∈ s, f c = ⨍ x in s, f x ∂μ := by
806+
let ave := ⨍ x in s, f x ∂μ
807+
let S₁ : Set α := {x | x ∈ s ∧ f x ≤ ave}
808+
let S₂ : Set α := {x | x ∈ s ∧ ave ≤ f x}
809+
have hS₁ : 0 < μ S₁ := measure_le_setAverage_pos hμ0 hμfin hint
810+
have hS₂ : 0 < μ S₂ := measure_setAverage_le_pos hμ0 hμfin hint
811+
rcases nonempty_of_measure_ne_zero hS₁.ne' with ⟨c₁, hc₁⟩
812+
rcases nonempty_of_measure_ne_zero hS₂.ne' with ⟨c₂, hc₂⟩
813+
apply hs.isPreconnected.intermediate_value hc₁.1 hc₂.1 hf
814+
grind
815+
800816
end MeasureTheory

Mathlib/MeasureTheory/Integral/Average/MeanValue.lean

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)