Download data/lean/OAI/Probability/FreeIsing/Energy/EnergyLimit.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.21 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Energy/EnergyLimit.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Energy/EnergyLimit.lean
-
curl -L -o EnergyLimit.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Energy/EnergyLimit.lean
5.21 kB
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| open Filter Finset | |
| open scoped Topology | |
| namespace Problem367 | |
| theorem hasSum_of_uniform_energy_tails | |
| {ΞΉ : Type*} {a : β β ΞΉ β β} {b : ΞΉ β β} {energy : β β β} {total : β} | |
| (ha : β n i, 0 β€ a n i) | |
| (hpartial : β n (s : Finset ΞΉ), β i β s, a n i β€ energy n) | |
| (hcoordinate : β i, Tendsto (fun n => a n i) atTop (π (b i))) | |
| (henergy : Tendsto energy atTop (π total)) | |
| (htail : β Ξ΅ > 0, β s : Finset ΞΉ, | |
| β n, energy n - β i β s, a n i β€ Ξ΅) : | |
| HasSum b total := by | |
| classical | |
| have hb : β i, 0 β€ b i := fun i => | |
| ge_of_tendsto (hcoordinate i) (Eventually.of_forall fun n => ha n i) | |
| have hsumlim (s : Finset ΞΉ) : | |
| Tendsto (fun n => β i β s, a n i) atTop (π (β i β s, b i)) := | |
| tendsto_finsetSum s (fun i _ => hcoordinate i) | |
| have hbound (s : Finset ΞΉ) : β i β s, b i β€ total := | |
| le_of_tendsto_of_tendsto (hsumlim s) henergy | |
| (Eventually.of_forall fun n => hpartial n s) | |
| have hsummable : Summable b := summable_of_sum_le hb hbound | |
| have hle : β' i, b i β€ total := hsummable.tsum_le_of_sum_le hbound | |
| have hge : total β€ β' i, b i := by | |
| apply le_of_forall_pos_le_add | |
| intro Ξ΅ hΞ΅ | |
| obtain β¨s, hsβ© := htail Ξ΅ hΞ΅ | |
| have hrem : total - β i β s, b i β€ Ξ΅ := | |
| le_of_tendsto (henergy.sub (hsumlim s)) (Eventually.of_forall hs) | |
| have hfinite : β i β s, b i β€ β' i, b i := | |
| hsummable.sum_le_tsum s (fun i _ => hb i) | |
| linarith | |
| simpa only [le_antisymm hle hge] using hsummable.hasSum | |
| theorem uniform_energy_tails_of_two_stage_bound | |
| {ΞΉ : Type*} {a : β β ΞΉ β β} {energy : β β β} | |
| {sets : β β Finset ΞΉ} {early : β β β} {late : β β β β β} | |
| (hearly : Tendsto early atTop (π 0)) | |
| (hlate : β k, Tendsto (late k) atTop (π 0)) | |
| (hbound : β n k L, | |
| energy n - β i β sets L, a n i β€ early k + late k L) : | |
| β Ξ΅ > 0, β s : Finset ΞΉ, β n, energy n - β i β s, a n i β€ Ξ΅ := by | |
| intro Ξ΅ hΞ΅ | |
| have hhalf : 0 < Ξ΅ / 2 := half_pos hΞ΅ | |
| obtain β¨k, hkβ© := ((tendsto_order.1 hearly).2 (Ξ΅ / 2) hhalf).exists | |
| obtain β¨L, hLβ© := ((tendsto_order.1 (hlate k)).2 (Ξ΅ / 2) hhalf).exists | |
| refine β¨sets L, fun n => ?_β© | |
| have := hbound n k L | |
| linarith | |
| section Hilbert | |
| variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace β H] | |
| theorem norm_sq_residual_of_testing (x y : H) | |
| (htest : inner β x y = βyβ ^ 2) : | |
| βx - yβ ^ 2 = βxβ ^ 2 - βyβ ^ 2 := by | |
| rw [norm_sub_sq_real, htest] | |
| ring | |
| theorem tendsto_of_testing_and_energy | |
| {Ξ± : Type*} {l : Filter Ξ±} {s : Ξ± β H} {x : H} | |
| (htest : β n, inner β x (s n) = βs nβ ^ 2) | |
| (henergy : Tendsto (fun n => βs nβ ^ 2) l (π (βxβ ^ 2))) : | |
| Tendsto s l (π x) := by | |
| have hres (n : Ξ±) : βs n - xβ ^ 2 = βxβ ^ 2 - βs nβ ^ 2 := by | |
| rw [norm_sub_rev] | |
| exact norm_sq_residual_of_testing x (s n) (htest n) | |
| have hsq : Tendsto (fun n => βs n - xβ ^ 2) l (π 0) := by | |
| simpa only [hres, sub_self] using | |
| (tendsto_const_nhds : Tendsto (fun _ : Ξ± => βxβ ^ 2) l (π (βxβ ^ 2))).sub henergy | |
| apply tendsto_iff_norm_sub_tendsto_zero.mpr | |
| simpa only [Real.sqrt_sq_eq_abs, abs_norm, Real.sqrt_zero] using hsq.sqrt | |
| theorem norm_sq_sum_of_pairwise_orthogonal | |
| {ΞΉ : Type*} (u : ΞΉ β H) | |
| (hortho : β i j, i β j β inner β (u i) (u j) = 0) | |
| (s : Finset ΞΉ) : ββ i β s, u iβ ^ 2 = β i β s, βu iβ ^ 2 := by | |
| classical | |
| rw [β real_inner_self_eq_norm_sq, sum_inner] | |
| apply Finset.sum_congr rfl | |
| intro i hi | |
| rw [inner_sum, Finset.sum_eq_single i] | |
| Β· exact real_inner_self_eq_norm_sq (u i) | |
| Β· intro j hj hji | |
| exact hortho i j hji.symm | |
| Β· intro hnot | |
| exact (hnot hi).elim | |
| theorem hasSum_of_orthogonal_testing_and_energy | |
| {ΞΉ : Type*} {u : ΞΉ β H} {x : H} | |
| (hortho : β i j, i β j β inner β (u i) (u j) = 0) | |
| (htest : β i, inner β x (u i) = βu iβ ^ 2) | |
| (henergy : HasSum (fun i => βu iβ ^ 2) (βxβ ^ 2)) : | |
| HasSum u x := by | |
| classical | |
| apply tendsto_of_testing_and_energy | |
| Β· intro s | |
| rw [inner_sum, norm_sq_sum_of_pairwise_orthogonal u hortho s] | |
| exact Finset.sum_congr rfl fun i _ => htest i | |
| Β· simpa only [HasSum, norm_sq_sum_of_pairwise_orthogonal u hortho] using henergy | |
| theorem hasSum_of_uniform_energy_tails_and_testing | |
| {ΞΉ : Type*} {a : β β ΞΉ β β} {energy : β β β} {u : ΞΉ β H} {x : H} | |
| (ha : β n i, 0 β€ a n i) | |
| (hpartial : β n (s : Finset ΞΉ), β i β s, a n i β€ energy n) | |
| (hcoordinate : β i, Tendsto (fun n => a n i) atTop (π (βu iβ ^ 2))) | |
| (henergy : Tendsto energy atTop (π (βxβ ^ 2))) | |
| (htail : β Ξ΅ > 0, β s : Finset ΞΉ, | |
| β n, energy n - β i β s, a n i β€ Ξ΅) | |
| (hortho : β i j, i β j β inner β (u i) (u j) = 0) | |
| (htest : β i, inner β x (u i) = βu iβ ^ 2) : | |
| HasSum u x := | |
| hasSum_of_orthogonal_testing_and_energy hortho htest | |
| (hasSum_of_uniform_energy_tails ha hpartial hcoordinate henergy htail) | |
| end Hilbert | |
| end Problem367 | |
| end | |
| end OAI | |