cfahlgren1's picture
download
raw
8.6 kB
import Mathlib
namespace OAI
noncomputable section
open scoped BigOperators
namespace Problem367
theorem norm_sum_sq_le_card_mul_of_re_inner_rows
{ΞΉ π•œ E : Type*} [RCLike π•œ] [NormedAddCommGroup E] [InnerProductSpace π•œ E]
(s : Finset ΞΉ) (f : ΞΉ β†’ E) {a : ΞΉ β†’ ΞΉ β†’ ℝ} {K : ℝ}
(hinner : βˆ€ i ∈ s, βˆ€ j ∈ s, RCLike.re (inner π•œ (f i) (f j)) ≀ a i j)
(hrow : βˆ€ i ∈ s, βˆ‘ j ∈ s, a i j ≀ K) :
β€–βˆ‘ i ∈ s, f iβ€– ^ 2 ≀ (s.card : ℝ) * K := by
rw [← inner_self_eq_norm_sq (π•œ := π•œ), sum_inner]
simp_rw [inner_sum, map_sum]
calc
βˆ‘ i ∈ s, βˆ‘ j ∈ s, RCLike.re (inner π•œ (f i) (f j))
≀ βˆ‘ i ∈ s, βˆ‘ j ∈ s, a i j :=
Finset.sum_le_sum fun i hi => Finset.sum_le_sum fun j hj => hinner i hi j hj
_ ≀ βˆ‘ _i ∈ s, K := Finset.sum_le_sum hrow
_ = (s.card : ℝ) * K := by simp
theorem norm_sum_sq_le_card_mul_of_inner_rows
{ΞΉ E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
(s : Finset ΞΉ) (f : ΞΉ β†’ E) {a : ΞΉ β†’ ΞΉ β†’ ℝ} {K : ℝ}
(hinner : βˆ€ i ∈ s, βˆ€ j ∈ s, inner ℝ (f i) (f j) ≀ a i j)
(hrow : βˆ€ i ∈ s, βˆ‘ j ∈ s, a i j ≀ K) :
β€–βˆ‘ i ∈ s, f iβ€– ^ 2 ≀ (s.card : ℝ) * K :=
norm_sum_sq_le_card_mul_of_re_inner_rows (π•œ := ℝ) s f hinner hrow
theorem sum_int_translate_le_tsum
(s : Finset β„€) (i : β„€) {c : β„€ β†’ ℝ}
(hc : βˆ€ k, 0 ≀ c k) (hsum : Summable c) :
βˆ‘ j ∈ s, c (j - i) ≀ βˆ‘' k, c k := by
classical
calc
βˆ‘ j ∈ s, c (j - i) = βˆ‘ k ∈ s.image (fun j => j - i), c k := by
symm
apply Finset.sum_image
intro a _ b _ hab
exact sub_left_injective hab
_ ≀ βˆ‘' k, c k := Summable.sum_le_tsum _ (fun k _ => hc k) hsum
theorem norm_sum_sq_le_card_mul_tsum_kernel
{E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
(s : Finset β„€) (f : β„€ β†’ E) {c : β„€ β†’ ℝ} {S : ℝ}
(hc : βˆ€ k, 0 ≀ c k) (hsum : Summable c) (hS : 0 ≀ S)
(hinner : βˆ€ i ∈ s, βˆ€ j ∈ s,
inner ℝ (f i) (f j) ≀ S * c (j - i)) :
β€–βˆ‘ i ∈ s, f iβ€– ^ 2 ≀ (s.card : ℝ) * (S * βˆ‘' k, c k) := by
apply norm_sum_sq_le_card_mul_of_inner_rows s f hinner
intro i _
rw [← Finset.mul_sum]
exact mul_le_mul_of_nonneg_left (sum_int_translate_le_tsum s i hc hsum) hS
def pathCorrelationKernel (q : ℝ) (k : β„€) : ℝ :=
((k.natAbs : ℝ) + 1) * q ^ k.natAbs
theorem pathCorrelationKernel_nonneg {q : ℝ} (hq : 0 ≀ q) (k : β„€) :
0 ≀ pathCorrelationKernel q k := by
unfold pathCorrelationKernel
positivity
theorem summable_pathCorrelationKernel {q : ℝ} (hq0 : 0 ≀ q) (hq1 : q < 1) :
Summable (pathCorrelationKernel q) := by
have hn : β€–qβ€– < 1 := by simpa [Real.norm_eq_abs, abs_of_nonneg hq0] using hq1
have hlin : Summable (fun n : β„• => (n : ℝ) * q ^ n) := by
simpa using summable_pow_mul_geometric_of_norm_lt_one 1 hn
have hgeom : Summable (fun n : β„• => q ^ n) := summable_geometric_of_lt_one hq0 hq1
have hnat : Summable (fun n : β„• => ((n : ℝ) + 1) * q ^ n) := by
simpa [add_mul] using hlin.add hgeom
apply summable_int_iff_summable_nat_and_neg.mpr
constructor <;> simpa [pathCorrelationKernel] using hnat
theorem tsum_pathCorrelationKernel {q : ℝ} (hq0 : 0 ≀ q) (hq1 : q < 1) :
(βˆ‘' k, pathCorrelationKernel q k) = 2 / (1 - q) ^ 2 - 1 := by
have hn : β€–qβ€– < 1 := by simpa [Real.norm_eq_abs, abs_of_nonneg hq0] using hq1
have hnat : HasSum (fun n : β„• => ((n : ℝ) + 1) * q ^ n)
(1 / (1 - q) ^ 2) := by
simpa using hasSum_choose_mul_geometric_of_norm_lt_one 1 hn
have hpos : HasSum (fun n : β„• => pathCorrelationKernel q (n : β„€))
(1 / (1 - q) ^ 2) := by
simpa [pathCorrelationKernel] using hnat
have hneg : HasSum (fun n : β„• => pathCorrelationKernel q (-(n : β„€)))
(1 / (1 - q) ^ 2) := by
simpa [pathCorrelationKernel] using hnat
have h := (hpos.of_nat_of_neg hneg).tsum_eq
simpa [pathCorrelationKernel, ← two_mul, div_eq_mul_inv] using h
theorem norm_sum_sq_le_pathCorrelationKernel
{E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
(s : Finset β„€) (f : β„€ β†’ E) {q S : ℝ}
(hq0 : 0 ≀ q) (hq1 : q < 1) (hS : 0 ≀ S)
(hinner : βˆ€ i ∈ s, βˆ€ j ∈ s,
inner ℝ (f i) (f j) ≀ S * pathCorrelationKernel q (j - i)) :
β€–βˆ‘ i ∈ s, f iβ€– ^ 2 ≀
(s.card : ℝ) * (S * βˆ‘' k, pathCorrelationKernel q k) :=
norm_sum_sq_le_card_mul_tsum_kernel s f
(pathCorrelationKernel_nonneg hq0) (summable_pathCorrelationKernel hq0 hq1) hS hinner
theorem norm_sum_sq_le_geometric_inner_bound
{π•œ E : Type*} [RCLike π•œ] [NormedAddCommGroup E] [InnerProductSpace π•œ E]
(s : Finset β„€) (f : β„€ β†’ E) {q S : ℝ}
(hq0 : 0 ≀ q) (hq1 : q < 1) (hS : 0 ≀ S)
(hinner : βˆ€ i ∈ s, βˆ€ j ∈ s,
β€–inner π•œ (f i) (f j)β€– ≀ S * pathCorrelationKernel q (j - i)) :
β€–βˆ‘ i ∈ s, f iβ€– ^ 2 ≀ (s.card : ℝ) * S * (2 / (1 - q) ^ 2 - 1) := by
have h := norm_sum_sq_le_card_mul_of_re_inner_rows s f
(fun i hi j hj => (RCLike.re_le_norm _).trans (hinner i hi j hj))
(K := S * βˆ‘' k, pathCorrelationKernel q k) (fun i _ => by
rw [← Finset.mul_sum]
exact mul_le_mul_of_nonneg_left (sum_int_translate_le_tsum s i
(pathCorrelationKernel_nonneg hq0) (summable_pathCorrelationKernel hq0 hq1)) hS)
simpa [tsum_pathCorrelationKernel hq0 hq1, mul_assoc] using h
open MeasureTheory
theorem integral_sum_sq_eq_sum_pair_moments
{ΞΉ Ξ© : Type*} [MeasurableSpace Ξ©] {ΞΌ : Measure Ξ©}
(s : Finset ΞΉ) (f : ΞΉ β†’ Ξ© β†’ ℝ)
(hf : βˆ€ i ∈ s, MemLp (f i) 2 ΞΌ) :
(∫ Ο‰, (βˆ‘ i ∈ s, f i Ο‰) ^ 2 βˆ‚ΞΌ) =
βˆ‘ i ∈ s, βˆ‘ j ∈ s, ∫ Ο‰, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ := by
have hp : βˆ€ i ∈ s, βˆ€ j ∈ s, Integrable (fun Ο‰ => f i Ο‰ * f j Ο‰) ΞΌ := by
intro i hi j hj
exact (hf i hi).integrable_mul (hf j hj)
calc
(∫ Ο‰, (βˆ‘ i ∈ s, f i Ο‰) ^ 2 βˆ‚ΞΌ) =
∫ Ο‰, βˆ‘ i ∈ s, βˆ‘ j ∈ s, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ := by
congr 1
funext Ο‰
rw [pow_two, Finset.sum_mul_sum]
_ = βˆ‘ i ∈ s, βˆ‘ j ∈ s, ∫ Ο‰, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ := by
rw [integral_finsetSum s (fun i hi => integrable_finsetSum s (hp i hi))]
apply Finset.sum_congr rfl
intro i hi
exact integral_finsetSum s (hp i hi)
theorem integral_sum_sq_le_card_mul_of_pair_rows
{ΞΉ Ξ© : Type*} [MeasurableSpace Ξ©] {ΞΌ : Measure Ξ©}
(s : Finset ΞΉ) (f : ΞΉ β†’ Ξ© β†’ ℝ) {a : ΞΉ β†’ ΞΉ β†’ ℝ} {K : ℝ}
(hf : βˆ€ i ∈ s, MemLp (f i) 2 ΞΌ)
(hpair : βˆ€ i ∈ s, βˆ€ j ∈ s, (∫ Ο‰, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ) ≀ a i j)
(hrow : βˆ€ i ∈ s, βˆ‘ j ∈ s, a i j ≀ K) :
(∫ Ο‰, (βˆ‘ i ∈ s, f i Ο‰) ^ 2 βˆ‚ΞΌ) ≀ (s.card : ℝ) * K := by
rw [integral_sum_sq_eq_sum_pair_moments s f hf]
calc
βˆ‘ i ∈ s, βˆ‘ j ∈ s, ∫ Ο‰, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ
≀ βˆ‘ i ∈ s, βˆ‘ j ∈ s, a i j :=
Finset.sum_le_sum fun i hi => Finset.sum_le_sum fun j hj => hpair i hi j hj
_ ≀ βˆ‘ _i ∈ s, K := Finset.sum_le_sum hrow
_ = (s.card : ℝ) * K := by simp
theorem integral_sum_sq_le_card_mul_tsum_kernel
{Ξ© : Type*} [MeasurableSpace Ξ©] {ΞΌ : Measure Ξ©}
(s : Finset β„€) (f : β„€ β†’ Ξ© β†’ ℝ) {c : β„€ β†’ ℝ} {S : ℝ}
(hc : βˆ€ k, 0 ≀ c k) (hsum : Summable c) (hS : 0 ≀ S)
(hf : βˆ€ i ∈ s, MemLp (f i) 2 ΞΌ)
(hpair : βˆ€ i ∈ s, βˆ€ j ∈ s,
(∫ Ο‰, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ) ≀ S * c (j - i)) :
(∫ Ο‰, (βˆ‘ i ∈ s, f i Ο‰) ^ 2 βˆ‚ΞΌ) ≀
(s.card : ℝ) * (S * βˆ‘' k, c k) := by
apply integral_sum_sq_le_card_mul_of_pair_rows s f hf hpair
intro i _
rw [← Finset.mul_sum]
exact mul_le_mul_of_nonneg_left (sum_int_translate_le_tsum s i hc hsum) hS
theorem integral_sum_sq_le_geometric_pair_bound
{Ξ© : Type*} [MeasurableSpace Ξ©] {ΞΌ : Measure Ξ©}
(s : Finset β„€) (f : β„€ β†’ Ξ© β†’ ℝ) {q S : ℝ}
(hq0 : 0 ≀ q) (hq1 : q < 1) (hS : 0 ≀ S)
(hf : βˆ€ i ∈ s, MemLp (f i) 2 ΞΌ)
(hpair : βˆ€ i ∈ s, βˆ€ j ∈ s,
|∫ Ο‰, f i Ο‰ * f j Ο‰ βˆ‚ΞΌ| ≀ S * pathCorrelationKernel q (j - i)) :
(∫ Ο‰, (βˆ‘ i ∈ s, f i Ο‰) ^ 2 βˆ‚ΞΌ) ≀
(s.card : ℝ) * S * (2 / (1 - q) ^ 2 - 1) := by
have h := integral_sum_sq_le_card_mul_tsum_kernel s f
(pathCorrelationKernel_nonneg hq0) (summable_pathCorrelationKernel hq0 hq1)
hS hf (fun i hi j hj => (le_abs_self _).trans (hpair i hi j hj))
simpa [tsum_pathCorrelationKernel hq0 hq1, mul_assoc] using h
end Problem367
end
end OAI

Xet Storage Details

Size:
8.6 kB
Β·
Xet hash:
ffd46792391c2d73258a60816f440b6e446071b3086cd07255a0cdcb3f8b3a74

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.