math / data /lean /OAI /Probability /FreeIsing /Stochastic /CompensatorVariation.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
7.56 kB
import Mathlib
namespace OAI
noncomputable section
open MeasureTheory Set Filter
open scoped Topology BigOperators ENNReal
namespace Problem367.CompensatorVariation
def squaredIncrements (a : β„• β†’ ℝ) (N : β„•) : ℝ :=
βˆ‘ i ∈ Finset.range N, (a (i + 1) - a i) ^ 2
theorem squaredIncrements_nonneg (a : β„• β†’ ℝ) (N : β„•) :
0 ≀ squaredIncrements a N := Finset.sum_nonneg (fun _ _ => sq_nonneg _)
theorem squaredIncrements_le {a : β„• β†’ ℝ} {N : β„•} {Ξ΄ : ℝ}
(hpos : βˆ€ i < N, 0 ≀ a (i + 1) - a i)
(hsmall : βˆ€ i < N, a (i + 1) - a i ≀ Ξ΄) :
squaredIncrements a N ≀ Ξ΄ * (a N - a 0) := by
calc
squaredIncrements a N ≀ βˆ‘ i ∈ Finset.range N, Ξ΄ * (a (i + 1) - a i) := by
apply Finset.sum_le_sum
intro i hi
rw [pow_two]
exact mul_le_mul_of_nonneg_right (hsmall i (Finset.mem_range.mp hi))
(hpos i (Finset.mem_range.mp hi))
_ = Ξ΄ * (a N - a 0) := by rw [← Finset.mul_sum, Finset.sum_range_sub]
theorem squaredIncrements_le_total_sq {a : β„• β†’ ℝ} {N : β„•}
(hpos : βˆ€ i < N, 0 ≀ a (i + 1) - a i) :
squaredIncrements a N ≀ (a N - a 0) ^ 2 := by
have h := Finset.sum_sq_le_sq_sum_of_nonneg
(s := Finset.range N) (fun i hi => hpos i (Finset.mem_range.mp hi))
simpa only [squaredIncrements, Finset.sum_range_sub] using h
theorem total_nonneg {a : β„• β†’ ℝ} {N : β„•}
(hpos : βˆ€ i < N, 0 ≀ a (i + 1) - a i) : 0 ≀ a N - a 0 := by
rw [← Finset.sum_range_sub a N]
exact Finset.sum_nonneg (fun i hi => hpos i (Finset.mem_range.mp hi))
theorem increment_le_total {a : β„• β†’ ℝ} {N : β„•}
(hpos : βˆ€ i < N, 0 ≀ a (i + 1) - a i) {i : β„•} (hi : i < N) :
a (i + 1) - a i ≀ a N - a 0 := by
rw [← Finset.sum_range_sub a N]
exact Finset.single_le_sum (fun j hj => hpos j (Finset.mem_range.mp hj))
(Finset.mem_range.mpr hi)
theorem tendsto_squaredIncrements {I : Type*} [PseudoMetricSpace I]
{K : Set I} (hK : IsCompact K) {A : I β†’ ℝ} (hA : ContinuousOn A K)
(t : β„• β†’ β„• β†’ I) (N : β„• β†’ β„•) (mesh : β„• β†’ ℝ)
(hmem : βˆ€ n i, i ≀ N n β†’ t n i ∈ K)
(hdist : βˆ€ n i, i < N n β†’ dist (t n i) (t n (i + 1)) ≀ mesh n)
(hmesh : Tendsto mesh atTop (𝓝 0))
(hpos : βˆ€ n i, i < N n β†’ 0 ≀ A (t n (i + 1)) - A (t n i))
{C : ℝ} (hC : 0 ≀ C) (hbound : βˆ€ n, A (t n (N n)) - A (t n 0) ≀ C) :
Tendsto (fun n => squaredIncrements (fun i => A (t n i)) (N n)) atTop (𝓝 0) := by
apply Metric.tendsto_atTop.mpr
intro Ξ΅ hΞ΅
let Ξ· := Ξ΅ / (C + 1)
have hΞ· : 0 < Ξ· := div_pos hΞ΅ (by linarith)
obtain ⟨δ, hδ, hmod⟩ := Metric.uniformContinuousOn_iff.mp
(hK.uniformContinuousOn_of_continuous hA) Ξ· hΞ·
obtain ⟨nβ‚€, hnβ‚€βŸ© := (hmesh.eventually (gt_mem_nhds hΞ΄)).exists_forall_of_atTop
refine ⟨nβ‚€, ?_⟩
intro n hn
have hsmall (i : β„•) (hi : i < N n) : A (t n (i + 1)) - A (t n i) ≀ Ξ· := by
have hh := hmod (t n (i + 1)) (hmem n (i + 1) (Nat.succ_le_of_lt hi))
(t n i) (hmem n i hi.le) (by
rw [dist_comm]
exact (hdist n i hi).trans_lt (hnβ‚€ n hn))
exact (le_abs_self _).trans (by simpa only [Real.dist_eq] using hh.le)
rw [Real.dist_eq, sub_zero, abs_of_nonneg (squaredIncrements_nonneg _ _)]
calc
squaredIncrements (fun i => A (t n i)) (N n) ≀
Ξ· * (A (t n (N n)) - A (t n 0)) := squaredIncrements_le (hpos n) hsmall
_ ≀ Ξ· * C := mul_le_mul_of_nonneg_left (hbound n) hΞ·.le
_ < Ξ΅ := by
change Ξ΅ / (C + 1) * C < Ξ΅
rw [div_mul_eq_mul_div]
apply (div_lt_iffβ‚€ (by linarith : 0 < C + 1)).2
nlinarith
variable {Ξ© : Type*} [MeasurableSpace Ξ©] {ΞΌ : Measure Ξ©}
theorem memLp_increment_of_total_bound [IsFiniteMeasure ΞΌ]
{a : β„• β†’ Ξ© β†’ ℝ} (hmeas : βˆ€ i, AEStronglyMeasurable (a i) ΞΌ) {N : β„•}
(hpos : βˆ€α΅ Ο‰ βˆ‚ΞΌ, βˆ€ i < N, 0 ≀ a (i + 1) Ο‰ - a i Ο‰)
{C : ℝ} (hbound : βˆ€α΅ Ο‰ βˆ‚ΞΌ, a N Ο‰ - a 0 Ο‰ ≀ C)
{i : β„•} (hi : i < N) (p : ℝβ‰₯0∞) :
MemLp (fun Ο‰ => a (i + 1) Ο‰ - a i Ο‰) p ΞΌ := by
apply MemLp.of_bound ((hmeas _).sub (hmeas _)) C
filter_upwards [hpos, hbound] with Ο‰ hp hb
rw [Real.norm_eq_abs, Pi.sub_apply, abs_of_nonneg (hp i hi)]
exact (increment_le_total (a := fun j => a j Ο‰) hp hi).trans hb
theorem tendsto_integral_squaredIncrements [IsFiniteMeasure ΞΌ]
{I : Type*} [PseudoMetricSpace I] {K : Set I} (hK : IsCompact K)
{A : I β†’ Ξ© β†’ ℝ} (hmeas : βˆ€ t, AEStronglyMeasurable (A t) ΞΌ)
(hc : βˆ€α΅ Ο‰ βˆ‚ΞΌ, ContinuousOn (fun t => A t Ο‰) K)
(t : β„• β†’ β„• β†’ I) (N : β„• β†’ β„•) (mesh : β„• β†’ ℝ)
(hmem : βˆ€ n i, i ≀ N n β†’ t n i ∈ K)
(hdist : βˆ€ n i, i < N n β†’ dist (t n i) (t n (i + 1)) ≀ mesh n)
(hmesh : Tendsto mesh atTop (𝓝 0))
(hpos : βˆ€α΅ Ο‰ βˆ‚ΞΌ, βˆ€ n i, i < N n β†’ 0 ≀ A (t n (i + 1)) Ο‰ - A (t n i) Ο‰)
{C : ℝ} (hC : 0 ≀ C)
(hbound : βˆ€α΅ Ο‰ βˆ‚ΞΌ, βˆ€ n, A (t n (N n)) Ο‰ - A (t n 0) Ο‰ ≀ C) :
Tendsto (fun n => ∫ Ο‰, squaredIncrements (fun i => A (t n i) Ο‰) (N n) βˆ‚ΞΌ)
atTop (𝓝 0) := by
have hm (n : β„•) : AEStronglyMeasurable
(fun Ο‰ => squaredIncrements (fun i => A (t n i) Ο‰) (N n)) ΞΌ := by
convert (Finset.aestronglyMeasurable_sum (Finset.range (N n))
(fun i _ => ((hmeas (t n (i + 1))).sub (hmeas (t n i))).pow 2)) using 1
ext Ο‰
simp only [squaredIncrements, Finset.sum_apply, Pi.pow_apply, Pi.sub_apply]
have hh := tendsto_integral_of_dominated_convergence
(ΞΌ := ΞΌ) (F := fun n Ο‰ => squaredIncrements (fun i => A (t n i) Ο‰) (N n))
(f := fun _ => (0 : ℝ)) (fun _ => C ^ 2) hm (integrable_const _) ?_ ?_
Β· simpa only [integral_zero] using hh
Β· intro n
filter_upwards [hpos, hbound] with Ο‰ hp hb
rw [Real.norm_eq_abs, abs_of_nonneg (squaredIncrements_nonneg _ _)]
exact (squaredIncrements_le_total_sq (hp n)).trans
((sq_le_sqβ‚€ (total_nonneg (a := fun i => A (t n i) Ο‰) (hp n)) hC).2 (hb n))
· filter_upwards [hc, hpos, hbound] with ω hω hp hb
exact tendsto_squaredIncrements hK hω t N mesh hmem hdist hmesh hp hC hb
theorem tendsto_sum_integral_sq_increments [IsFiniteMeasure ΞΌ]
{I : Type*} [PseudoMetricSpace I] {K : Set I} (hK : IsCompact K)
{A : I β†’ Ξ© β†’ ℝ} (hmeas : βˆ€ t, AEStronglyMeasurable (A t) ΞΌ)
(hc : βˆ€α΅ Ο‰ βˆ‚ΞΌ, ContinuousOn (fun t => A t Ο‰) K)
(t : β„• β†’ β„• β†’ I) (N : β„• β†’ β„•) (mesh : β„• β†’ ℝ)
(hmem : βˆ€ n i, i ≀ N n β†’ t n i ∈ K)
(hdist : βˆ€ n i, i < N n β†’ dist (t n i) (t n (i + 1)) ≀ mesh n)
(hmesh : Tendsto mesh atTop (𝓝 0))
(hpos : βˆ€α΅ Ο‰ βˆ‚ΞΌ, βˆ€ n i, i < N n β†’ 0 ≀ A (t n (i + 1)) Ο‰ - A (t n i) Ο‰)
{C : ℝ} (hC : 0 ≀ C)
(hbound : βˆ€α΅ Ο‰ βˆ‚ΞΌ, βˆ€ n, A (t n (N n)) Ο‰ - A (t n 0) Ο‰ ≀ C) :
Tendsto (fun n => βˆ‘ i ∈ Finset.range (N n),
∫ Ο‰, (A (t n (i + 1)) Ο‰ - A (t n i) Ο‰) ^ 2 βˆ‚ΞΌ) atTop (𝓝 0) := by
have heq (n : β„•) : (βˆ‘ i ∈ Finset.range (N n),
∫ Ο‰, (A (t n (i + 1)) Ο‰ - A (t n i) Ο‰) ^ 2 βˆ‚ΞΌ) =
∫ Ο‰, squaredIncrements (fun i => A (t n i) Ο‰) (N n) βˆ‚ΞΌ := by
symm
apply integral_finsetSum
intro i hi
apply (memLp_increment_of_total_bound (fun j => hmeas (t n j))
(hpos.mono (fun ω hω => hω n))
(hbound.mono (fun ω hω => hω n)) (Finset.mem_range.mp hi) 2).integrable_sq
simp_rw [heq]
exact tendsto_integral_squaredIncrements hK hmeas hc t N mesh hmem hdist hmesh hpos hC hbound
end Problem367.CompensatorVariation
end
end OAI