Download data/lean/OAI/Probability/FreeIsing/Estimates/EndpointSums.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.1 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Estimates/EndpointSums.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Estimates/EndpointSums.lean
-
curl -L -o EndpointSums.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Estimates/EndpointSums.lean
6.1 kB
| import OAI.Probability.FreeIsing.Trees.PathCutoff | |
| namespace OAI | |
| noncomputable section | |
| open Filter | |
| namespace Problem367 | |
| theorem tsum_le_prefix_add_majorant {f g : β β β} (R : β) | |
| (hf0 : β n, 0 β€ f n) (hg0 : β n, 0 β€ g n) (hg : Summable g) | |
| (htail : β n, R β€ n β f n β€ g n) : | |
| (β' n, f n) β€ (β n β Finset.range R, f n) + β' n, g n := by | |
| have hf : Summable f := hg.of_norm_bounded_eventually_nat <| | |
| eventually_atTop.mpr β¨R, fun n hn => by | |
| rw [Real.norm_eq_abs, abs_of_nonneg (hf0 n)] | |
| exact htail n hnβ© | |
| have hft : Summable (fun n => f (n + R)) := (summable_nat_add_iff R).mpr hf | |
| have hgt : Summable (fun n => g (n + R)) := (summable_nat_add_iff R).mpr hg | |
| calc | |
| (β' n, f n) = (β n β Finset.range R, f n) + β' n, f (n + R) := | |
| (hf.sum_add_tsum_nat_add R).symm | |
| _ β€ (β n β Finset.range R, f n) + β' n, g (n + R) := by | |
| exact add_le_add le_rfl (hft.tsum_le_tsum | |
| (fun n => htail (n + R) (Nat.le_add_left R n)) hgt) | |
| _ β€ (β n β Finset.range R, f n) + β' n, g n := by | |
| apply add_le_add le_rfl | |
| exact tsum_comp_le_tsum_of_inj (i := fun n : β => n + R) hg hg0 | |
| (fun m n h => Nat.add_right_cancel h) | |
| theorem sum_range_nat_pow_le (R k : β) : | |
| (β n β Finset.range R, (n : β) ^ k) β€ (R : β) ^ (k + 1) := by | |
| calc | |
| _ β€ β _n β Finset.range R, (R : β) ^ k := by | |
| apply Finset.sum_le_sum | |
| intro n hn | |
| have h : (n : β) β€ R := by exact_mod_cast (Finset.mem_range.mp hn).le | |
| exact pow_le_pow_leftβ (Nat.cast_nonneg n) h k | |
| _ = (R : β) ^ (k + 1) := by simp [pow_succ, mul_comm] | |
| theorem sum_range_sqrt_le (R : β) : | |
| (β n β Finset.range R, Real.sqrt n) β€ (R : β) * Real.sqrt R := by | |
| calc | |
| _ β€ β _n β Finset.range R, Real.sqrt R := by | |
| apply Finset.sum_le_sum | |
| intro n hn | |
| apply Real.sqrt_le_sqrt | |
| exact_mod_cast (Finset.mem_range.mp hn).le | |
| _ = (R : β) * Real.sqrt R := by simp | |
| theorem tsum_integer_path_endpoint_le {f : β β β} (R k m : β) | |
| {A B E c a q : β} (hf0 : β n, 0 β€ f n) | |
| (hA : 0 β€ A) (hB : 0 β€ B) (hE : 0 β€ E) | |
| (hc : 0 < c) (hc1 : c β€ 1) (ha : 0 < a) (hq : 1 < q) | |
| (hshort : β n, n < R β f n β€ A * (n : β) ^ k) | |
| (htail : β n, R β€ n β f n β€ | |
| B * ((n : β) ^ k * Real.exp (-c * n)) + | |
| E * ((n : β) ^ m * Real.exp (-a * q ^ n))) : | |
| (β' n, f n) β€ A * (R : β) ^ (k + 1) + | |
| B * ((k.factorial : β) * (2 / c) ^ (k + 1)) + | |
| E * (β' n : β, (n : β) ^ m * Real.exp (-a * q ^ n)) := by | |
| have hpoly := summable_path_attenuation k hc | |
| have hexception := summable_superexponential_path m ha hq | |
| have hg := (hpoly.mul_left B).add (hexception.mul_left E) | |
| have hprefix : (β n β Finset.range R, f n) β€ A * (R : β) ^ (k + 1) := by | |
| calc | |
| _ β€ β n β Finset.range R, A * (n : β) ^ k := by | |
| apply Finset.sum_le_sum | |
| intro n hn | |
| exact hshort n (Finset.mem_range.mp hn) | |
| _ = A * (β n β Finset.range R, (n : β) ^ k) := by rw [Finset.mul_sum] | |
| _ β€ A * (R : β) ^ (k + 1) := | |
| mul_le_mul_of_nonneg_left (sum_range_nat_pow_le R k) hA | |
| calc | |
| _ β€ (β n β Finset.range R, f n) + | |
| β' n : β, (B * ((n : β) ^ k * Real.exp (-c * n)) + | |
| E * ((n : β) ^ m * Real.exp (-a * q ^ n))) := | |
| tsum_le_prefix_add_majorant R hf0 (fun n => by positivity) hg htail | |
| _ = (β n β Finset.range R, f n) + | |
| (B * (β' n : β, (n : β) ^ k * Real.exp (-c * n)) + | |
| E * (β' n : β, (n : β) ^ m * Real.exp (-a * q ^ n))) := by | |
| rw [(hpoly.mul_left B).tsum_add (hexception.mul_left E), tsum_mul_left, tsum_mul_left] | |
| _ β€ A * (R : β) ^ (k + 1) + | |
| (B * ((k.factorial : β) * (2 / c) ^ (k + 1)) + | |
| E * (β' n : β, (n : β) ^ m * Real.exp (-a * q ^ n))) := by | |
| exact add_le_add hprefix (add_le_add | |
| (mul_le_mul_of_nonneg_left (tsum_path_attenuation_small_le k hc hc1) hB) le_rfl) | |
| _ = _ := by ring | |
| theorem tsum_sqrt_path_endpoint_le {f : β β β} (R m : β) | |
| {A B E c a q : β} (hf0 : β n, 0 β€ f n) | |
| (hA : 0 β€ A) (hB : 0 β€ B) (hE : 0 β€ E) | |
| (hc : 0 < c) (hc1 : c β€ 1) (ha : 0 < a) (hq : 1 < q) | |
| (hshort : β n, n < R β f n β€ A * Real.sqrt n) | |
| (htail : β n, R β€ n β f n β€ | |
| B * (Real.sqrt n * Real.exp (-c * n)) + | |
| E * ((n : β) ^ m * Real.exp (-a * q ^ n))) : | |
| (β' n, f n) β€ A * ((R : β) * Real.sqrt R) + | |
| B * (3 / (c * Real.sqrt c)) + | |
| E * (β' n : β, (n : β) ^ m * Real.exp (-a * q ^ n)) := by | |
| have hpoly := summable_sqrt_path_attenuation hc | |
| have hexception := summable_superexponential_path m ha hq | |
| have hg := (hpoly.mul_left B).add (hexception.mul_left E) | |
| have hprefix : (β n β Finset.range R, f n) β€ A * ((R : β) * Real.sqrt R) := by | |
| calc | |
| _ β€ β n β Finset.range R, A * Real.sqrt n := by | |
| apply Finset.sum_le_sum | |
| intro n hn | |
| exact hshort n (Finset.mem_range.mp hn) | |
| _ = A * (β n β Finset.range R, Real.sqrt n) := by rw [Finset.mul_sum] | |
| _ β€ A * ((R : β) * Real.sqrt R) := | |
| mul_le_mul_of_nonneg_left (sum_range_sqrt_le R) hA | |
| calc | |
| _ β€ (β n β Finset.range R, f n) + | |
| β' n : β, (B * (Real.sqrt n * Real.exp (-c * n)) + | |
| E * ((n : β) ^ m * Real.exp (-a * q ^ n))) := | |
| tsum_le_prefix_add_majorant R hf0 (fun n => by positivity) hg htail | |
| _ = (β n β Finset.range R, f n) + | |
| (B * (β' n : β, Real.sqrt n * Real.exp (-c * n)) + | |
| E * (β' n : β, (n : β) ^ m * Real.exp (-a * q ^ n))) := by | |
| rw [(hpoly.mul_left B).tsum_add (hexception.mul_left E), tsum_mul_left, tsum_mul_left] | |
| _ β€ A * ((R : β) * Real.sqrt R) + | |
| (B * (3 / (c * Real.sqrt c)) + | |
| E * (β' n : β, (n : β) ^ m * Real.exp (-a * q ^ n))) := by | |
| exact add_le_add hprefix (add_le_add | |
| (mul_le_mul_of_nonneg_left (tsum_sqrt_path_attenuation_le hc hc1) hB) le_rfl) | |
| _ = _ := by ring | |
| end Problem367 | |
| end | |
| end OAI | |