math / data /lean /OAI /Probability /FreeIsing /Estimates /EndpointSums.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
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