math / data /lean /OAI /Probability /FreeIsing /Energy /RowEnergyConvergence.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
6.99 kB
import OAI.Probability.FreeIsing.Energy.EnergyLimit
import OAI.Probability.FreeIsing.Martingales.PredictableL2Completion
namespace OAI
noncomputable section
open Filter Finset
open scoped Topology
namespace Problem367.RowEnergyConvergence
theorem summable_limit_of_tsum_le
{ΞΉ : Type*} {a : β„• β†’ ΞΉ β†’ ℝ} {b : ΞΉ β†’ ℝ} {K : ℝ}
(ha : βˆ€ n i, 0 ≀ a n i) (hsum : βˆ€ n, Summable (a n))
(hlim : βˆ€ i, Tendsto (fun n => a n i) atTop (𝓝 (b i)))
(hbound : βˆ€ n, βˆ‘' i, a n i ≀ K) :
Summable b ∧ βˆ‘' i, b i ≀ K := by
classical
have hb (i : ΞΉ) : 0 ≀ b i :=
ge_of_tendsto (hlim i) (Eventually.of_forall fun n => ha n i)
have hpartial (s : Finset ΞΉ) : βˆ‘ i ∈ s, b i ≀ K := by
apply le_of_tendsto (tendsto_finsetSum s fun i _ => hlim i)
exact Eventually.of_forall fun n =>
((hsum n).sum_le_tsum s (fun i _ => ha n i)).trans (hbound n)
have hs : Summable b := summable_of_sum_le hb hpartial
exact ⟨hs, hs.tsum_le_of_sum_le hpartial⟩
theorem uniform_complement_tails_of_two_stage_bound
{ΞΉ : Type*} {a : β„• β†’ ΞΉ β†’ ℝ} {sets : β„• β†’ Finset ΞΉ}
{early : β„• β†’ ℝ} {late : β„• β†’ β„• β†’ ℝ}
(hsum : βˆ€ n, Summable (a n))
(hearly : Tendsto early atTop (𝓝 0))
(hlate : βˆ€ k, Tendsto (late k) atTop (𝓝 0))
(hbound : βˆ€ n k L,
(βˆ‘' i, a n i) - βˆ‘ i ∈ sets L, a n i ≀ early k + late k L) :
βˆ€ Ξ΅ > 0, βˆƒ s : Finset ΞΉ,
βˆ€ n, βˆ‘' i : {i // i βˆ‰ s}, a n i.1 ≀ Ξ΅ := by
intro Ξ΅ hΞ΅
obtain ⟨s, hs⟩ := Problem367.uniform_energy_tails_of_two_stage_bound
hearly hlate hbound Ξ΅ hΞ΅
refine ⟨s, fun n => ?_⟩
have hsplit := (hsum n).sum_add_tsum_subtype_compl s
linarith [hs n]
theorem norm_sub_sq_le {H : Type*} [SeminormedAddCommGroup H] (x y : H) :
β€–x - yβ€– ^ 2 ≀ 2 * β€–xβ€– ^ 2 + 2 * β€–yβ€– ^ 2 := by
have h := norm_sub_le x y
have hx := norm_nonneg x
have hy := norm_nonneg y
have hd := norm_nonneg (x - y)
nlinarith [sq_nonneg (β€–xβ€– - β€–yβ€–)]
theorem tendsto_tsum_norm_sub_sq_of_uniform_tails
{ΞΉ H : Type*} [NormedAddCommGroup H]
{f : β„• β†’ ΞΉ β†’ H} {g : ΞΉ β†’ H} {K : ℝ}
(hsum : βˆ€ n, Summable (fun i => β€–f n iβ€– ^ 2))
(hbound : βˆ€ n, βˆ‘' i, β€–f n iβ€– ^ 2 ≀ K)
(hcoordinate : βˆ€ i, Tendsto (fun n => f n i) atTop (𝓝 (g i)))
(htail : βˆ€ Ξ΅ > 0, βˆƒ s : Finset ΞΉ,
βˆ€ n, βˆ‘' i : {i // i βˆ‰ s}, β€–f n i.1β€– ^ 2 ≀ Ξ΅) :
Summable (fun i => β€–g iβ€– ^ 2) ∧
(βˆ€ n, Summable (fun i => β€–f n i - g iβ€– ^ 2)) ∧
Tendsto (fun n => βˆ‘' i, β€–f n i - g iβ€– ^ 2) atTop (𝓝 0) := by
classical
have henergy (i : ΞΉ) : Tendsto (fun n => β€–f n iβ€– ^ 2) atTop
(𝓝 (β€–g iβ€– ^ 2)) := (hcoordinate i).norm.pow 2
have hg := (summable_limit_of_tsum_le (fun n i => sq_nonneg β€–f n iβ€–)
hsum henergy hbound).1
have herror (n : β„•) : Summable (fun i => β€–f n i - g iβ€– ^ 2) :=
Summable.of_nonneg_of_le (fun i => sq_nonneg _) (fun i => norm_sub_sq_le _ _)
(((hsum n).mul_left 2).add (hg.mul_left 2))
refine ⟨hg, herror, tendsto_order.2 ⟨?_, ?_⟩⟩
Β· intro a ha
exact Eventually.of_forall fun n =>
ha.trans_le (tsum_nonneg fun i => sq_nonneg β€–f n i - g iβ€–)
Β· intro Ξ΅ hΞ΅
obtain ⟨s, hs⟩ := htail (Ρ / 8) (by positivity)
have hgtail : βˆ‘' i : {i // i βˆ‰ s}, β€–g i.1β€– ^ 2 ≀ Ξ΅ / 8 :=
(summable_limit_of_tsum_le
(a := fun n (i : {i // i βˆ‰ s}) => β€–f n i.1β€– ^ 2)
(b := fun i : {i // i βˆ‰ s} => β€–g i.1β€– ^ 2)
(fun n i => sq_nonneg β€–f n i.1β€–)
(fun n => (hsum n).subtype (fun i => i βˆ‰ s))
(fun i => henergy i.1) hs).2
have hfinite : Tendsto (fun n => βˆ‘ i ∈ s, β€–f n i - g iβ€– ^ 2)
atTop (𝓝 0) := by
have h := tendsto_finsetSum s (fun i _ =>
(((hcoordinate i).sub_const (g i)).norm).pow 2)
simpa only [sub_self, norm_zero, zero_pow (by decide : 2 β‰  0), sum_const_zero]
using h
filter_upwards [(tendsto_order.1 hfinite).2 (Ξ΅ / 2) (by positivity)] with n hn
have herrtail : (βˆ‘' i : {i // i βˆ‰ s}, β€–f n i.1 - g i.1β€– ^ 2) ≀
2 * (βˆ‘' i : {i // i βˆ‰ s}, β€–f n i.1β€– ^ 2) +
2 * (βˆ‘' i : {i // i βˆ‰ s}, β€–g i.1β€– ^ 2) := by
calc
_ ≀ βˆ‘' i : {i // i βˆ‰ s},
(2 * β€–f n i.1β€– ^ 2 + 2 * β€–g i.1β€– ^ 2) :=
Summable.tsum_le_tsum (fun i => norm_sub_sq_le _ _)
((herror n).subtype _)
((((hsum n).subtype _).mul_left 2).add ((hg.subtype _).mul_left 2))
_ = _ := by
simpa only [Function.comp_apply, tsum_mul_left] using
((((hsum n).subtype (fun i => i βˆ‰ s)).mul_left 2).tsum_add
((hg.subtype (fun i => i βˆ‰ s)).mul_left 2))
rw [← (herror n).sum_add_tsum_subtype_compl s]
linarith [hs n]
open MeasureTheory
theorem tendsto_tsum_integral_sq_sub_of_uniform_tails
{Ξ© ΞΉ : Type*} [MeasurableSpace Ξ©] (ΞΌ : Measure Ξ©)
{f : β„• β†’ ΞΉ β†’ Ξ© β†’ ℝ} {g : ΞΉ β†’ Ξ© β†’ ℝ} {K : ℝ}
(hf : βˆ€ n i, MemLp (f n i) 2 ΞΌ) (hg : βˆ€ i, MemLp (g i) 2 ΞΌ)
(hsum : βˆ€ n, Summable (fun i => ∫ Ο‰, (f n i Ο‰) ^ 2 βˆ‚ΞΌ))
(hbound : βˆ€ n, βˆ‘' i, ∫ Ο‰, (f n i Ο‰) ^ 2 βˆ‚ΞΌ ≀ K)
(hcoordinate : βˆ€ i, Tendsto
(fun n => ∫ Ο‰, (f n i Ο‰ - g i Ο‰) ^ 2 βˆ‚ΞΌ) atTop (𝓝 0))
(htail : βˆ€ Ξ΅ > 0, βˆƒ s : Finset ΞΉ,
βˆ€ n, βˆ‘' i : {i // i βˆ‰ s}, ∫ Ο‰, (f n i.1 Ο‰) ^ 2 βˆ‚ΞΌ ≀ Ξ΅) :
Summable (fun i => ∫ Ο‰, (g i Ο‰) ^ 2 βˆ‚ΞΌ) ∧
(βˆ€ n, Summable (fun i => ∫ Ο‰, (f n i Ο‰ - g i Ο‰) ^ 2 βˆ‚ΞΌ)) ∧
Tendsto (fun n => βˆ‘' i, ∫ Ο‰, (f n i Ο‰ - g i Ο‰) ^ 2 βˆ‚ΞΌ)
atTop (𝓝 0) := by
let F : β„• β†’ ΞΉ β†’ Lp ℝ 2 ΞΌ := fun n i => (hf n i).toLp (f n i)
let G : ΞΉ β†’ Lp ℝ 2 ΞΌ := fun i => (hg i).toLp (g i)
have hF (n : β„•) (i : ΞΉ) : β€–F n iβ€– ^ 2 = ∫ Ο‰, (f n i Ο‰) ^ 2 βˆ‚ΞΌ :=
PredictableL2.norm_toLp_sq (hf n i)
have hG (i : ΞΉ) : β€–G iβ€– ^ 2 = ∫ Ο‰, (g i Ο‰) ^ 2 βˆ‚ΞΌ :=
PredictableL2.norm_toLp_sq (hg i)
have hFG (n : β„•) (i : ΞΉ) :
β€–F n i - G iβ€– ^ 2 = ∫ Ο‰, (f n i Ο‰ - g i Ο‰) ^ 2 βˆ‚ΞΌ := by
change β€–(hf n i).toLp (f n i) - (hg i).toLp (g i)β€– ^ 2 = _
rw [← MemLp.toLp_sub]
exact PredictableL2.norm_toLp_sq ((hf n i).sub (hg i))
have hconv (i : ΞΉ) : Tendsto (fun n => F n i) atTop (𝓝 (G i)) := by
apply tendsto_iff_norm_sub_tendsto_zero.2
have h : Tendsto (fun n => β€–F n i - G iβ€– ^ 2) atTop (𝓝 0) := by
simpa only [hFG] using hcoordinate i
simpa only [Real.sqrt_sq_eq_abs, abs_norm, Real.sqrt_zero] using h.sqrt
have h := tendsto_tsum_norm_sub_sq_of_uniform_tails
(f := F) (g := G) (K := K)
(fun n => by simpa only [hF] using hsum n)
(fun n => by simpa only [hF] using hbound n) hconv
(by simpa only [hF] using htail)
simpa only [hG, hFG] using h
end Problem367.RowEnergyConvergence
end
end OAI