fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
Lp_add_le (f g : ι → ℝ≥0) {p : ℝ} (hp : 1 ≤ p) : (∑ i ∈ s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) + (∑ i ∈ s, g i ^ p) ^ (1 / p) := by rcases eq_or_lt_of_le hp with (rfl | hp) · simp [Finset.sum_add_distrib] have hpq := Real.HolderConjugate.conjExponent hp have := isGreatest_Lp s (f + g) hpq simp only [Pi.add_apply, add_mul, sum_add_distrib] at this rcases this.1 with ⟨φ, hφ, H⟩ rw [← H] exact add_le_add ((isGreatest_Lp s f hpq).2 ⟨φ, hφ, rfl⟩) ((isGreatest_Lp s g hpq).2 ⟨φ, hφ, rfl⟩)
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le
**Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal to the sum of the `L_p`-seminorms of the summands. A version for `NNReal`-valued functions.
Lp_add_le_tsum {f g : ι → ℝ≥0} {p : ℝ} (hp : 1 ≤ p) (hf : Summable fun i => f i ^ p) (hg : Summable fun i => g i ^ p) : (Summable fun i => (f i + g i) ^ p) ∧ (∑' i, (f i + g i) ^ p) ^ (1 / p) ≤ (∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p) := by have pos : 0 < p := lt_of_lt_of_le zero_lt_one hp have H₁ : ∀ s : Finset ι, (∑ i ∈ s, (f i + g i) ^ p) ≤ ((∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p)) ^ p := by intro s rw [one_div, ← NNReal.rpow_inv_le_iff pos, ← one_div] refine le_trans (Lp_add_le s f g hp) (add_le_add ?_ ?_) <;> rw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr pos)] <;> refine Summable.sum_le_tsum _ (fun _ _ => zero_le _) ?_ exacts [hf, hg] have bdd : BddAbove (Set.range fun s => ∑ i ∈ s, (f i + g i) ^ p) := by refine ⟨((∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p)) ^ p, ?_⟩ rintro a ⟨s, rfl⟩ exact H₁ s have H₂ : Summable _ := (hasSum_of_isLUB _ (isLUB_ciSup bdd)).summable refine ⟨H₂, ?_⟩ rw [one_div, NNReal.rpow_inv_le_iff pos, ← one_div] exact H₂.tsum_le_of_sum_le H₁
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_tsum
**Minkowski inequality**: the `L_p` seminorm of the infinite sum of two vectors is less than or equal to the infinite sum of the `L_p`-seminorms of the summands, if these infinite sums both exist. A version for `NNReal`-valued functions. For an alternative version, convenient if the infinite sums are already expressed as `p`-th powers, see `Lp_add_le_hasSum_of_nonneg`.
summable_Lp_add {f g : ι → ℝ≥0} {p : ℝ} (hp : 1 ≤ p) (hf : Summable fun i => f i ^ p) (hg : Summable fun i => g i ^ p) : Summable fun i => (f i + g i) ^ p := (Lp_add_le_tsum hp hf hg).1
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
summable_Lp_add
null
Lp_add_le_tsum' {f g : ι → ℝ≥0} {p : ℝ} (hp : 1 ≤ p) (hf : Summable fun i => f i ^ p) (hg : Summable fun i => g i ^ p) : (∑' i, (f i + g i) ^ p) ^ (1 / p) ≤ (∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p) := (Lp_add_le_tsum hp hf hg).2
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_tsum'
null
Lp_add_le_hasSum {f g : ι → ℝ≥0} {A B : ℝ≥0} {p : ℝ} (hp : 1 ≤ p) (hf : HasSum (fun i => f i ^ p) (A ^ p)) (hg : HasSum (fun i => g i ^ p) (B ^ p)) : ∃ C, C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p) := by have hp' : p ≠ 0 := (lt_of_lt_of_le zero_lt_one hp).ne' obtain ⟨H₁, H₂⟩ := Lp_add_le_tsum hp hf.summable hg.summable have hA : A = (∑' i : ι, f i ^ p) ^ (1 / p) := by rw [hf.tsum_eq, rpow_inv_rpow_self hp'] have hB : B = (∑' i : ι, g i ^ p) ^ (1 / p) := by rw [hg.tsum_eq, rpow_inv_rpow_self hp'] refine ⟨(∑' i, (f i + g i) ^ p) ^ (1 / p), ?_, ?_⟩ · simpa [hA, hB] using H₂ · simpa only [rpow_self_rpow_inv hp'] using H₁.hasSum
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_hasSum
**Minkowski inequality**: the `L_p` seminorm of the infinite sum of two vectors is less than or equal to the infinite sum of the `L_p`-seminorms of the summands, if these infinite sums both exist. A version for `NNReal`-valued functions. For an alternative version, convenient if the infinite sums are not already expressed as `p`-th powers, see `Lp_add_le_tsum_of_nonneg`.
inner_le_Lp_mul_Lq (hpq : HolderConjugate p q) : ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q) := by have := NNReal.coe_le_coe.2 (NNReal.inner_le_Lp_mul_Lq s (fun i => ⟨_, abs_nonneg (f i)⟩) (fun i => ⟨_, abs_nonneg (g i)⟩) hpq) push_cast at this refine le_trans (sum_le_sum fun i _ => ?_) this simp only [← abs_mul, le_abs_self]
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_Lp_mul_Lq
**Hölder inequality**: the scalar product of two functions is bounded by the product of their `L^p` and `L^q` norms when `p` and `q` are conjugate exponents. Version for sums over finite sets, with real-valued functions.
rpow_sum_le_const_mul_sum_rpow (hp : 1 ≤ p) : (∑ i ∈ s, |f i|) ^ p ≤ (#s : ℝ) ^ (p - 1) * ∑ i ∈ s, |f i| ^ p := by have := NNReal.coe_le_coe.2 (NNReal.rpow_sum_le_const_mul_sum_rpow s (fun i => ⟨_, abs_nonneg (f i)⟩) hp) push_cast at this exact this
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
rpow_sum_le_const_mul_sum_rpow
For `1 ≤ p`, the `p`-th power of the sum of `f i` is bounded above by a constant times the sum of the `p`-th powers of `f i`. Version for sums over finite sets, with `ℝ`-valued functions.
Lp_add_le (hp : 1 ≤ p) : (∑ i ∈ s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) + (∑ i ∈ s, |g i| ^ p) ^ (1 / p) := by have := NNReal.coe_le_coe.2 (NNReal.Lp_add_le s (fun i => ⟨_, abs_nonneg (f i)⟩) (fun i => ⟨_, abs_nonneg (g i)⟩) hp) push_cast at this refine le_trans (rpow_le_rpow ?_ (sum_le_sum fun i _ => ?_) ?_) this <;> simp [sum_nonneg, rpow_nonneg, abs_nonneg, le_trans zero_le_one hp, abs_add_le, rpow_le_rpow] variable {f g}
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le
**Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal to the sum of the `L_p`-seminorms of the summands. A version for `Real`-valued functions.
inner_le_Lp_mul_Lq_of_nonneg (hpq : HolderConjugate p q) (hf : ∀ i ∈ s, 0 ≤ f i) (hg : ∀ i ∈ s, 0 ≤ g i) : ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q) := by convert inner_le_Lp_mul_Lq s f g hpq using 3 <;> apply sum_congr rfl <;> intro i hi <;> simp only [abs_of_nonneg, hf i hi, hg i hi]
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_Lp_mul_Lq_of_nonneg
**Hölder inequality**: the scalar product of two functions is bounded by the product of their `L^p` and `L^q` norms when `p` and `q` are conjugate exponents. Version for sums over finite sets, with real-valued nonnegative functions.
inner_le_weight_mul_Lp_of_nonneg (s : Finset ι) {p : ℝ} (hp : 1 ≤ p) (w f : ι → ℝ) (hw : ∀ i, 0 ≤ w i) (hf : ∀ i, 0 ≤ f i) : ∑ i ∈ s, w i * f i ≤ (∑ i ∈ s, w i) ^ (1 - p⁻¹) * (∑ i ∈ s, w i * f i ^ p) ^ p⁻¹ := by lift w to ι → ℝ≥0 using hw lift f to ι → ℝ≥0 using hf beta_reduce at * norm_cast at * exact NNReal.inner_le_weight_mul_Lp _ hp _ _
lemma
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_weight_mul_Lp_of_nonneg
**Weighted Hölder inequality**.
compact_inner_le_weight_mul_Lp_of_nonneg (s : Finset ι) {p : ℝ} (hp : 1 ≤ p) {w f : ι → ℝ} (hw : ∀ i, 0 ≤ w i) (hf : ∀ i, 0 ≤ f i) : 𝔼 i ∈ s, w i * f i ≤ (𝔼 i ∈ s, w i) ^ (1 - p⁻¹) * (𝔼 i ∈ s, w i * f i ^ p) ^ p⁻¹ := by simp_rw [expect_eq_sum_div_card] rw [div_rpow, div_rpow, div_mul_div_comm, ← rpow_add', sub_add_cancel, rpow_one] · gcongr exact inner_le_weight_mul_Lp_of_nonneg s hp _ _ hw hf any_goals simp · exact sum_nonneg fun i _ ↦ by have := hw i; have := hf i; positivity · exact sum_nonneg fun i _ ↦ by have := hw i; positivity
lemma
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
compact_inner_le_weight_mul_Lp_of_nonneg
**Weighted Hölder inequality** in terms of `Finset.expect`.
inner_le_Lp_mul_Lq_tsum_of_nonneg (hpq : p.HolderConjugate q) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ q) : (Summable fun i => f i * g i) ∧ ∑' i, f i * g i ≤ (∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q) := by lift f to ι → ℝ≥0 using hf lift g to ι → ℝ≥0 using hg beta_reduce at * norm_cast at * exact NNReal.inner_le_Lp_mul_Lq_tsum hpq hf_sum hg_sum
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_Lp_mul_Lq_tsum_of_nonneg
**Hölder inequality**: the scalar product of two functions is bounded by the product of their `L^p` and `L^q` norms when `p` and `q` are conjugate exponents. A version for `ℝ`-valued functions. For an alternative version, convenient if the infinite sums are already expressed as `p`-th powers, see `inner_le_Lp_mul_Lq_hasSum_of_nonneg`.
summable_mul_of_Lp_Lq_of_nonneg (hpq : p.HolderConjugate q) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ q) : Summable fun i => f i * g i := (inner_le_Lp_mul_Lq_tsum_of_nonneg hpq hf hg hf_sum hg_sum).1
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
summable_mul_of_Lp_Lq_of_nonneg
null
inner_le_Lp_mul_Lq_tsum_of_nonneg' (hpq : p.HolderConjugate q) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ q) : ∑' i, f i * g i ≤ (∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q) := (inner_le_Lp_mul_Lq_tsum_of_nonneg hpq hf hg hf_sum hg_sum).2
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_Lp_mul_Lq_tsum_of_nonneg'
null
inner_le_Lp_mul_Lq_hasSum_of_nonneg (hpq : p.HolderConjugate q) {A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : HasSum (fun i => f i ^ p) (A ^ p)) (hg_sum : HasSum (fun i => g i ^ q) (B ^ q)) : ∃ C : ℝ, 0 ≤ C ∧ C ≤ A * B ∧ HasSum (fun i => f i * g i) C := by lift f to ι → ℝ≥0 using hf lift g to ι → ℝ≥0 using hg lift A to ℝ≥0 using hA lift B to ℝ≥0 using hB beta_reduce at * norm_cast at hf_sum hg_sum obtain ⟨C, hC, H⟩ := NNReal.inner_le_Lp_mul_Lq_hasSum hpq hf_sum hg_sum refine ⟨C, C.prop, hC, ?_⟩ norm_cast
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_Lp_mul_Lq_hasSum_of_nonneg
**Hölder inequality**: the scalar product of two functions is bounded by the product of their `L^p` and `L^q` norms when `p` and `q` are conjugate exponents. A version for `NNReal`-valued functions. For an alternative version, convenient if the infinite sums are not already expressed as `p`-th powers, see `inner_le_Lp_mul_Lq_tsum_of_nonneg`.
rpow_sum_le_const_mul_sum_rpow_of_nonneg (hp : 1 ≤ p) (hf : ∀ i ∈ s, 0 ≤ f i) : (∑ i ∈ s, f i) ^ p ≤ (#s : ℝ) ^ (p - 1) * ∑ i ∈ s, f i ^ p := by convert rpow_sum_le_const_mul_sum_rpow s f hp using 2 <;> apply sum_congr rfl <;> intro i hi <;> simp only [abs_of_nonneg, hf i hi]
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
rpow_sum_le_const_mul_sum_rpow_of_nonneg
For `1 ≤ p`, the `p`-th power of the sum of `f i` is bounded above by a constant times the sum of the `p`-th powers of `f i`. Version for sums over finite sets, with nonnegative `ℝ`-valued functions.
Lp_add_le_of_nonneg (hp : 1 ≤ p) (hf : ∀ i ∈ s, 0 ≤ f i) (hg : ∀ i ∈ s, 0 ≤ g i) : (∑ i ∈ s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) + (∑ i ∈ s, g i ^ p) ^ (1 / p) := by convert Lp_add_le s f g hp using 2 <;> [skip;congr 1;congr 1] <;> apply sum_congr rfl <;> intro i hi <;> simp only [abs_of_nonneg, hf i hi, hg i hi, add_nonneg]
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_of_nonneg
**Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal to the sum of the `L_p`-seminorms of the summands. A version for `ℝ`-valued nonnegative functions.
Lp_add_le_tsum_of_nonneg (hp : 1 ≤ p) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ p) : (Summable fun i => (f i + g i) ^ p) ∧ (∑' i, (f i + g i) ^ p) ^ (1 / p) ≤ (∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p) := by lift f to ι → ℝ≥0 using hf lift g to ι → ℝ≥0 using hg beta_reduce at * norm_cast0 at * exact NNReal.Lp_add_le_tsum hp hf_sum hg_sum
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_tsum_of_nonneg
**Minkowski inequality**: the `L_p` seminorm of the infinite sum of two vectors is less than or equal to the infinite sum of the `L_p`-seminorms of the summands, if these infinite sums both exist. A version for `ℝ`-valued functions. For an alternative version, convenient if the infinite sums are already expressed as `p`-th powers, see `Lp_add_le_hasSum_of_nonneg`.
summable_Lp_add_of_nonneg (hp : 1 ≤ p) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ p) : Summable fun i => (f i + g i) ^ p := (Lp_add_le_tsum_of_nonneg hp hf hg hf_sum hg_sum).1
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
summable_Lp_add_of_nonneg
null
Lp_add_le_tsum_of_nonneg' (hp : 1 ≤ p) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) (hf_sum : Summable fun i => f i ^ p) (hg_sum : Summable fun i => g i ^ p) : (∑' i, (f i + g i) ^ p) ^ (1 / p) ≤ (∑' i, f i ^ p) ^ (1 / p) + (∑' i, g i ^ p) ^ (1 / p) := (Lp_add_le_tsum_of_nonneg hp hf hg hf_sum hg_sum).2
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_tsum_of_nonneg'
null
Lp_add_le_hasSum_of_nonneg (hp : 1 ≤ p) (hf : ∀ i, 0 ≤ f i) (hg : ∀ i, 0 ≤ g i) {A B : ℝ} (hA : 0 ≤ A) (hB : 0 ≤ B) (hfA : HasSum (fun i => f i ^ p) (A ^ p)) (hgB : HasSum (fun i => g i ^ p) (B ^ p)) : ∃ C, 0 ≤ C ∧ C ≤ A + B ∧ HasSum (fun i => (f i + g i) ^ p) (C ^ p) := by lift f to ι → ℝ≥0 using hf lift g to ι → ℝ≥0 using hg lift A to ℝ≥0 using hA lift B to ℝ≥0 using hB beta_reduce at hfA hgB norm_cast at hfA hgB obtain ⟨C, hC₁, hC₂⟩ := NNReal.Lp_add_le_hasSum hp hfA hgB use C beta_reduce norm_cast exact ⟨zero_le _, hC₁, hC₂⟩
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le_hasSum_of_nonneg
**Minkowski inequality**: the `L_p` seminorm of the infinite sum of two vectors is less than or equal to the infinite sum of the `L_p`-seminorms of the summands, if these infinite sums both exist. A version for `ℝ`-valued functions. For an alternative version, convenient if the infinite sums are not already expressed as `p`-th powers, see `Lp_add_le_tsum_of_nonneg`.
inner_le_Lp_mul_Lq (hpq : p.HolderConjugate q) : ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q) := by by_cases H : (∑ i ∈ s, f i ^ p) ^ (1 / p) = 0 ∨ (∑ i ∈ s, g i ^ q) ^ (1 / q) = 0 · replace H : (∀ i ∈ s, f i = 0) ∨ ∀ i ∈ s, g i = 0 := by simpa [ENNReal.rpow_eq_zero_iff, hpq.pos, hpq.symm.pos, asymm hpq.pos, asymm hpq.symm.pos, sum_eq_zero_iff_of_nonneg] using H have : ∀ i ∈ s, f i * g i = 0 := fun i hi => by rcases H with H | H <;> simp [H i hi] simp [sum_eq_zero this] push_neg at H by_cases H' : (∑ i ∈ s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i ∈ s, g i ^ q) ^ (1 / q) = ⊤ · rcases H' with H' | H' <;> simp [H', -one_div, -sum_eq_zero_iff, -rpow_eq_zero_iff, H] replace H' : (∀ i ∈ s, f i ≠ ⊤) ∧ ∀ i ∈ s, g i ≠ ⊤ := by simpa [ENNReal.rpow_eq_top_iff, asymm hpq.pos, asymm hpq.symm.pos, hpq.pos, hpq.symm.pos, ENNReal.sum_eq_top, not_or] using H' have := ENNReal.coe_le_coe.2 (@NNReal.inner_le_Lp_mul_Lq _ s (fun i => ENNReal.toNNReal (f i)) (fun i => ENNReal.toNNReal (g i)) _ _ hpq) simp [ENNReal.coe_rpow_of_nonneg, hpq.pos.le, hpq.symm.pos.le] at this convert this using 1 <;> [skip; congr 2] <;> [skip; skip; simp; skip; simp] <;> · refine Finset.sum_congr rfl fun i hi => ?_ simp [H'.1 i hi, H'.2 i hi, -WithZero.coe_mul]
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_Lp_mul_Lq
**Hölder inequality**: the scalar product of two functions is bounded by the product of their `L^p` and `L^q` norms when `p` and `q` are conjugate exponents. Version for sums over finite sets, with `ℝ≥0∞`-valued functions.
inner_le_weight_mul_Lp_of_nonneg (s : Finset ι) {p : ℝ} (hp : 1 ≤ p) (w f : ι → ℝ≥0∞) : ∑ i ∈ s, w i * f i ≤ (∑ i ∈ s, w i) ^ (1 - p⁻¹) * (∑ i ∈ s, w i * f i ^ p) ^ p⁻¹ := by obtain rfl | hp := hp.eq_or_lt · simp have hp₀ : 0 < p := by positivity have hp₁ : p⁻¹ < 1 := inv_lt_one_of_one_lt₀ hp by_cases H : (∑ i ∈ s, w i) ^ (1 - p⁻¹) = 0 ∨ (∑ i ∈ s, w i * f i ^ p) ^ p⁻¹ = 0 · replace H : (∀ i ∈ s, w i = 0) ∨ ∀ i ∈ s, w i = 0 ∨ f i = 0 := by simpa [hp₀, hp₁, hp₀.not_gt, hp₁.not_gt, sum_eq_zero_iff_of_nonneg] using H have (i) (hi : i ∈ s) : w i * f i = 0 := by rcases H with H | H <;> simp [H i hi] simp [sum_eq_zero this] push_neg at H by_cases H' : (∑ i ∈ s, w i) ^ (1 - p⁻¹) = ⊤ ∨ (∑ i ∈ s, w i * f i ^ p) ^ p⁻¹ = ⊤ · rcases H' with H' | H' <;> simp [H', -one_div, -sum_eq_zero_iff, -rpow_eq_zero_iff, H] replace H' : (∀ i ∈ s, w i ≠ ⊤) ∧ ∀ i ∈ s, w i * f i ^ p ≠ ⊤ := by simpa [rpow_eq_top_iff,hp₀, hp₁, hp₀.not_gt, hp₁.not_gt, sum_eq_top, not_or] using H' have := coe_le_coe.2 <| NNReal.inner_le_weight_mul_Lp s hp.le (fun i ↦ ENNReal.toNNReal (w i)) fun i ↦ ENNReal.toNNReal (f i) rw [coe_mul] at this simp_rw [coe_rpow_of_nonneg _ <| inv_nonneg.2 hp₀.le, coe_finset_sum, ← ENNReal.toNNReal_rpow, ← ENNReal.toNNReal_mul, sum_congr rfl fun i hi ↦ coe_toNNReal (H'.2 i hi)] at this simp [ENNReal.coe_rpow_of_nonneg, hp₁.le] at this convert this using 2 with i hi · obtain hw | hw := eq_or_ne (w i) 0 · simp [hw] rw [coe_toNNReal (H'.1 _ hi), coe_toNNReal] simpa [mul_eq_top, hw, hp₀, hp₀.not_gt, H'.1 _ hi] using H'.2 _ hi · convert rfl with i hi exact coe_toNNReal (H'.1 _ hi)
lemma
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
inner_le_weight_mul_Lp_of_nonneg
**Weighted Hölder inequality**.
rpow_sum_le_const_mul_sum_rpow (hp : 1 ≤ p) : (∑ i ∈ s, f i) ^ p ≤ (card s : ℝ≥0∞) ^ (p - 1) * ∑ i ∈ s, f i ^ p := by rcases eq_or_lt_of_le hp with hp | hp · simp [← hp] let q : ℝ := p / (p - 1) have hpq : p.HolderConjugate q := .conjExponent hp have hp₁ : 1 / p * p = 1 := one_div_mul_cancel hpq.ne_zero have hq : 1 / q * p = p - 1 := by rw [← hpq.div_conj_eq_sub_one] ring simpa only [ENNReal.mul_rpow_of_nonneg _ _ hpq.nonneg, ← ENNReal.rpow_mul, hp₁, hq, coe_one, one_mul, one_rpow, rpow_one, Pi.one_apply, sum_const, Nat.smul_one_eq_cast] using ENNReal.rpow_le_rpow (inner_le_Lp_mul_Lq s 1 f hpq.symm) hpq.nonneg
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
rpow_sum_le_const_mul_sum_rpow
For `1 ≤ p`, the `p`-th power of the sum of `f i` is bounded above by a constant times the sum of the `p`-th powers of `f i`. Version for sums over finite sets, with `ℝ≥0∞`-valued functions.
Lp_add_le (hp : 1 ≤ p) : (∑ i ∈ s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) + (∑ i ∈ s, g i ^ p) ^ (1 / p) := by by_cases H' : (∑ i ∈ s, f i ^ p) ^ (1 / p) = ⊤ ∨ (∑ i ∈ s, g i ^ p) ^ (1 / p) = ⊤ · rcases H' with H' | H' <;> simp [H', -one_div] have pos : 0 < p := lt_of_lt_of_le zero_lt_one hp replace H' : (∀ i ∈ s, f i ≠ ⊤) ∧ ∀ i ∈ s, g i ≠ ⊤ := by simpa [ENNReal.rpow_eq_top_iff, asymm pos, pos, ENNReal.sum_eq_top, not_or] using H' have := ENNReal.coe_le_coe.2 (@NNReal.Lp_add_le _ s (fun i => ENNReal.toNNReal (f i)) (fun i => ENNReal.toNNReal (g i)) _ hp) push_cast [ENNReal.coe_rpow_of_nonneg, le_of_lt pos, le_of_lt (one_div_pos.2 pos)] at this convert this using 2 <;> [skip; congr 1; congr 1] <;> · refine Finset.sum_congr rfl fun i hi => ?_ simp [H'.1 i hi, H'.2 i hi]
theorem
Analysis
[ "Mathlib.Algebra.BigOperators.Expect", "Mathlib.Algebra.BigOperators.Field", "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal", "Mathlib.Data.Real.ConjExponents" ]
Mathlib/Analysis/MeanInequalities.lean
Lp_add_le
**Minkowski inequality**: the `L_p` seminorm of the sum of two vectors is less than or equal to the sum of the `L_p`-seminorms of the summands. A version for `ℝ≥0∞`-valued nonnegative functions.
pow_arith_mean_le_arith_mean_pow (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) (n : ℕ) : (∑ i ∈ s, w i * z i) ^ n ≤ ∑ i ∈ s, w i * z i ^ n := (convexOn_pow n).map_sum_le hw hw' hz
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
pow_arith_mean_le_arith_mean_pow
null
pow_arith_mean_le_arith_mean_pow_of_even (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) {n : ℕ} (hn : Even n) : (∑ i ∈ s, w i * z i) ^ n ≤ ∑ i ∈ s, w i * z i ^ n := hn.convexOn_pow.map_sum_le hw hw' fun _ _ => Set.mem_univ _
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
pow_arith_mean_le_arith_mean_pow_of_even
null
zpow_arith_mean_le_arith_mean_zpow (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 < z i) (m : ℤ) : (∑ i ∈ s, w i * z i) ^ m ≤ ∑ i ∈ s, w i * z i ^ m := (convexOn_zpow m).map_sum_le hw hw' hz
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
zpow_arith_mean_le_arith_mean_zpow
null
rpow_arith_mean_le_arith_mean_rpow (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) {p : ℝ} (hp : 1 ≤ p) : (∑ i ∈ s, w i * z i) ^ p ≤ ∑ i ∈ s, w i * z i ^ p := (convexOn_rpow hp).map_sum_le hw hw' hz
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_arith_mean_le_arith_mean_rpow
null
arith_mean_le_rpow_mean (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) (hz : ∀ i ∈ s, 0 ≤ z i) {p : ℝ} (hp : 1 ≤ p) : ∑ i ∈ s, w i * z i ≤ (∑ i ∈ s, w i * z i ^ p) ^ (1 / p) := by have : 0 < p := by positivity rw [← rpow_le_rpow_iff _ _ this, ← rpow_mul, one_div_mul_cancel (ne_of_gt this), rpow_one] · exact rpow_arith_mean_le_arith_mean_rpow s w z hw hw' hz hp all_goals apply_rules [sum_nonneg, rpow_nonneg] intro i hi apply_rules [mul_nonneg, rpow_nonneg, hw i hi, hz i hi]
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
arith_mean_le_rpow_mean
null
pow_arith_mean_le_arith_mean_pow (w z : ι → ℝ≥0) (hw' : ∑ i ∈ s, w i = 1) (n : ℕ) : (∑ i ∈ s, w i * z i) ^ n ≤ ∑ i ∈ s, w i * z i ^ n := mod_cast Real.pow_arith_mean_le_arith_mean_pow s _ _ (fun i _ => (w i).coe_nonneg) (mod_cast hw') (fun i _ => (z i).coe_nonneg) n
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
pow_arith_mean_le_arith_mean_pow
Weighted generalized mean inequality, version sums over finite sets, with `ℝ≥0`-valued functions and natural exponent.
rpow_arith_mean_le_arith_mean_rpow (w z : ι → ℝ≥0) (hw' : ∑ i ∈ s, w i = 1) {p : ℝ} (hp : 1 ≤ p) : (∑ i ∈ s, w i * z i) ^ p ≤ ∑ i ∈ s, w i * z i ^ p := mod_cast Real.rpow_arith_mean_le_arith_mean_rpow s _ _ (fun i _ => (w i).coe_nonneg) (mod_cast hw') (fun i _ => (z i).coe_nonneg) hp
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_arith_mean_le_arith_mean_rpow
Weighted generalized mean inequality, version for sums over finite sets, with `ℝ≥0`-valued functions and real exponents.
rpow_arith_mean_le_arith_mean2_rpow (w₁ w₂ z₁ z₂ : ℝ≥0) (hw' : w₁ + w₂ = 1) {p : ℝ} (hp : 1 ≤ p) : (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p := by have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp · simpa [Fin.sum_univ_succ] using h · simp [hw', Fin.sum_univ_succ]
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_arith_mean_le_arith_mean2_rpow
Weighted generalized mean inequality, version for two elements of `ℝ≥0` and real exponents.
rpow_add_le_mul_rpow_add_rpow (z₁ z₂ : ℝ≥0) {p : ℝ} (hp : 1 ≤ p) : (z₁ + z₂) ^ p ≤ (2 : ℝ≥0) ^ (p - 1) * (z₁ ^ p + z₂ ^ p) := by rcases eq_or_lt_of_le hp with (rfl | h'p) · simp only [rpow_one, sub_self, rpow_zero, one_mul]; rfl convert rpow_arith_mean_le_arith_mean2_rpow (1 / 2) (1 / 2) (2 * z₁) (2 * z₂) (add_halves 1) hp using 1 · simp only [one_div, inv_mul_cancel_left₀, Ne, two_ne_zero, not_false_iff] · have A : p - 1 ≠ 0 := ne_of_gt (sub_pos.2 h'p) simp only [mul_rpow, rpow_sub' A, div_eq_inv_mul, rpow_one, mul_one] ring
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_le_mul_rpow_add_rpow
Unweighted mean inequality, version for two elements of `ℝ≥0` and real exponents.
arith_mean_le_rpow_mean (w z : ι → ℝ≥0) (hw' : ∑ i ∈ s, w i = 1) {p : ℝ} (hp : 1 ≤ p) : ∑ i ∈ s, w i * z i ≤ (∑ i ∈ s, w i * z i ^ p) ^ (1 / p) := mod_cast Real.arith_mean_le_rpow_mean s _ _ (fun i _ => (w i).coe_nonneg) (mod_cast hw') (fun i _ => (z i).coe_nonneg) hp
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
arith_mean_le_rpow_mean
Weighted generalized mean inequality, version for sums over finite sets, with `ℝ≥0`-valued functions and real exponents.
private add_rpow_le_one_of_add_le_one {p : ℝ} (a b : ℝ≥0) (hab : a + b ≤ 1) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ 1 := by have h_le_one : ∀ x : ℝ≥0, x ≤ 1 → x ^ p ≤ x := fun x hx => rpow_le_self_of_le_one hx hp1 have ha : a ≤ 1 := (self_le_add_right a b).trans hab have hb : b ≤ 1 := (self_le_add_left b a).trans hab exact (add_le_add (h_le_one a ha) (h_le_one b hb)).trans hab
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
add_rpow_le_one_of_add_le_one
null
add_rpow_le_rpow_add {p : ℝ} (a b : ℝ≥0) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ (a + b) ^ p := by have hp_pos : 0 < p := by positivity by_cases h_zero : a + b = 0 · simp [add_eq_zero.mp h_zero, hp_pos.ne'] have h_nonzero : ¬(a = 0 ∧ b = 0) := by rwa [add_eq_zero] at h_zero have h_add : a / (a + b) + b / (a + b) = 1 := by rw [← add_div, div_self h_zero] have h := add_rpow_le_one_of_add_le_one (a / (a + b)) (b / (a + b)) h_add.le hp1 rw [div_rpow a (a + b), div_rpow b (a + b)] at h have hab_0 : (a + b) ^ p ≠ 0 := by simp [h_nonzero] have hab_0' : 0 < (a + b) ^ p := zero_lt_iff.mpr hab_0 have h_mul : (a + b) ^ p * (a ^ p / (a + b) ^ p + b ^ p / (a + b) ^ p) ≤ (a + b) ^ p := by nth_rw 4 [← mul_one ((a + b) ^ p)]; gcongr rwa [div_eq_mul_inv, div_eq_mul_inv, mul_add, mul_comm (a ^ p), mul_comm (b ^ p), ← mul_assoc, ← mul_assoc, mul_inv_cancel₀ hab_0, one_mul, one_mul] at h_mul
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
add_rpow_le_rpow_add
null
rpow_add_rpow_le_add {p : ℝ} (a b : ℝ≥0) (hp1 : 1 ≤ p) : (a ^ p + b ^ p) ^ (1 / p) ≤ a + b := by rw [one_div] rw [← @NNReal.le_rpow_inv_iff _ _ p⁻¹ (by simp [lt_of_lt_of_le zero_lt_one hp1])] rw [inv_inv] exact add_rpow_le_rpow_add _ _ hp1
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_rpow_le_add
null
rpow_add_rpow_le {p q : ℝ} (a b : ℝ≥0) (hp_pos : 0 < p) (hpq : p ≤ q) : (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p) := by have h_rpow : ∀ a : ℝ≥0, a ^ q = (a ^ p) ^ (q / p) := fun a => by rw [← NNReal.rpow_mul, div_eq_inv_mul, ← mul_assoc, mul_inv_cancel₀ hp_pos.ne.symm, one_mul] have h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p := by refine rpow_add_rpow_le_add (a ^ p) (b ^ p) ?_ rwa [one_le_div hp_pos] rw [h_rpow a, h_rpow b, one_div p, NNReal.le_rpow_inv_iff hp_pos, ← NNReal.rpow_mul, mul_comm, mul_one_div] rwa [one_div_div] at h_rpow_add_rpow_le_add
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_rpow_le
null
rpow_add_le_add_rpow {p : ℝ} (a b : ℝ≥0) (hp : 0 ≤ p) (hp1 : p ≤ 1) : (a + b) ^ p ≤ a ^ p + b ^ p := by rcases hp.eq_or_lt with (rfl | hp_pos) · simp have h := rpow_add_rpow_le a b hp_pos hp1 rw [one_div_one, one_div] at h repeat' rw [NNReal.rpow_one] at h exact (NNReal.le_rpow_inv_iff hp_pos).mp h
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_le_add_rpow
null
add_rpow_le_rpow_add {p : ℝ} {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ (a + b) ^ p := by lift a to NNReal using ha lift b to NNReal using hb exact_mod_cast NNReal.add_rpow_le_rpow_add a b hp1
lemma
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
add_rpow_le_rpow_add
null
rpow_add_rpow_le_add {p : ℝ} {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hp1 : 1 ≤ p) : (a ^ p + b ^ p) ^ (1 / p) ≤ a + b := by lift a to NNReal using ha lift b to NNReal using hb exact_mod_cast NNReal.rpow_add_rpow_le_add a b hp1
lemma
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_rpow_le_add
null
rpow_add_rpow_le {p q : ℝ} {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hp_pos : 0 < p) (hpq : p ≤ q) : (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p) := by lift a to NNReal using ha lift b to NNReal using hb exact_mod_cast NNReal.rpow_add_rpow_le a b hp_pos hpq
lemma
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_rpow_le
null
rpow_add_le_add_rpow {p : ℝ} {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hp : 0 ≤ p) (hp1 : p ≤ 1) : (a + b) ^ p ≤ a ^ p + b ^ p := by lift a to NNReal using ha lift b to NNReal using hb exact_mod_cast NNReal.rpow_add_le_add_rpow a b hp hp1
lemma
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_le_add_rpow
null
rpow_arith_mean_le_arith_mean_rpow (w z : ι → ℝ≥0∞) (hw' : ∑ i ∈ s, w i = 1) {p : ℝ} (hp : 1 ≤ p) : (∑ i ∈ s, w i * z i) ^ p ≤ ∑ i ∈ s, w i * z i ^ p := by have hp_pos : 0 < p := by positivity have hp_nonneg : 0 ≤ p := by positivity have hp_not_neg : ¬p < 0 := by simp [hp_nonneg] have h_top_iff_rpow_top : ∀ (i : ι), i ∈ s → (w i * z i = ⊤ ↔ w i * z i ^ p = ⊤) := by simp [ENNReal.mul_eq_top, hp_pos, hp_not_neg] refine le_of_top_imp_top_of_toNNReal_le ?_ ?_ · -- first, prove `(∑ i ∈ s, w i * z i) ^ p = ⊤ → ∑ i ∈ s, (w i * z i ^ p) = ⊤` rw [rpow_eq_top_iff, sum_eq_top, sum_eq_top] grind · -- second, suppose both `(∑ i ∈ s, w i * z i) ^ p ≠ ⊤` and `∑ i ∈ s, (w i * z i ^ p) ≠ ⊤`, intro h_top_rpow_sum _ have h_top : ∀ a : ι, a ∈ s → w a * z a ≠ ⊤ := haveI h_top_sum : ∑ i ∈ s, w i * z i ≠ ⊤ := by intro h rw [h, top_rpow_of_pos hp_pos] at h_top_rpow_sum exact h_top_rpow_sum rfl fun a ha => (lt_top_of_sum_ne_top h_top_sum ha).ne have h_top_rpow : ∀ a : ι, a ∈ s → w a * z a ^ p ≠ ⊤ := by intro i hi specialize h_top i hi rwa [Ne, ← h_top_iff_rpow_top i hi] simp_rw [toNNReal_sum h_top_rpow, toNNReal_rpow, toNNReal_sum h_top, toNNReal_mul, toNNReal_rpow] refine NNReal.rpow_arith_mean_le_arith_mean_rpow s (fun i => (w i).toNNReal) (fun i => (z i).toNNReal) ?_ hp have h_sum_nnreal : ∑ i ∈ s, w i = ↑(∑ i ∈ s, (w i).toNNReal) := by rw [coe_finset_sum] refine sum_congr rfl fun i hi => (coe_toNNReal ?_).symm refine (lt_top_of_sum_ne_top ?_ hi).ne exact hw'.symm ▸ ENNReal.one_ne_top rwa [← coe_inj, ← h_sum_nnreal]
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_arith_mean_le_arith_mean_rpow
Weighted generalized mean inequality, version for sums over finite sets, with `ℝ≥0∞`-valued functions and real exponents.
rpow_arith_mean_le_arith_mean2_rpow (w₁ w₂ z₁ z₂ : ℝ≥0∞) (hw' : w₁ + w₂ = 1) {p : ℝ} (hp : 1 ≤ p) : (w₁ * z₁ + w₂ * z₂) ^ p ≤ w₁ * z₁ ^ p + w₂ * z₂ ^ p := by have h := rpow_arith_mean_le_arith_mean_rpow univ ![w₁, w₂] ![z₁, z₂] ?_ hp · simpa [Fin.sum_univ_succ] using h · simp [hw', Fin.sum_univ_succ]
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_arith_mean_le_arith_mean2_rpow
Weighted generalized mean inequality, version for two elements of `ℝ≥0∞` and real exponents.
rpow_add_le_mul_rpow_add_rpow (z₁ z₂ : ℝ≥0∞) {p : ℝ} (hp : 1 ≤ p) : (z₁ + z₂) ^ p ≤ (2 : ℝ≥0∞) ^ (p - 1) * (z₁ ^ p + z₂ ^ p) := by convert rpow_arith_mean_le_arith_mean2_rpow (1 / 2) (1 / 2) (2 * z₁) (2 * z₂) (ENNReal.add_halves 1) hp using 1 · simp [← mul_assoc, ENNReal.inv_mul_cancel two_ne_zero ofNat_ne_top] · simp only [mul_rpow_of_nonneg _ _ (zero_le_one.trans hp), rpow_sub _ _ two_ne_zero ofNat_ne_top, ENNReal.div_eq_inv_mul, rpow_one, mul_one] ring
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_le_mul_rpow_add_rpow
Unweighted mean inequality, version for two elements of `ℝ≥0∞` and real exponents.
add_rpow_le_rpow_add {p : ℝ} (a b : ℝ≥0∞) (hp1 : 1 ≤ p) : a ^ p + b ^ p ≤ (a + b) ^ p := by have hp_pos : 0 < p := by positivity by_cases h_top : a + b = ⊤ · rw [← @ENNReal.rpow_eq_top_iff_of_pos (a + b) p hp_pos] at h_top rw [h_top] exact le_top obtain ⟨ha_top, hb_top⟩ := add_ne_top.mp h_top lift a to ℝ≥0 using ha_top lift b to ℝ≥0 using hb_top simpa [ENNReal.coe_rpow_of_nonneg _ hp_pos.le] using ENNReal.coe_le_coe.2 (NNReal.add_rpow_le_rpow_add a b hp1)
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
add_rpow_le_rpow_add
null
rpow_add_rpow_le_add {p : ℝ} (a b : ℝ≥0∞) (hp1 : 1 ≤ p) : (a ^ p + b ^ p) ^ (1 / p) ≤ a + b := by rw [one_div, ← @ENNReal.le_rpow_inv_iff _ _ p⁻¹ (by simp [lt_of_lt_of_le zero_lt_one hp1])] rw [inv_inv] exact add_rpow_le_rpow_add _ _ hp1
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_rpow_le_add
null
rpow_add_rpow_le {p q : ℝ} (a b : ℝ≥0∞) (hp_pos : 0 < p) (hpq : p ≤ q) : (a ^ q + b ^ q) ^ (1 / q) ≤ (a ^ p + b ^ p) ^ (1 / p) := by have h_rpow : ∀ a : ℝ≥0∞, a ^ q = (a ^ p) ^ (q / p) := fun a => by rw [← ENNReal.rpow_mul, mul_div_cancel₀ _ hp_pos.ne'] have h_rpow_add_rpow_le_add : ((a ^ p) ^ (q / p) + (b ^ p) ^ (q / p)) ^ (1 / (q / p)) ≤ a ^ p + b ^ p := by refine rpow_add_rpow_le_add (a ^ p) (b ^ p) ?_ rwa [one_le_div hp_pos] rw [h_rpow a, h_rpow b, one_div p, ENNReal.le_rpow_inv_iff hp_pos, ← ENNReal.rpow_mul, mul_comm, mul_one_div] rwa [one_div_div] at h_rpow_add_rpow_le_add
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_rpow_le
null
rpow_add_le_add_rpow {p : ℝ} (a b : ℝ≥0∞) (hp : 0 ≤ p) (hp1 : p ≤ 1) : (a + b) ^ p ≤ a ^ p + b ^ p := by rcases hp.eq_or_lt with (rfl | hp_pos) · simp have h := rpow_add_rpow_le a b hp_pos hp1 rw [one_div_one, one_div] at h repeat' rw [ENNReal.rpow_one] at h exact (ENNReal.le_rpow_inv_iff hp_pos).mp h
theorem
Analysis
[ "Mathlib.Analysis.Convex.Jensen", "Mathlib.Analysis.Convex.Mul", "Mathlib.Analysis.Convex.SpecificFunctions.Basic", "Mathlib.Analysis.SpecialFunctions.Pow.NNReal" ]
Mathlib/Analysis/MeanInequalitiesPow.lean
rpow_add_le_add_rpow
null
private rexp_neg_deriv_aux : ∀ x ∈ univ, HasDerivWithinAt (rexp ∘ Neg.neg) (-rexp (-x)) univ x := fun x _ ↦ mul_neg_one (rexp (-x)) ▸ ((Real.hasDerivAt_exp (-x)).comp x (hasDerivAt_neg x)).hasDerivWithinAt
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
rexp_neg_deriv_aux
null
private rexp_neg_image_aux : rexp ∘ Neg.neg '' univ = Ioi 0 := by rw [Set.image_comp, Set.image_univ_of_surjective neg_surjective, Set.image_univ, Real.range_exp]
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
rexp_neg_image_aux
null
private rexp_neg_injOn_aux : univ.InjOn (rexp ∘ Neg.neg) := Real.exp_injective.injOn.comp neg_injective.injOn (univ.mapsTo_univ _)
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
rexp_neg_injOn_aux
null
private rexp_cexp_aux (x : ℝ) (s : ℂ) (f : E) : rexp (-x) • cexp (-↑x) ^ (s - 1) • f = cexp (-s * ↑x) • f := by change (rexp (-x) : ℂ) • _ = _ • f rw [← smul_assoc, smul_eq_mul] push_cast conv in cexp _ * _ => lhs; rw [← cpow_one (cexp _)] rw [← cpow_add _ _ (Complex.exp_ne_zero _), cpow_def_of_ne_zero (Complex.exp_ne_zero _), Complex.log_exp (by simp [pi_pos]) (by simpa using pi_nonneg)] ring_nf
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
rexp_cexp_aux
null
mellin_eq_fourierIntegral (f : ℝ → E) {s : ℂ} : mellin f s = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := calc mellin f s = ∫ (u : ℝ), Complex.exp (-s * u) • f (Real.exp (-u)) := by rw [mellin, ← rexp_neg_image_aux, integral_image_eq_integral_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] simp [rexp_cexp_aux] _ = ∫ (u : ℝ), Complex.exp (↑(-2 * π * (u * (s.im / (2 * π)))) * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) := by congr ext u trans Complex.exp (-s.im * u * I) • (Real.exp (-s.re * u) • f (Real.exp (-u))) · conv => lhs; rw [← re_add_im s] rw [neg_add, add_mul, Complex.exp_add, mul_comm, ← smul_eq_mul, smul_assoc] norm_cast push_cast ring_nf congr simp [field] _ = 𝓕 (fun (u : ℝ) ↦ (Real.exp (-s.re * u) • f (Real.exp (-u)))) (s.im / (2 * π)) := by simp [fourierIntegral_eq', mul_comm (_ / _)]
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
mellin_eq_fourierIntegral
null
mellinInv_eq_fourierIntegralInv (σ : ℝ) (f : ℂ → E) {x : ℝ} (hx : 0 < x) : mellinInv σ f x = (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x) := calc mellinInv σ f x = (x : ℂ) ^ (-σ : ℂ) • (∫ (y : ℝ), Complex.exp (2 * π * (y * (-Real.log x)) * I) • f (σ + 2 * π * y * I)) := by rw [mellinInv, one_div, ← abs_of_pos (show 0 < (2 * π)⁻¹ by simp [pi_pos])] have hx0 : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr (ne_of_gt hx) simp_rw [neg_add, cpow_add _ _ hx0, mul_smul, integral_smul] rw [smul_comm, ← Measure.integral_comp_mul_left] congr! 3 rw [cpow_def_of_ne_zero hx0, ← Complex.ofReal_log hx.le] push_cast ring_nf _ = (x : ℂ) ^ (-σ : ℂ) • 𝓕⁻ (fun (y : ℝ) ↦ f (σ + 2 * π * y * I)) (-Real.log x) := by simp [fourierIntegralInv_eq', mul_comm (Real.log _)] variable [CompleteSpace E]
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
mellinInv_eq_fourierIntegralInv
null
mellin_inversion (σ : ℝ) (f : ℝ → E) {x : ℝ} (hx : 0 < x) (hf : MellinConvergent f σ) (hFf : VerticalIntegrable (mellin f) σ) (hfx : ContinuousAt f x) : mellinInv σ (mellin f) x = f x := by let g := fun (u : ℝ) => Real.exp (-σ * u) • f (Real.exp (-u)) replace hf : Integrable g := by rw [MellinConvergent, ← rexp_neg_image_aux, integrableOn_image_iff_integrableOn_abs_deriv_smul MeasurableSet.univ rexp_neg_deriv_aux rexp_neg_injOn_aux] at hf replace hf : Integrable fun (x : ℝ) ↦ cexp (-↑σ * ↑x) • f (rexp (-x)) := by simpa [rexp_cexp_aux] using hf norm_cast at hf replace hFf : Integrable (𝓕 g) := by have h2π : 2 * π ≠ 0 := by simp have : Integrable (𝓕 (fun u ↦ rexp (-(σ * u)) • f (rexp (-u)))) := by simpa [mellin_eq_fourierIntegral, mul_div_cancel_right₀ _ h2π] using hFf.comp_mul_right' h2π simp_rw [neg_mul_eq_neg_mul] at this exact this replace hfx : ContinuousAt g (-Real.log x) := by refine ContinuousAt.smul (by fun_prop) (ContinuousAt.comp ?_ (by fun_prop)) simpa [Real.exp_log hx] using hfx calc mellinInv σ (mellin f) x = mellinInv σ (fun s ↦ 𝓕 g (s.im / (2 * π))) x := by simp [g, mellinInv, mellin_eq_fourierIntegral] _ = (x : ℂ) ^ (-σ : ℂ) • g (-Real.log x) := by rw [mellinInv_eq_fourierIntegralInv _ _ hx, ← hf.fourier_inversion hFf hfx] simp [mul_div_cancel_left₀ _ (show 2 * π ≠ 0 by simp)] _ = (x : ℂ) ^ (-σ : ℂ) • rexp (σ * Real.log x) • f (rexp (Real.log x)) := by simp [g] _ = f x := by norm_cast rw [mul_comm σ, ← rpow_def_of_pos hx, Real.exp_log hx, ← Complex.ofReal_cpow hx.le] norm_cast rw [← smul_assoc, smul_eq_mul, Real.rpow_neg hx.le, inv_mul_cancel₀ (ne_of_gt (rpow_pos_of_pos hx σ)), one_smul]
theorem
Analysis
[ "Mathlib.Analysis.Fourier.Inversion", "Mathlib.Analysis.MellinTransform" ]
Mathlib/Analysis/MellinInversion.lean
mellin_inversion
The inverse Mellin transform of the Mellin transform applied to `x > 0` is x.
MellinConvergent (f : ℝ → E) (s : ℂ) : Prop := IntegrableOn (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) (Ioi 0)
def
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
MellinConvergent
Predicate on `f` and `s` asserting that the Mellin integral is well-defined.
MellinConvergent.const_smul {f : ℝ → E} {s : ℂ} (hf : MellinConvergent f s) {𝕜 : Type*} [NormedAddCommGroup 𝕜] [SMulZeroClass 𝕜 E] [IsBoundedSMul 𝕜 E] [SMulCommClass ℂ 𝕜 E] (c : 𝕜) : MellinConvergent (fun t => c • f t) s := by simpa only [MellinConvergent, smul_comm] using hf.smul c
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
MellinConvergent.const_smul
null
MellinConvergent.cpow_smul {f : ℝ → E} {s a : ℂ} : MellinConvergent (fun t => (t : ℂ) ^ a • f t) s ↔ MellinConvergent f (s + a) := by refine integrableOn_congr_fun (fun t ht => ?_) measurableSet_Ioi simp_rw [← sub_add_eq_add_sub, cpow_add _ _ (ofReal_ne_zero.2 <| ne_of_gt ht), mul_smul] nonrec theorem MellinConvergent.div_const {f : ℝ → ℂ} {s : ℂ} (hf : MellinConvergent f s) (a : ℂ) : MellinConvergent (fun t => f t / a) s := by simpa only [MellinConvergent, smul_eq_mul, ← mul_div_assoc] using hf.div_const a
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
MellinConvergent.cpow_smul
null
MellinConvergent.comp_mul_left {f : ℝ → E} {s : ℂ} {a : ℝ} (ha : 0 < a) : MellinConvergent (fun t => f (a * t)) s ↔ MellinConvergent f s := by have := integrableOn_Ioi_comp_mul_left_iff (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) 0 ha rw [mul_zero] at this have h1 : EqOn (fun t : ℝ => (↑(a * t) : ℂ) ^ (s - 1) • f (a * t)) ((a : ℂ) ^ (s - 1) • fun t : ℝ => (t : ℂ) ^ (s - 1) • f (a * t)) (Ioi 0) := fun t ht ↦ by simp only [ofReal_mul, mul_cpow_ofReal_nonneg ha.le (le_of_lt ht), mul_smul, Pi.smul_apply] have h2 : (a : ℂ) ^ (s - 1) ≠ 0 := by rw [Ne, cpow_eq_zero_iff, not_and_or, ofReal_eq_zero] exact Or.inl ha.ne' rw [MellinConvergent, MellinConvergent, ← this, integrableOn_congr_fun h1 measurableSet_Ioi, IntegrableOn, IntegrableOn, integrable_smul_iff h2]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
MellinConvergent.comp_mul_left
null
MellinConvergent.comp_rpow {f : ℝ → E} {s : ℂ} {a : ℝ} (ha : a ≠ 0) : MellinConvergent (fun t => f (t ^ a)) s ↔ MellinConvergent f (s / a) := by refine Iff.trans ?_ (integrableOn_Ioi_comp_rpow_iff' _ ha) rw [MellinConvergent] refine integrableOn_congr_fun (fun t ht => ?_) measurableSet_Ioi dsimp only [Pi.smul_apply] rw [← Complex.coe_smul (t ^ (a - 1)), ← mul_smul, ← cpow_mul_ofReal_nonneg (le_of_lt ht), ofReal_cpow (le_of_lt ht), ← cpow_add _ _ (ofReal_ne_zero.mpr (ne_of_gt ht)), ofReal_sub, ofReal_one, mul_sub, mul_div_cancel₀ _ (ofReal_ne_zero.mpr ha), mul_one, add_comm, ← add_sub_assoc, sub_add_cancel]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
MellinConvergent.comp_rpow
null
Complex.VerticalIntegrable (f : ℂ → E) (σ : ℝ) (μ : Measure ℝ := by volume_tac) : Prop := Integrable (fun (y : ℝ) ↦ f (σ + y * I)) μ
def
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
Complex.VerticalIntegrable
A function `f` is `VerticalIntegrable` at `σ` if `y ↦ f(σ + yi)` is integrable.
mellin (f : ℝ → E) (s : ℂ) : E := ∫ t : ℝ in Ioi 0, (t : ℂ) ^ (s - 1) • f t
def
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin
The Mellin transform of a function `f` (for a complex exponent `s`), defined as the integral of `t ^ (s - 1) • f` over `Ioi 0`.
mellinInv (σ : ℝ) (f : ℂ → E) (x : ℝ) : E := (1 / (2 * π)) • ∫ y : ℝ, (x : ℂ) ^ (-(σ + y * I)) • f (σ + y * I)
def
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellinInv
The Mellin inverse transform of a function `f`, defined as `1 / (2π)` times the integral of `y ↦ x ^ -(σ + yi) • f (σ + yi)`.
mellin_cpow_smul (f : ℝ → E) (s a : ℂ) : mellin (fun t => (t : ℂ) ^ a • f t) s = mellin f (s + a) := by refine setIntegral_congr_fun measurableSet_Ioi fun t ht => ?_ simp_rw [← sub_add_eq_add_sub, cpow_add _ _ (ofReal_ne_zero.2 <| ne_of_gt ht), mul_smul]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_cpow_smul
null
mellin_const_smul (f : ℝ → E) (s : ℂ) {𝕜 : Type*} [NormedField 𝕜] [NormedSpace 𝕜 E] [SMulCommClass ℂ 𝕜 E] (c : 𝕜) : mellin (fun t => c • f t) s = c • mellin f s := by simp only [mellin, smul_comm, integral_smul]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_const_smul
Compatibility with scalar multiplication by a normed field. For scalar multiplication by more general rings assuming *a priori* that the Mellin transform is defined, see `hasMellin_const_smul`.
mellin_div_const (f : ℝ → ℂ) (s a : ℂ) : mellin (fun t => f t / a) s = mellin f s / a := by simp_rw [mellin, smul_eq_mul, ← mul_div_assoc, integral_div]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_div_const
null
mellin_comp_rpow (f : ℝ → E) (s : ℂ) (a : ℝ) : mellin (fun t => f (t ^ a)) s = |a|⁻¹ • mellin f (s / a) := by /- This is true for `a = 0` as all sides are undefined but turn out to vanish thanks to our convention. The interesting case is `a ≠ 0` -/ rcases eq_or_ne a 0 with rfl | ha · by_cases hE : CompleteSpace E · simp [integral_smul_const, mellin, setIntegral_Ioi_zero_cpow] · simp [integral, mellin, hE] simp_rw [mellin] conv_rhs => rw [← integral_comp_rpow_Ioi _ ha, ← integral_smul] refine setIntegral_congr_fun measurableSet_Ioi fun t ht => ?_ dsimp only rw [← mul_smul, ← mul_assoc, inv_mul_cancel₀ (mt abs_eq_zero.1 ha), one_mul, ← smul_assoc, real_smul] rw [ofReal_cpow (le_of_lt ht), ← cpow_mul_ofReal_nonneg (le_of_lt ht), ← cpow_add _ _ (ofReal_ne_zero.mpr <| ne_of_gt ht), ofReal_sub, ofReal_one, mul_sub, mul_div_cancel₀ _ (ofReal_ne_zero.mpr ha), add_comm, ← add_sub_assoc, mul_one, sub_add_cancel]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_comp_rpow
null
mellin_comp_mul_left (f : ℝ → E) (s : ℂ) {a : ℝ} (ha : 0 < a) : mellin (fun t => f (a * t)) s = (a : ℂ) ^ (-s) • mellin f s := by simp_rw [mellin] have : EqOn (fun t : ℝ => (t : ℂ) ^ (s - 1) • f (a * t)) (fun t : ℝ => (a : ℂ) ^ (1 - s) • (fun u : ℝ => (u : ℂ) ^ (s - 1) • f u) (a * t)) (Ioi 0) := fun t ht ↦ by dsimp only rw [ofReal_mul, mul_cpow_ofReal_nonneg ha.le (le_of_lt ht), ← mul_smul, (by ring : 1 - s = -(s - 1)), cpow_neg, inv_mul_cancel_left₀] rw [Ne, cpow_eq_zero_iff, ofReal_eq_zero, not_and_or] exact Or.inl ha.ne' rw [setIntegral_congr_fun measurableSet_Ioi this, integral_smul, integral_comp_mul_left_Ioi (fun u ↦ (u : ℂ) ^ (s - 1) • f u) _ ha, mul_zero, ← Complex.coe_smul, ← mul_smul, sub_eq_add_neg, cpow_add _ _ (ofReal_ne_zero.mpr ha.ne'), cpow_one, ofReal_inv, mul_assoc, mul_comm, inv_mul_cancel_right₀ (ofReal_ne_zero.mpr ha.ne')]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_comp_mul_left
null
mellin_comp_mul_right (f : ℝ → E) (s : ℂ) {a : ℝ} (ha : 0 < a) : mellin (fun t => f (t * a)) s = (a : ℂ) ^ (-s) • mellin f s := by simpa only [mul_comm] using mellin_comp_mul_left f s ha
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_comp_mul_right
null
mellin_comp_inv (f : ℝ → E) (s : ℂ) : mellin (fun t => f t⁻¹) s = mellin f (-s) := by simp_rw [← rpow_neg_one, mellin_comp_rpow _ _ _, abs_neg, abs_one, inv_one, one_smul, ofReal_neg, ofReal_one, div_neg, div_one]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_comp_inv
null
HasMellin (f : ℝ → E) (s : ℂ) (m : E) : Prop := MellinConvergent f s ∧ mellin f s = m
def
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
HasMellin
Predicate standing for "the Mellin transform of `f` is defined at `s` and equal to `m`". This shortens some arguments.
hasMellin_add {f g : ℝ → E} {s : ℂ} (hf : MellinConvergent f s) (hg : MellinConvergent g s) : HasMellin (fun t => f t + g t) s (mellin f s + mellin g s) := ⟨by simpa only [MellinConvergent, smul_add] using hf.add hg, by simpa only [mellin, smul_add] using integral_add hf hg⟩
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
hasMellin_add
null
hasMellin_sub {f g : ℝ → E} {s : ℂ} (hf : MellinConvergent f s) (hg : MellinConvergent g s) : HasMellin (fun t => f t - g t) s (mellin f s - mellin g s) := ⟨by simpa only [MellinConvergent, smul_sub] using hf.sub hg, by simpa only [mellin, smul_sub] using integral_sub hf hg⟩
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
hasMellin_sub
null
hasMellin_const_smul {f : ℝ → E} {s : ℂ} (hf : MellinConvergent f s) {R : Type*} [NormedRing R] [Module R E] [IsBoundedSMul R E] [SMulCommClass ℂ R E] (c : R) : HasMellin (fun t => c • f t) s (c • mellin f s) := ⟨hf.const_smul c, by simp [mellin, smul_comm, hf.integral_smul]⟩
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
hasMellin_const_smul
null
mellin_convergent_iff_norm [NormedSpace ℂ E] {f : ℝ → E} {T : Set ℝ} (hT : T ⊆ Ioi 0) (hT' : MeasurableSet T) (hfc : AEStronglyMeasurable f <| volume.restrict <| Ioi 0) {s : ℂ} : IntegrableOn (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) T ↔ IntegrableOn (fun t : ℝ => t ^ (s.re - 1) * ‖f t‖) T := by have : AEStronglyMeasurable (fun t : ℝ => (t : ℂ) ^ (s - 1) • f t) (volume.restrict T) := by refine ((continuousOn_of_forall_continuousAt ?_).aestronglyMeasurable hT').smul (hfc.mono_set hT) exact fun t ht => continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt (hT ht)) rw [IntegrableOn, ← integrable_norm_iff this, ← IntegrableOn] refine integrableOn_congr_fun (fun t ht => ?_) hT' simp_rw [norm_smul, norm_cpow_eq_rpow_re_of_pos (hT ht), sub_re, one_re]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_convergent_iff_norm
Auxiliary lemma to reduce convergence statements from vector-valued functions to real scalar-valued functions.
mellin_convergent_top_of_isBigO {f : ℝ → ℝ} (hfc : AEStronglyMeasurable f <| volume.restrict (Ioi 0)) {a s : ℝ} (hf : f =O[atTop] (· ^ (-a))) (hs : s < a) : ∃ c : ℝ, 0 < c ∧ IntegrableOn (fun t : ℝ => t ^ (s - 1) * f t) (Ioi c) := by obtain ⟨d, hd'⟩ := hf.isBigOWith simp_rw [IsBigOWith, eventually_atTop] at hd' obtain ⟨e, he⟩ := hd' have he' : 0 < max e 1 := zero_lt_one.trans_le (le_max_right _ _) refine ⟨max e 1, he', ?_, ?_⟩ · refine AEStronglyMeasurable.mul ?_ (hfc.mono_set (Ioi_subset_Ioi he'.le)) refine (continuousOn_of_forall_continuousAt fun t ht => ?_).aestronglyMeasurable measurableSet_Ioi exact continuousAt_rpow_const _ _ (Or.inl <| (he'.trans ht).ne') · have : ∀ᵐ t : ℝ ∂volume.restrict (Ioi <| max e 1), ‖t ^ (s - 1) * f t‖ ≤ t ^ (s - 1 + -a) * d := by refine (ae_restrict_mem measurableSet_Ioi).mono fun t ht => ?_ have ht' : 0 < t := he'.trans ht rw [norm_mul, rpow_add ht', ← norm_of_nonneg (rpow_nonneg ht'.le (-a)), mul_assoc, mul_comm _ d, norm_of_nonneg (rpow_nonneg ht'.le _)] gcongr exact he t ((le_max_left e 1).trans_lt ht).le refine (HasFiniteIntegral.mul_const ?_ _).mono' this exact (integrableOn_Ioi_rpow_of_lt (by linarith) he').hasFiniteIntegral
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_convergent_top_of_isBigO
If `f` is a locally integrable real-valued function which is `O(x ^ (-a))` at `∞`, then for any `s < a`, its Mellin transform converges on some neighbourhood of `+∞`.
mellin_convergent_zero_of_isBigO {b : ℝ} {f : ℝ → ℝ} (hfc : AEStronglyMeasurable f <| volume.restrict (Ioi 0)) (hf : f =O[𝓝[>] 0] (· ^ (-b))) {s : ℝ} (hs : b < s) : ∃ c : ℝ, 0 < c ∧ IntegrableOn (fun t : ℝ => t ^ (s - 1) * f t) (Ioc 0 c) := by obtain ⟨d, _, hd'⟩ := hf.exists_pos simp_rw [IsBigOWith, eventually_nhdsWithin_iff, Metric.eventually_nhds_iff, gt_iff_lt] at hd' obtain ⟨ε, hε, hε'⟩ := hd' refine ⟨ε, hε, Iff.mpr integrableOn_Ioc_iff_integrableOn_Ioo ⟨?_, ?_⟩⟩ · refine AEStronglyMeasurable.mul ?_ (hfc.mono_set Ioo_subset_Ioi_self) refine (continuousOn_of_forall_continuousAt fun t ht => ?_).aestronglyMeasurable measurableSet_Ioo exact continuousAt_rpow_const _ _ (Or.inl ht.1.ne') · apply HasFiniteIntegral.mono' · change HasFiniteIntegral (fun t => d * t ^ (s - b - 1)) _ refine (Integrable.hasFiniteIntegral ?_).const_mul _ rw [← IntegrableOn, ← integrableOn_Ioc_iff_integrableOn_Ioo, ← intervalIntegrable_iff_integrableOn_Ioc_of_le hε.le] exact intervalIntegral.intervalIntegrable_rpow' (by linarith) · refine (ae_restrict_iff' measurableSet_Ioo).mpr (Eventually.of_forall fun t ht => ?_) rw [mul_comm, norm_mul] specialize hε' _ ht.1 · rw [dist_eq_norm, sub_zero, norm_of_nonneg (le_of_lt ht.1)] exact ht.2 · calc _ ≤ d * ‖t ^ (-b)‖ * ‖t ^ (s - 1)‖ := by gcongr _ = d * t ^ (s - b - 1) := ?_ simp_rw [norm_of_nonneg (rpow_nonneg (le_of_lt ht.1) _), mul_assoc] rw [← rpow_add ht.1] congr 2 abel
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_convergent_zero_of_isBigO
If `f` is a locally integrable real-valued function which is `O(x ^ (-b))` at `0`, then for any `b < s`, its Mellin transform converges on some right neighbourhood of `0`.
mellin_convergent_of_isBigO_scalar {a b : ℝ} {f : ℝ → ℝ} {s : ℝ} (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] (· ^ (-a))) (hs_top : s < a) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s) : IntegrableOn (fun t : ℝ => t ^ (s - 1) * f t) (Ioi 0) := by obtain ⟨c1, hc1, hc1'⟩ := mellin_convergent_top_of_isBigO hfc.aestronglyMeasurable hf_top hs_top obtain ⟨c2, hc2, hc2'⟩ := mellin_convergent_zero_of_isBigO hfc.aestronglyMeasurable hf_bot hs_bot have : Ioi 0 = Ioc 0 c2 ∪ Ioc c2 c1 ∪ Ioi c1 := by rw [union_assoc, Ioc_union_Ioi (le_max_right _ _), Ioc_union_Ioi ((min_le_left _ _).trans (le_max_right _ _)), min_eq_left (lt_min hc2 hc1).le] rw [this, integrableOn_union, integrableOn_union] refine ⟨⟨hc2', Iff.mp integrableOn_Icc_iff_integrableOn_Ioc ?_⟩, hc1'⟩ refine (hfc.continuousOn_mul ?_ isOpen_Ioi.isLocallyClosed).integrableOn_compact_subset (fun t ht => (hc2.trans_le ht.1 : 0 < t)) isCompact_Icc exact continuousOn_of_forall_continuousAt fun t ht ↦ continuousAt_rpow_const _ _ <| Or.inl <| ne_of_gt ht
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_convergent_of_isBigO_scalar
If `f` is a locally integrable real-valued function on `Ioi 0` which is `O(x ^ (-a))` at `∞` and `O(x ^ (-b))` at `0`, then its Mellin transform integral converges for `b < s < a`.
mellinConvergent_of_isBigO_rpow [NormedSpace ℂ E] {a b : ℝ} {f : ℝ → E} {s : ℂ} (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] (· ^ (-a))) (hs_top : s.re < a) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) : MellinConvergent f s := by rw [MellinConvergent, mellin_convergent_iff_norm Subset.rfl measurableSet_Ioi hfc.aestronglyMeasurable] exact mellin_convergent_of_isBigO_scalar hfc.norm hf_top.norm_left hs_top hf_bot.norm_left hs_bot
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellinConvergent_of_isBigO_rpow
null
isBigO_rpow_top_log_smul [NormedSpace ℝ E] {a b : ℝ} {f : ℝ → E} (hab : b < a) (hf : f =O[atTop] (· ^ (-a))) : (fun t : ℝ => log t • f t) =O[atTop] (· ^ (-b)) := by refine ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).isBigO.smul hf).congr' (Eventually.of_forall fun t => by rfl) ((eventually_gt_atTop 0).mp (Eventually.of_forall fun t ht => ?_)) simp only rw [smul_eq_mul, ← rpow_add ht, ← sub_eq_add_neg, sub_eq_add_neg a, add_sub_cancel_left]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
isBigO_rpow_top_log_smul
If `f` is `O(x ^ (-a))` as `x → +∞`, then `log • f` is `O(x ^ (-b))` for every `b < a`.
isBigO_rpow_zero_log_smul [NormedSpace ℝ E] {a b : ℝ} {f : ℝ → E} (hab : a < b) (hf : f =O[𝓝[>] 0] (· ^ (-a))) : (fun t : ℝ => log t • f t) =O[𝓝[>] 0] (· ^ (-b)) := by have : log =o[𝓝[>] 0] fun t : ℝ => t ^ (a - b) := by refine ((isLittleO_log_rpow_atTop (sub_pos.mpr hab)).neg_left.comp_tendsto tendsto_inv_nhdsGT_zero).congr' (.of_forall fun t => ?_) (eventually_mem_nhdsWithin.mono fun t ht => ?_) · simp · simp_rw [Function.comp_apply, inv_rpow (le_of_lt ht), ← rpow_neg (le_of_lt ht), neg_sub] refine (this.isBigO.smul hf).congr' (Eventually.of_forall fun t => by rfl) (eventually_nhdsWithin_iff.mpr (Eventually.of_forall fun t ht => ?_)) simp_rw [smul_eq_mul, ← rpow_add ht] congr 1 abel
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
isBigO_rpow_zero_log_smul
If `f` is `O(x ^ (-a))` as `x → 0`, then `log • f` is `O(x ^ (-b))` for every `a < b`.
mellin_hasDerivAt_of_isBigO_rpow [NormedSpace ℂ E] {a b : ℝ} {f : ℝ → E} {s : ℂ} (hfc : LocallyIntegrableOn f (Ioi 0)) (hf_top : f =O[atTop] (· ^ (-a))) (hs_top : s.re < a) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) : MellinConvergent (fun t => log t • f t) s ∧ HasDerivAt (mellin f) (mellin (fun t => log t • f t) s) s := by set F : ℂ → ℝ → E := fun (z : ℂ) (t : ℝ) => (t : ℂ) ^ (z - 1) • f t set F' : ℂ → ℝ → E := fun (z : ℂ) (t : ℝ) => ((t : ℂ) ^ (z - 1) * log t) • f t obtain ⟨v, hv0, hv1, hv2⟩ : ∃ v : ℝ, 0 < v ∧ v < s.re - b ∧ v < a - s.re := by obtain ⟨w, hw1, hw2⟩ := exists_between (sub_pos.mpr hs_top) obtain ⟨w', hw1', hw2'⟩ := exists_between (sub_pos.mpr hs_bot) exact ⟨min w w', lt_min hw1 hw1', (min_le_right _ _).trans_lt hw2', (min_le_left _ _).trans_lt hw2⟩ let bound : ℝ → ℝ := fun t : ℝ => (t ^ (s.re + v - 1) + t ^ (s.re - v - 1)) * |log t| * ‖f t‖ have h1 : ∀ᶠ z : ℂ in 𝓝 s, AEStronglyMeasurable (F z) (volume.restrict <| Ioi 0) := by refine Eventually.of_forall fun z => AEStronglyMeasurable.smul ?_ hfc.aestronglyMeasurable refine ContinuousOn.aestronglyMeasurable ?_ measurableSet_Ioi refine continuousOn_of_forall_continuousAt fun t ht => ?_ exact continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt ht) have h2 : IntegrableOn (F s) (Ioi (0 : ℝ)) := by exact mellinConvergent_of_isBigO_rpow hfc hf_top hs_top hf_bot hs_bot have h3 : AEStronglyMeasurable (F' s) (volume.restrict <| Ioi 0) := by apply LocallyIntegrableOn.aestronglyMeasurable refine hfc.continuousOn_smul isOpen_Ioi.isLocallyClosed ((continuousOn_of_forall_continuousAt fun t ht => ?_).mul ?_) · exact continuousAt_ofReal_cpow_const _ _ (Or.inr <| ne_of_gt ht) · refine continuous_ofReal.comp_continuousOn ?_ exact continuousOn_log.mono (subset_compl_singleton_iff.mpr notMem_Ioi_self) have h4 : ∀ᵐ t : ℝ ∂volume.restrict (Ioi 0), ∀ z : ℂ, z ∈ Metric.ball s v → ‖F' z t‖ ≤ bound t := by refine (ae_restrict_mem measurableSet_Ioi).mono fun t ht z hz => ?_ simp_rw [F', bound, norm_smul, norm_mul, norm_real, mul_assoc, norm_eq_abs] gcongr rw [norm_cpow_eq_rpow_re_of_pos ht] rcases le_or_gt 1 t with h | h · refine le_add_of_le_of_nonneg (rpow_le_rpow_of_exponent_le h ?_) (rpow_nonneg (zero_le_one.trans h) _) rw [sub_re, one_re, sub_le_sub_iff_right] rw [mem_ball_iff_norm] at hz have hz' := (re_le_norm _).trans hz.le rwa [sub_re, sub_le_iff_le_add'] at hz' · refine le_add_of_nonneg_of_le (rpow_pos_of_pos ht _).le (rpow_le_rpow_of_exponent_ge ht h.le ?_) rw [sub_re, one_re, sub_le_iff_le_add, sub_add_cancel] rw [mem_ball_iff_norm'] at hz have hz' := (re_le_norm _).trans hz.le rwa [sub_re, sub_le_iff_le_add, ← sub_le_iff_le_add'] at hz' have h5 : IntegrableOn bound (Ioi 0) := by simp_rw [bound, add_mul, mul_assoc] suffices ∀ {j : ℝ}, b < j → j < a → IntegrableOn (fun t : ℝ => t ^ (j - 1) * (|log t| * ‖f t‖)) (Ioi 0) volume by refine Integrable.add (this ?_ ?_) (this ?_ ?_) ...
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_hasDerivAt_of_isBigO_rpow
Suppose `f` is locally integrable on `(0, ∞)`, is `O(x ^ (-a))` as `x → ∞`, and is `O(x ^ (-b))` as `x → 0`. Then its Mellin transform is differentiable on the domain `b < re s < a`, with derivative equal to the Mellin transform of `log • f`.
mellin_differentiableAt_of_isBigO_rpow [NormedSpace ℂ E] {a b : ℝ} {f : ℝ → E} {s : ℂ} (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] (· ^ (-a))) (hs_top : s.re < a) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) : DifferentiableAt ℂ (mellin f) s := (mellin_hasDerivAt_of_isBigO_rpow hfc hf_top hs_top hf_bot hs_bot).2.differentiableAt
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_differentiableAt_of_isBigO_rpow
Suppose `f` is locally integrable on `(0, ∞)`, is `O(x ^ (-a))` as `x → ∞`, and is `O(x ^ (-b))` as `x → 0`. Then its Mellin transform is differentiable on the domain `b < re s < a`.
mellinConvergent_of_isBigO_rpow_exp [NormedSpace ℂ E] {a b : ℝ} (ha : 0 < a) {f : ℝ → E} {s : ℂ} (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] fun t => exp (-a * t)) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) : MellinConvergent f s := mellinConvergent_of_isBigO_rpow hfc (hf_top.trans (isLittleO_exp_neg_mul_rpow_atTop ha _).isBigO) (lt_add_one _) hf_bot hs_bot
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellinConvergent_of_isBigO_rpow_exp
If `f` is locally integrable, decays exponentially at infinity, and is `O(x ^ (-b))` at 0, then its Mellin transform converges for `b < s.re`.
mellin_differentiableAt_of_isBigO_rpow_exp [NormedSpace ℂ E] {a b : ℝ} (ha : 0 < a) {f : ℝ → E} {s : ℂ} (hfc : LocallyIntegrableOn f <| Ioi 0) (hf_top : f =O[atTop] fun t => exp (-a * t)) (hf_bot : f =O[𝓝[>] 0] (· ^ (-b))) (hs_bot : b < s.re) : DifferentiableAt ℂ (mellin f) s := mellin_differentiableAt_of_isBigO_rpow hfc (hf_top.trans (isLittleO_exp_neg_mul_rpow_atTop ha _).isBigO) (lt_add_one _) hf_bot hs_bot
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
mellin_differentiableAt_of_isBigO_rpow_exp
If `f` is locally integrable, decays exponentially at infinity, and is `O(x ^ (-b))` at 0, then its Mellin transform is holomorphic on `b < s.re`.
hasMellin_one_Ioc {s : ℂ} (hs : 0 < re s) : HasMellin (indicator (Ioc 0 1) (fun _ => 1 : ℝ → ℂ)) s (1 / s) := by have aux1 : -1 < (s - 1).re := by simpa only [sub_re, one_re, sub_eq_add_neg] using lt_add_of_pos_left _ hs have aux2 : s ≠ 0 := by contrapose! hs; rw [hs, zero_re] have aux3 : MeasurableSet (Ioc (0 : ℝ) 1) := measurableSet_Ioc simp_rw [HasMellin, mellin, MellinConvergent, ← indicator_smul, IntegrableOn, integrable_indicator_iff aux3, smul_eq_mul, integral_indicator aux3, mul_one, IntegrableOn, Measure.restrict_restrict_of_subset Ioc_subset_Ioi_self] rw [← IntegrableOn, ← intervalIntegrable_iff_integrableOn_Ioc_of_le zero_le_one] refine ⟨intervalIntegral.intervalIntegrable_cpow' aux1, ?_⟩ rw [← intervalIntegral.integral_of_le zero_le_one, integral_cpow (Or.inl aux1), sub_add_cancel, ofReal_zero, ofReal_one, one_cpow, zero_cpow aux2, sub_zero]
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
hasMellin_one_Ioc
The Mellin transform of the indicator function of `Ioc 0 1`.
hasMellin_cpow_Ioc (a : ℂ) {s : ℂ} (hs : 0 < re s + re a) : HasMellin (indicator (Ioc 0 1) (fun t => ↑t ^ a : ℝ → ℂ)) s (1 / (s + a)) := by have := hasMellin_one_Ioc (by rwa [add_re] : 0 < (s + a).re) simp_rw [HasMellin, ← MellinConvergent.cpow_smul, ← mellin_cpow_smul, ← indicator_smul, smul_eq_mul, mul_one] at this exact this
theorem
Analysis
[ "Mathlib.Analysis.SpecialFunctions.ImproperIntegrals", "Mathlib.Analysis.Calculus.ParametricIntegral", "Mathlib.MeasureTheory.Measure.Haar.NormedSpace" ]
Mathlib/Analysis/MellinTransform.lean
hasMellin_cpow_Ioc
The Mellin transform of a power function restricted to `Ioc 0 1`.
noncomputable oscillation [TopologicalSpace E] (f : E → F) (x : E) : ENNReal := ⨅ S ∈ (𝓝 x).map f, diam S
def
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
oscillation
The oscillation of `f : E → F` at `x`.
noncomputable oscillationWithin [TopologicalSpace E] (f : E → F) (D : Set E) (x : E) : ENNReal := ⨅ S ∈ (𝓝[D] x).map f, diam S
def
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
oscillationWithin
The oscillation of `f : E → F` within `D` at `x`.
oscillationWithin_nhds_eq_oscillation [TopologicalSpace E] (f : E → F) (D : Set E) (x : E) (hD : D ∈ 𝓝 x) : oscillationWithin f D x = oscillation f x := by rw [oscillation, oscillationWithin, nhdsWithin_eq_nhds.2 hD] @[deprecated (since := "2025-05-22")] alias oscillationWithin_nhd_eq_oscillation := oscillationWithin_nhds_eq_oscillation
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
oscillationWithin_nhds_eq_oscillation
The oscillation of `f` at `x` within a neighborhood `D` of `x` is equal to `oscillation f x`
oscillationWithin_univ_eq_oscillation [TopologicalSpace E] (f : E → F) (x : E) : oscillationWithin f univ x = oscillation f x := oscillationWithin_nhds_eq_oscillation f univ x Filter.univ_mem
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
oscillationWithin_univ_eq_oscillation
The oscillation of `f` at `x` within `univ` is equal to `oscillation f x`
oscillationWithin_eq_zero [TopologicalSpace E] {f : E → F} {D : Set E} {x : E} (hf : ContinuousWithinAt f D x) : oscillationWithin f D x = 0 := by refine le_antisymm (_root_.le_of_forall_pos_le_add fun ε hε ↦ ?_) (zero_le _) rw [zero_add] have : ball (f x) (ε / 2) ∈ (𝓝[D] x).map f := hf <| ball_mem_nhds _ (by simp [ne_of_gt hε]) refine (biInf_le diam this).trans (le_of_le_of_eq diam_ball ?_) exact (ENNReal.mul_div_cancel (by simp) (by simp))
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
oscillationWithin_eq_zero
null
oscillation_eq_zero [TopologicalSpace E] {f : E → F} {x : E} (hf : ContinuousAt f x) : oscillation f x = 0 := by rw [← continuousWithinAt_univ f x] at hf exact oscillationWithin_univ_eq_oscillation f x ▸ hf.oscillationWithin_eq_zero
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
oscillation_eq_zero
null
eq_zero_iff_continuousWithinAt [TopologicalSpace E] (f : E → F) {D : Set E} {x : E} (xD : x ∈ D) : oscillationWithin f D x = 0 ↔ ContinuousWithinAt f D x := by refine ⟨fun hf ↦ EMetric.tendsto_nhds.mpr (fun ε ε0 ↦ ?_), fun hf ↦ hf.oscillationWithin_eq_zero⟩ simp_rw [← hf, oscillationWithin, iInf_lt_iff] at ε0 obtain ⟨S, hS, Sε⟩ := ε0 refine Filter.mem_of_superset hS (fun y hy ↦ lt_of_le_of_lt ?_ Sε) exact edist_le_diam_of_mem (mem_preimage.1 hy) <| mem_preimage.1 (mem_of_mem_nhdsWithin xD hS)
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
eq_zero_iff_continuousWithinAt
The oscillation within `D` of `f` at `x ∈ D` is 0 if and only if `ContinuousWithinAt f D x`.
eq_zero_iff_continuousAt [TopologicalSpace E] (f : E → F) (x : E) : oscillation f x = 0 ↔ ContinuousAt f x := by rw [← oscillationWithin_univ_eq_oscillation, ← continuousWithinAt_univ f x] exact OscillationWithin.eq_zero_iff_continuousWithinAt f (mem_univ x)
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
eq_zero_iff_continuousAt
The oscillation of `f` at `x` is 0 if and only if `f` is continuous at `x`.
uniform_oscillationWithin (comp : IsCompact K) (hK : ∀ x ∈ K, oscillationWithin f D x < ε) : ∃ δ > 0, ∀ x ∈ K, diam (f '' (ball x (ENNReal.ofReal δ) ∩ D)) ≤ ε := by let S := fun r ↦ { x : E | ∃ (a : ℝ), (a > r ∧ diam (f '' (ball x (ENNReal.ofReal a) ∩ D)) ≤ ε) } have S_open : ∀ r > 0, IsOpen (S r) := by refine fun r _ ↦ isOpen_iff.mpr fun x ⟨a, ar, ha⟩ ↦ ⟨ENNReal.ofReal ((a - r) / 2), by simp [ar], ?_⟩ refine fun y hy ↦ ⟨a - (a - r) / 2, by linarith, le_trans (diam_mono (image_mono fun z hz ↦ ?_)) ha⟩ refine ⟨lt_of_le_of_lt (edist_triangle z y x) (lt_of_lt_of_eq (ENNReal.add_lt_add hz.1 hy) ?_), hz.2⟩ rw [← ofReal_add (by linarith) (by linarith), sub_add_cancel] have S_cover : K ⊆ ⋃ r > 0, S r := by intro x hx have : oscillationWithin f D x < ε := hK x hx simp only [oscillationWithin, Filter.mem_map, iInf_lt_iff] at this obtain ⟨n, hn₁, hn₂⟩ := this obtain ⟨r, r0, hr⟩ := mem_nhdsWithin_iff.1 hn₁ simp only [gt_iff_lt, mem_iUnion, exists_prop] have : ∀ r', (ENNReal.ofReal r') ≤ r → diam (f '' (ball x (ENNReal.ofReal r') ∩ D)) ≤ ε := by intro r' hr' grw [← hn₂, ← image_subset_iff.2 hr, hr'] by_cases r_top : r = ⊤ · use 1, one_pos, 2, one_lt_two, this 2 (by simp only [r_top, le_top]) · obtain ⟨r', hr'⟩ := exists_between (toReal_pos (ne_of_gt r0) r_top) use r', hr'.1, r.toReal, hr'.2, this r.toReal ofReal_toReal_le have S_antitone : ∀ (r₁ r₂ : ℝ), r₁ ≤ r₂ → S r₂ ⊆ S r₁ := fun r₁ r₂ hr x ⟨a, ar₂, ha⟩ ↦ ⟨a, lt_of_le_of_lt hr ar₂, ha⟩ obtain ⟨δ, δ0, hδ⟩ : ∃ r > 0, K ⊆ S r := by obtain ⟨T, Tb, Tfin, hT⟩ := comp.elim_finite_subcover_image S_open S_cover by_cases T_nonempty : T.Nonempty · use Tfin.isWF.min T_nonempty, Tb (Tfin.isWF.min_mem T_nonempty) intro x hx obtain ⟨r, hr⟩ := mem_iUnion.1 (hT hx) simp only [mem_iUnion, exists_prop] at hr exact (S_antitone _ r (IsWF.min_le Tfin.isWF T_nonempty hr.1)) hr.2 · rw [not_nonempty_iff_eq_empty] at T_nonempty use 1, one_pos, subset_trans hT (by simp [T_nonempty]) use δ, δ0 intro x xK obtain ⟨a, δa, ha⟩ := hδ xK grw [← ha] gcongr
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
uniform_oscillationWithin
If `oscillationWithin f D x < ε` at every `x` in a compact set `K`, then there exists `δ > 0` such that the oscillation of `f` on `ball x δ ∩ D` is less than `ε` for every `x` in `K`.
uniform_oscillation {K : Set E} (comp : IsCompact K) {f : E → F} {ε : ENNReal} (hK : ∀ x ∈ K, oscillation f x < ε) : ∃ δ > 0, ∀ x ∈ K, diam (f '' (ball x (ENNReal.ofReal δ))) ≤ ε := by simp only [← oscillationWithin_univ_eq_oscillation] at hK convert ← comp.uniform_oscillationWithin hK exact inter_univ _
theorem
Analysis
[ "Mathlib.Data.ENNReal.Real", "Mathlib.Order.WellFoundedSet", "Mathlib.Topology.EMetricSpace.Diam" ]
Mathlib/Analysis/Oscillation.lean
uniform_oscillation
If `oscillation f x < ε` at every `x` in a compact set `K`, then there exists `δ > 0` such that the oscillation of `f` on `ball x δ` is less than `ε` for every `x` in `K`.