Buckets:
| import Mathlib | |
| import OAI.Probability.SKGap.Localization.ResidualRecipe | |
| import OAI.Probability.SKGap.Localization.SemicircleDensity | |
| namespace OAI | |
| section | |
| open scoped BigOperators | |
| open scoped BigOperators | |
| open scoped BigOperators | |
| open scoped BigOperators | |
| open scoped BigOperators | |
| open scoped BigOperators NNReal | |
| open MeasureTheory ProbabilityTheory | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators NNReal | |
| open MeasureTheory ProbabilityTheory | |
| open scoped BigOperators NNReal ENNReal | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators NNReal ENNReal | |
| open MeasureTheory ProbabilityTheory | |
| open scoped BigOperators Matrix Matrix.Norms.Elementwise | |
| open scoped BigOperators | |
| open MeasureTheory ProbabilityTheory | |
| open scoped BigOperators Matrix Matrix.Norms.Elementwise | |
| open scoped BigOperators | |
| open scoped BigOperators NNReal ENNReal | |
| open MeasureTheory Metric Set | |
| open scoped BigOperators NNReal ENNReal | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators NNReal ENNReal Matrix.Norms.L2Operator | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators Matrix.Norms.L2Operator | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped BigOperators Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators ENNReal NNReal | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators NNReal ENNReal Matrix | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators ENNReal NNReal | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators NNReal ENNReal | |
| open scoped BigOperators | |
| open MeasureTheory ProbabilityTheory | |
| open scoped BigOperators Matrix Matrix.Norms.Elementwise NNReal ENNReal | |
| open scoped BigOperators | |
| open Filter Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators NNReal ENNReal Topology | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped BigOperators NNReal ENNReal Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal Topology | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Set Matrix | |
| open scoped BigOperators NNReal ENNReal Matrix.Norms.L2Operator | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open MeasureTheory ProbabilityTheory Filter Matrix | |
| open scoped NNReal ENNReal BigOperators Topology Matrix Matrix.Norms.Elementwise | |
| open Filter MeasureTheory ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open Filter MeasureTheory ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| open MeasureTheory Filter ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter ProbabilityTheory ContinuousLinearMap | |
| open scoped Topology NNReal ENNReal | |
| open Filter MeasureTheory ProbabilityTheory | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory Filter | |
| open scoped BigOperators Topology | |
| open MeasureTheory Filter | |
| open scoped BigOperators Topology | |
| open MeasureTheory Filter | |
| open scoped BigOperators Topology | |
| open MeasureTheory Filter | |
| open scoped BigOperators Topology | |
| open MeasureTheory Filter | |
| open scoped BigOperators Topology | |
| open Filter Set Metric | |
| open scoped Topology RealInnerProductSpace | |
| open scoped BigOperators | |
| open ContinuousLinearMap | |
| open scoped BigOperators | |
| open ContinuousLinearMap | |
| open scoped Topology Interval | |
| open MeasureTheory | |
| open MeasureTheory | |
| open scoped BigOperators Topology Interval | |
| open MeasureTheory | |
| open scoped BigOperators Topology Interval | |
| open scoped Topology | |
| open MeasureTheory | |
| open scoped BigOperators Topology Interval | |
| open scoped BigOperators Topology | |
| open MeasureTheory | |
| open scoped BigOperators Topology Interval RealInnerProductSpace | |
| open MeasureTheory Filter | |
| open scoped BigOperators Topology Interval | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| namespace SKGapCutoff | |
| noncomputable def spinChebyshev (k : ℕ) : Polynomial ℝ := | |
| Polynomial.Chebyshev.S ℝ (k:ℤ) | |
| lemma spinChebyshev_zero : spinChebyshev 0=1 := by simp [spinChebyshev] | |
| lemma spinChebyshev_one : spinChebyshev 1=Polynomial.X := by simp [spinChebyshev] | |
| lemma spinChebyshev_recurrence (k : ℕ) : | |
| spinChebyshev (k+2)=Polynomial.X*spinChebyshev (k+1)-spinChebyshev k := by | |
| simp [spinChebyshev, Polynomial.Chebyshev.S_add_two] | |
| lemma spinChebyshev_cos (k : ℕ) (θ : ℝ) : | |
| (spinChebyshev k).eval (2*Real.cos θ)*Real.sin θ=Real.sin (((k:ℝ)+1)*θ) := by | |
| have he := congrArg (fun p : Polynomial ℝ => p.eval (Real.cos θ)) | |
| (Polynomial.Chebyshev.S_comp_two_mul_X ℝ (k:ℤ)) | |
| simp only [Polynomial.eval_comp,Polynomial.eval_mul,Polynomial.eval_ofNat, | |
| Polynomial.eval_X] at he | |
| rw [spinChebyshev,he,Polynomial.Chebyshev.U_real_cos] | |
| simp | |
| lemma abs_sin_nat_mul_le (k : ℕ) (θ : ℝ) : | |
| |Real.sin ((k:ℝ)*θ)| ≤ (k:ℝ)*|Real.sin θ| := by | |
| induction k with | |
| | zero => simp | |
| | succ k ih => | |
| simp only [Nat.cast_add,Nat.cast_one,add_mul,one_mul,Real.sin_add] | |
| calc | |
| _ ≤ |Real.sin ((k:ℝ)*θ)*Real.cos θ|+|Real.cos ((k:ℝ)*θ)*Real.sin θ| := abs_add_le _ _ | |
| _ ≤ |Real.sin ((k:ℝ)*θ)|+|Real.sin θ| := by | |
| rw [abs_mul,abs_mul] | |
| calc | |
| _ ≤ |Real.sin ((k:ℝ)*θ)| * 1+1 * |Real.sin θ| := | |
| add_le_add (mul_le_mul_of_nonneg_left (Real.abs_cos_le_one θ) (abs_nonneg _)) | |
| (mul_le_mul_of_nonneg_right (Real.abs_cos_le_one _) (abs_nonneg _)) | |
| _ = _ := by ring | |
| _ ≤ (k:ℝ)*|Real.sin θ|+|Real.sin θ| := by gcongr | |
| lemma spinChebyshev_abs_le (k : ℕ) {u : ℝ} (hu : u ∈ Set.Icc (-2:ℝ) 2) : | |
| |(spinChebyshev k).eval u| ≤ (k:ℝ)+1 := by | |
| have hi : Set.Ioo (-2:ℝ) 2 ⊆ {v : ℝ | |(spinChebyshev k).eval v| ≤ (k:ℝ)+1} := by | |
| intro v hv | |
| have hlo : -1 < v/2 := by linarith [hv.1] | |
| have hhi : v/2 < 1 := by linarith [hv.2] | |
| have hs : 0 < Real.sin (Real.arccos (v/2)) := | |
| Real.sin_pos_of_pos_of_lt_pi (Real.arccos_pos.mpr hhi) (Real.arccos_lt_pi.mpr hlo) | |
| have he := spinChebyshev_cos k (Real.arccos (v/2)) | |
| rw [Real.cos_arccos hlo.le hhi.le] at he | |
| have hc : 2*(v/2)=v := by ring | |
| rw [hc] at he | |
| have hh := abs_sin_nat_mul_le (k+1) (Real.arccos (v/2)) | |
| simp only [Nat.cast_add,Nat.cast_one,← he,abs_mul,abs_of_pos hs] at hh | |
| exact le_of_mul_le_mul_right hh hs | |
| have hc := closure_mono hi | |
| rw [closure_Ioo (by norm_num : (-2:ℝ) ≠ 2)] at hc | |
| have hclosed : IsClosed {v : ℝ | |(spinChebyshev k).eval v| ≤ (k:ℝ)+1} := | |
| isClosed_le (spinChebyshev k).continuous.abs continuous_const | |
| rw [hclosed.closure_eq] at hc | |
| exact hc hu | |
| lemma spinChebyshev_series_majorant {β : ℝ} (hβ : |β|<1) : | |
| Summable (fun k : ℕ => ((k:ℝ)+1)*|β|^k) := by | |
| have hh : ‖|β|‖<1 := by simpa using hβ | |
| have hs := (hasSum_coe_mul_geometric_of_norm_lt_one hh).summable.add | |
| (summable_geometric_of_norm_lt_one hh) | |
| simpa only [add_mul,one_mul] using hs | |
| lemma spinChebyshev_term_bound (β : ℝ) (k : ℕ) {u : ℝ} | |
| (hu : u ∈ Set.Icc (-2:ℝ) 2) : | |
| ‖β^k*(spinChebyshev k).eval u‖ ≤ ((k:ℝ)+1)*|β|^k := by | |
| rw [Real.norm_eq_abs,abs_mul,abs_pow,mul_comm] | |
| exact mul_le_mul_of_nonneg_right (spinChebyshev_abs_le k hu) (pow_nonneg (abs_nonneg β) _) | |
| lemma spinChebyshev_series_summable {β u : ℝ} (hβ : |β|<1) | |
| (hu : u ∈ Set.Icc (-2:ℝ) 2) : | |
| Summable (fun k : ℕ => β^k*(spinChebyshev k).eval u) := by | |
| exact Summable.of_norm_bounded (spinChebyshev_series_majorant hβ) | |
| (fun k => spinChebyshev_term_bound β k hu) | |
| lemma spinChebyshev_series_uniform {β : ℝ} (hβ : |β|<1) : | |
| TendstoUniformlyOn | |
| (fun N u => ∑ k ∈ Finset.range N, β^k*(spinChebyshev k).eval u) | |
| (fun u => ∑' k : ℕ, β^k*(spinChebyshev k).eval u) | |
| atTop (Set.Icc (-2:ℝ) 2) := by | |
| exact tendstoUniformlyOn_tsum_nat (spinChebyshev_series_majorant hβ) | |
| (fun k _ hu => spinChebyshev_term_bound β k hu) | |
| lemma spinChebyshev_generating_series {β u : ℝ} (hβ : |β|<1) | |
| (hu : u ∈ Set.Icc (-2:ℝ) 2) : | |
| (∑' k : ℕ, β^k*(spinChebyshev k).eval u) = (1-β*u+β^2)⁻¹ := by | |
| let f : ℕ → ℝ := fun k => β^k*(spinChebyshev k).eval u | |
| have hs : Summable f := spinChebyshev_series_summable hβ hu | |
| have hs1 : Summable (fun k => f (k+1)) := (summable_nat_add_iff 1).mpr hs | |
| have hrec (k : ℕ) : f (k+2)=β*u*f (k+1)-β^2*f k := by | |
| simp only [f,spinChebyshev_recurrence,Polynomial.eval_sub,Polynomial.eval_mul, | |
| Polynomial.eval_X,pow_add,pow_one] | |
| ring | |
| have ht : (∑' k, f (k+2))=β*u*(∑' k, f (k+1))-β^2*(∑' k, f k) := by | |
| simp_rw [hrec] | |
| rw [(hs1.mul_left (β*u)).tsum_sub (hs.mul_left (β^2)),tsum_mul_left,tsum_mul_left] | |
| have h0 := hs.sum_add_tsum_nat_add 1 | |
| have h2 := hs.sum_add_tsum_nat_add 2 | |
| have hf0 : f 0=1 := by simp [f,spinChebyshev_zero] | |
| have hf1 : f 1=β*u := by simp [f,spinChebyshev_one] | |
| simp only [Finset.sum_range_succ,Finset.sum_range_zero,hf0,hf1,zero_add] at h0 h2 | |
| have hm : (1-β*u+β^2)*(∑' k, f k)=1 := by | |
| linear_combination -h2 + ht + (β*u)*h0 | |
| have hn : 1-β*u+β^2 ≠ 0 := by | |
| intro hz | |
| rw [hz,zero_mul] at hm | |
| norm_num at hm | |
| apply (mul_left_cancel₀ hn) | |
| change (1-β*u+β^2)*(∑' k, f k)=(1-β*u+β^2)*(1-β*u+β^2)⁻¹ | |
| rw [hm,mul_inv_cancel₀ hn] | |
| lemma semicircle_integral (f : ℝ → ℝ) : | |
| (∫ u, f u ∂semicircleMeasure)=∫ u in (-2:ℝ)..2, semicircleDensity u*f u := by | |
| have hn (u : ℝ) : 0 ≤ semicircleDensity u := | |
| div_nonneg (Real.sqrt_nonneg _) (mul_pos (by norm_num) Real.pi_pos).le | |
| rw [semicircleMeasure,integral_withDensity_eq_integral_toReal_smul] | |
| · simp only [ENNReal.toReal_ofReal (hn _),smul_eq_mul] | |
| rw [← setIntegral_eq_integral_of_forall_compl_eq_zero | |
| (s := Set.Icc (-2:ℝ) 2) (fun u hu => by rw [semicircleDensity_eq_zero_outside u hu,zero_mul])] | |
| rw [integral_Icc_eq_integral_Ioc,intervalIntegral.integral_of_le (by norm_num : (-2:ℝ) ≤ 2)] | |
| · exact ENNReal.measurable_ofReal.comp semicircleDensity_continuous.measurable | |
| · exact Eventually.of_forall (fun _ => ENNReal.ofReal_lt_top) | |
| lemma semicircleDensity_two_cos {θ : ℝ} (hθ : θ ∈ Set.Icc 0 Real.pi) : | |
| semicircleDensity (2*Real.cos θ)=Real.sin θ/Real.pi := by | |
| have he : 4-(2*Real.cos θ)^2=(2*Real.sin θ)^2 := by | |
| nlinarith only [Real.sin_sq_add_cos_sq θ] | |
| rw [semicircleDensity,he,Real.sqrt_sq (mul_nonneg (by norm_num) | |
| (Real.sin_nonneg_of_nonneg_of_le_pi hθ.1 hθ.2))] | |
| ring | |
| lemma semicircle_integral_angular {f : ℝ → ℝ} (hf : Continuous f) : | |
| (∫ u, f u ∂semicircleMeasure)= | |
| (2/Real.pi)*∫ θ in 0..Real.pi, f (2*Real.cos θ)*(Real.sin θ)^2 := by | |
| have hh := intervalIntegral.integral_comp_mul_deriv | |
| (a := 0) (b := Real.pi) (f := fun θ => 2*Real.cos θ) | |
| (f' := fun θ => -2*Real.sin θ) | |
| (g := fun u => semicircleDensity u*f u) | |
| (fun θ _ => by simpa only [mul_neg,neg_mul] using (Real.hasDerivAt_cos θ).const_mul 2) | |
| (by fun_prop) (semicircleDensity_continuous.mul hf) | |
| have he : (∫ θ in 0..Real.pi, | |
| (fun u => semicircleDensity u*f u) (2*Real.cos θ)*(-2*Real.sin θ))= | |
| (-2/Real.pi)*(∫ θ in 0..Real.pi, f (2*Real.cos θ)*(Real.sin θ)^2) := by | |
| rw [← intervalIntegral.integral_const_mul] | |
| apply intervalIntegral.integral_congr | |
| intro θ hθ | |
| rw [Set.uIcc_of_le Real.pi_pos.le] at hθ | |
| change semicircleDensity (2*Real.cos θ)*f (2*Real.cos θ)*(-2*Real.sin θ)=_ | |
| rw [semicircleDensity_two_cos hθ] | |
| ring | |
| change (∫ θ in 0..Real.pi, | |
| (fun u => semicircleDensity u*f u) (2*Real.cos θ)*(-2*Real.sin θ))=_ at hh | |
| rw [he] at hh | |
| simp only [Real.cos_zero,Real.cos_pi,mul_one,mul_neg_one] at hh | |
| rw [intervalIntegral.integral_symm (a := (-2:ℝ)) (b := 2)] at hh | |
| rw [semicircle_integral] | |
| linear_combination hh | |
| lemma integral_cos_integer_frequency (z : ℤ) (hz : z ≠ 0) : | |
| (∫ θ in 0..Real.pi, Real.cos ((z:ℝ)*θ))=0 := by | |
| have hh := Polynomial.Chebyshev.integral_eval_T_real_measureT_of_ne_zero hz | |
| rw [Polynomial.Chebyshev.integral_measureT_eq_integral_cos] at hh | |
| simpa only [Polynomial.Chebyshev.T_real_cos] using hh | |
| lemma integral_sin_nat_frequencies (k l : ℕ) : | |
| (∫ θ in 0..Real.pi, Real.sin (((k:ℝ)+1)*θ)*Real.sin (((l:ℝ)+1)*θ))= | |
| if k=l then Real.pi/2 else 0 := by | |
| have he (θ : ℝ) : | |
| Real.sin (((k:ℝ)+1)*θ)*Real.sin (((l:ℝ)+1)*θ)= | |
| (Real.cos (((k:ℝ)-(l:ℝ))*θ)-Real.cos (((k:ℝ)+(l:ℝ)+2)*θ))/2 := by | |
| have hh := Real.two_mul_sin_mul_sin (((k:ℝ)+1)*θ) (((l:ℝ)+1)*θ) | |
| have hs : ((k:ℝ)+1)*θ-((l:ℝ)+1)*θ=((k:ℝ)-(l:ℝ))*θ := by ring | |
| have ha : ((k:ℝ)+1)*θ+((l:ℝ)+1)*θ=((k:ℝ)+(l:ℝ)+2)*θ := by ring | |
| rw [hs,ha] at hh | |
| linear_combination hh / 2 | |
| have h1 : (∫ θ in 0..Real.pi, Real.cos (((k:ℝ)-(l:ℝ))*θ))= | |
| if k=l then Real.pi else 0 := by | |
| by_cases h : k=l | |
| · subst l | |
| simp | |
| · rw [ite_eq_right h] | |
| have hz : (k:ℤ)-(l:ℤ) ≠ 0 := sub_ne_zero.mpr (by exact_mod_cast h) | |
| simpa only [Int.cast_sub,Int.cast_natCast] using integral_cos_integer_frequency _ hz | |
| have h2 : (∫ θ in 0..Real.pi, Real.cos (((k:ℝ)+(l:ℝ)+2)*θ))=0 := by | |
| have hz : (k:ℤ)+(l:ℤ)+2 ≠ 0 := by omega | |
| simpa only [Int.cast_add,Int.cast_natCast,Int.cast_ofNat] using integral_cos_integer_frequency _ hz | |
| simp_rw [he] | |
| rw [intervalIntegral.integral_div,intervalIntegral.integral_sub | |
| (by apply Continuous.intervalIntegrable; fun_prop) | |
| (by apply Continuous.intervalIntegrable; fun_prop),h1,h2,sub_zero] | |
| split_ifs <;> simp | |
| theorem spinChebyshev_orthonormal (k l : ℕ) : | |
| (∫ u, (spinChebyshev k).eval u*(spinChebyshev l).eval u ∂semicircleMeasure)= | |
| if k=l then 1 else 0 := by | |
| rw [semicircle_integral_angular (f := fun u => (spinChebyshev k).eval u*(spinChebyshev l).eval u) | |
| (by fun_prop)] | |
| have he (θ : ℝ) : | |
| ((spinChebyshev k).eval (2*Real.cos θ)*(spinChebyshev l).eval (2*Real.cos θ))* | |
| (Real.sin θ)^2 = | |
| Real.sin (((k:ℝ)+1)*θ)*Real.sin (((l:ℝ)+1)*θ) := by | |
| rw [← spinChebyshev_cos,← spinChebyshev_cos] | |
| ring | |
| simp_rw [he] | |
| rw [integral_sin_nat_frequencies] | |
| split_ifs | |
| · field_simp | |
| · simp | |
| lemma semicircle_ae_mem : ∀ᵐ u ∂semicircleMeasure, u ∈ Set.Icc (-2:ℝ) 2 := by | |
| apply (ae_withDensity_iff (ENNReal.measurable_ofReal.comp semicircleDensity_continuous.measurable)).mpr | |
| exact Eventually.of_forall (fun u hu => by | |
| by_contra h | |
| exact hu (by change ENNReal.ofReal (semicircleDensity u) = 0 | |
| rw [semicircleDensity_eq_zero_outside u h,ENNReal.ofReal_zero])) | |
| theorem spinCovariance_density_moment {β : ℝ} (hβ : |β|<1) (m : ℕ) : | |
| (∫ u, (spinChebyshev m).eval u/(1-β*u+β^2) ∂semicircleMeasure)=β^m := by | |
| let F : ℕ → ℝ → ℝ := fun k u => | |
| (spinChebyshev m).eval u*(β^k*(spinChebyshev k).eval u) | |
| have hm (k : ℕ) : AEStronglyMeasurable (F k) semicircleMeasure := by | |
| apply Continuous.aestronglyMeasurable | |
| dsimp [F] | |
| fun_prop | |
| have hb (k : ℕ) : ∀ᵐ u ∂semicircleMeasure, | |
| ‖F k u‖ ≤ ((m:ℝ)+1)*(((k:ℝ)+1)*|β|^k) := by | |
| filter_upwards [semicircle_ae_mem] with u hu | |
| dsimp [F] | |
| rw [abs_mul] | |
| exact mul_le_mul (spinChebyshev_abs_le m hu) (spinChebyshev_term_bound β k hu) | |
| (abs_nonneg _) (by positivity) | |
| have hs := (spinChebyshev_series_majorant hβ).mul_left ((m:ℝ)+1) | |
| have hl : ∀ᵐ u ∂semicircleMeasure, | |
| HasSum (fun k => F k u) ((spinChebyshev m).eval u/(1-β*u+β^2)) := by | |
| filter_upwards [semicircle_ae_mem] with u hu | |
| have hh := (spinChebyshev_series_summable hβ hu).hasSum.mul_left ((spinChebyshev m).eval u) | |
| rw [spinChebyshev_generating_series hβ hu] at hh | |
| exact hh | |
| have hh := hasSum_integral_of_dominated_convergence | |
| (μ := semicircleMeasure) (F := F) | |
| (fun k _ => ((m:ℝ)+1)*(((k:ℝ)+1)*|β|^k)) hm hb | |
| (Eventually.of_forall fun _ => hs) (integrable_const _) hl | |
| have hi (k : ℕ) : (∫ u, F k u ∂semicircleMeasure)=if m=k then β^k else 0 := by | |
| have he (u : ℝ) : F k u=β^k*((spinChebyshev m).eval u*(spinChebyshev k).eval u) := by | |
| dsimp [F] | |
| ring | |
| simp_rw [he] | |
| rw [integral_const_mul,spinChebyshev_orthonormal] | |
| split_ifs <;> simp | |
| rw [← hh.tsum_eq] | |
| simp_rw [hi] | |
| simp | |
| lemma spinChebyshev_degree (k : ℕ) : (spinChebyshev k).degree=k := by | |
| induction k using Nat.twoStepInduction with | |
| | zero => simp [spinChebyshev_zero] | |
| | one => simp [spinChebyshev_one] | |
| | more k ih₀ ih₁ => | |
| have hd : (Polynomial.X*spinChebyshev (k+1)).degree=↑(k+2) := by | |
| rw [mul_comm,Polynomial.degree_mul_X,ih₁] | |
| norm_cast | |
| rw [spinChebyshev_recurrence,Polynomial.degree_sub_eq_left_of_degree_lt] | |
| · exact hd | |
| · rw [ih₀,hd] | |
| norm_cast | |
| omega | |
| lemma spinChebyshev_leadingCoeff (k : ℕ) : (spinChebyshev k).leadingCoeff=1 := by | |
| induction k using Nat.twoStepInduction with | |
| | zero => simp [spinChebyshev_zero] | |
| | one => simp [spinChebyshev_one] | |
| | more k _ ih => | |
| rw [spinChebyshev_recurrence,Polynomial.leadingCoeff_sub_of_degree_lt] | |
| · rw [Polynomial.leadingCoeff_mul,Polynomial.leadingCoeff_X,ih,one_mul] | |
| · rw [mul_comm,Polynomial.degree_mul_X,spinChebyshev_degree,spinChebyshev_degree] | |
| norm_cast | |
| omega | |
| lemma spinChebyshev_span : Submodule.span ℝ (Set.range spinChebyshev)=⊤ := by | |
| let S : Polynomial.Sequence ℝ := ⟨spinChebyshev,spinChebyshev_degree⟩ | |
| exact S.span (fun k => by | |
| change IsUnit (spinChebyshev k).leadingCoeff | |
| rw [spinChebyshev_leadingCoeff] | |
| exact isUnit_one) | |
| lemma integrable_of_continuousOn_semicircle_support {μ : Measure ℝ} [IsFiniteMeasure μ] | |
| (hμ : ∀ᵐ u ∂μ, u ∈ Set.Icc (-2:ℝ) 2) {f : ℝ → ℝ} | |
| (hf : ContinuousOn f (Set.Icc (-2:ℝ) 2)) : Integrable f μ := by | |
| have hi := hf.integrableOn_compact (μ := μ) isCompact_Icc | |
| rwa [IntegrableOn,Measure.restrict_eq_self_of_ae_mem hμ] at hi | |
| lemma integrable_spinCovariance_polynomial {β : ℝ} (hβ0 : 0 ≤ β) (hβ1 : β<1) | |
| (p : Polynomial ℝ) : Integrable (fun u => p.eval u/(1-β*u+β^2)) semicircleMeasure := by | |
| apply integrable_of_continuousOn_semicircle_support semicircle_ae_mem | |
| apply p.continuous.continuousOn.div (by fun_prop) | |
| exact fun u hu => ne_of_gt (spinCovariance_denominator_pos hβ0 hβ1 hu) | |
| theorem spinCovariance_polynomial_of_moments {β : ℝ} (hβ0 : 0 ≤ β) (hβ1 : β<1) | |
| {μ : Measure ℝ} [IsFiniteMeasure μ] | |
| (hμ : ∀ᵐ u ∂μ, u ∈ Set.Icc (-2:ℝ) 2) | |
| (hm : ∀ k : ℕ, (∫ u, (spinChebyshev k).eval u ∂μ)=β^k) (p : Polynomial ℝ) : | |
| (∫ u, p.eval u ∂μ)=(∫ u, p.eval u/(1-β*u+β^2) ∂semicircleMeasure) := by | |
| have hp : p ∈ Submodule.span ℝ (Set.range spinChebyshev) := by rw [spinChebyshev_span]; trivial | |
| have hi (p : Polynomial ℝ) : Integrable (fun u => p.eval u) μ := | |
| integrable_of_continuousOn_semicircle_support hμ p.continuous.continuousOn | |
| induction hp using Submodule.span_induction with | |
| | mem p hp => | |
| obtain ⟨k,rfl⟩ := hp | |
| rw [hm,spinCovariance_density_moment (by rwa [abs_of_nonneg hβ0])] | |
| | zero => simp | |
| | add p q _ _ hp hq => | |
| simp only [Polynomial.eval_add,add_div] | |
| rw [integral_add (hi p) (hi q), | |
| integral_add (integrable_spinCovariance_polynomial hβ0 hβ1 p) | |
| (integrable_spinCovariance_polynomial hβ0 hβ1 q),hp,hq] | |
| | smul c p _ hp => | |
| simp only [Polynomial.eval_smul,smul_eq_mul,mul_div_assoc, | |
| integral_const_mul,hp] | |
| end SKGapCutoff | |
| open MeasureTheory Filter | |
| open scoped Topology | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 22.8 kB
- Xet hash:
- 5f3c142375720cb6e3119092cc8813fd84537f174d8a18ab600e61ad4462058d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.