Buckets:
| import Mathlib | |
| import OAI.Analysis.HardSphere.Bridges.PartialIndex | |
| import OAI.Analysis.HardSphere.Operators.Regularize | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| open MeasureTheory Filter Set ProbabilityTheory | |
| open scoped ENNReal NNReal Topology BigOperators | |
| namespace HardSphere.Wiener | |
| lemma norm_tent_combination_le (n : ℕ) (c : Fin (2^n) → ℝ) | |
| (hc : ∀ k, |c k| ≤ 1) : ‖∑ k, c k • tentMap n k‖ ≤ 1 := by | |
| apply (ContinuousMap.norm_le _ (by norm_num)).mpr | |
| intro t | |
| simp only [ContinuousMap.sum_apply, ContinuousMap.smul_apply, smul_eq_mul, Real.norm_eq_abs] | |
| calc | |
| |∑ k, c k * tentMap n k t| ≤ ∑ k, |c k * tentMap n k t| := Finset.abs_sum_le_sum_abs _ _ | |
| _ ≤ ∑ k, tent n k t := by | |
| apply Finset.sum_le_sum | |
| intro k _ | |
| change |c k * tent n k t|≤_ | |
| rw [abs_mul, abs_of_nonneg (tent_nonneg n k t)] | |
| simpa only [one_mul] using mul_le_mul_of_nonneg_right (hc k) (tent_nonneg n k t) | |
| _ ≤ 1 := sum_tent_le_one n t | |
| lemma dual_tent_sum_abs_le (L : C(Time,ℝ) →L[ℝ] ℝ) (n : ℕ) : | |
| ∑ k, |L (tentMap n k)| ≤ ‖L‖ := by | |
| classical | |
| let c : Fin (2^n) → ℝ := fun k ↦ if 0 ≤ L (tentMap n k) then 1 else -1 | |
| have hc : ∀ k, |c k|≤1 := by intro k; simp only [c]; split <;> norm_num | |
| have he : L (∑ k, c k • tentMap n k) = ∑ k, |L (tentMap n k)| := by | |
| rw [map_sum] | |
| apply Finset.sum_congr rfl | |
| intro k _ | |
| rw [map_smul] | |
| simp only [smul_eq_mul,c] | |
| split_ifs with h | |
| · simp [abs_of_nonneg h] | |
| · simp [abs_of_neg (lt_of_not_ge h)] | |
| calc | |
| ∑ k, |L (tentMap n k)| ≤ |L (∑ k, c k • tentMap n k)| := by rw [he]; exact le_abs_self _ | |
| _ ≤ ‖L‖ * ‖∑ k, c k • tentMap n k‖ := L.le_opNorm _ | |
| _ ≤ ‖L‖ * 1 := mul_le_mul_of_nonneg_left (norm_tent_combination_le n c hc) (L.opNorm_nonneg) | |
| _ = ‖L‖ := mul_one _ | |
| lemma dual_tent_sum_sq_le (L : C(Time,ℝ) →L[ℝ] ℝ) (n : ℕ) : | |
| ∑ k, L (tentMap n k)^2 ≤ ‖L‖^2 := by | |
| have h := dual_tent_sum_abs_le L n | |
| calc | |
| ∑ k, L (tentMap n k)^2 = ∑ k, |L (tentMap n k)|^2 := by simp | |
| _ ≤ (∑ k, |L (tentMap n k)|)^2 := by | |
| rw [sq, Finset.sum_mul_sum] | |
| apply Finset.sum_le_sum | |
| intro k _ | |
| rw [sq] | |
| exact Finset.single_le_sum (f := fun j ↦ |L (tentMap n k)| * |L (tentMap n j)|) | |
| (fun j _ ↦ mul_nonneg (abs_nonneg _) (abs_nonneg _)) (Finset.mem_univ k) | |
| _ ≤ ‖L‖^2 := pow_le_pow_left₀ (Finset.sum_nonneg (fun _ _ ↦ abs_nonneg _)) h 2 | |
| lemma amplitude_sq (n : ℕ) : amplitude n ^ 2 = (1/4:ℝ)*(1/2:ℝ)^n := by | |
| simp only [amplitude,mul_pow] | |
| rw [←pow_mul,Nat.mul_comm n 2,pow_mul,inv_pow,Real.sq_sqrt (by norm_num : (0:ℝ)≤2)] | |
| norm_num | |
| lemma dual_variance_summable (L : C(Time,ℝ) →L[ℝ] ℝ) : | |
| Summable (fun n ↦ amplitude n^2 * ∑ k, L (tentMap n k)^2) := by | |
| apply Summable.of_nonneg_of_le (fun n ↦ by positivity) | |
| (fun n ↦ mul_le_mul_of_nonneg_left (dual_tent_sum_sq_le L n) (sq_nonneg _)) | |
| simp_rw [amplitude_sq] | |
| simpa only [mul_assoc, mul_left_comm, mul_comm] using | |
| (summable_geometric_of_lt_one (by norm_num : (0:ℝ)≤1/2) (by norm_num : (1/2:ℝ)<1)).mul_left ((1/4:ℝ)*‖L‖^2) | |
| def dualCoefficient (L : C(Time,ℝ) →L[ℝ] ℝ) (n : ℕ) : PartialIndex n → ℝ | |
| | .inl _ => L linearPath | |
| | .inr ⟨m,k⟩ => amplitude m * L (tentMap m k) | |
| lemma dual_partialPath_expansion (L : C(Time,ℝ) →L[ℝ] ℝ) (n : ℕ) (ω : Noise) : | |
| L (partialPath n ω) = ∑ i, dualCoefficient L n i * ω (partialEmbed n i) := by | |
| simp only [Fintype.sum_sum_type,Fintype.sum_sigma,dualCoefficient,partialEmbed, | |
| Fintype.sum_unique,partialPath,map_add,map_smul,map_sum,level,smul_eq_mul] | |
| rw [Fin.sum_univ_eq_sum_range (fun m ↦ ∑ k : Fin (2^m), amplitude m * L (tentMap m k) * ω (.inr ⟨m,k⟩)) n] | |
| congr 1 | |
| · change ω (.inl ()) * L linearPath = L linearPath * ω (.inl ()) | |
| ring | |
| · apply Finset.sum_congr rfl | |
| intro m _ | |
| simp only [Finset.mul_sum] | |
| apply Finset.sum_congr rfl | |
| intro k _ | |
| ring | |
| lemma dual_partial_variance (L : C(Time,ℝ) →L[ℝ] ℝ) (n : ℕ) : | |
| (∑ i : PartialIndex n, dualCoefficient L n i ^ 2) = | |
| L linearPath ^ 2 + ∑ m ∈ Finset.range n, amplitude m^2 * ∑ k, L (tentMap m k)^2 := by | |
| simp only [Fintype.sum_sum_type,Fintype.sum_sigma,dualCoefficient,Fintype.sum_unique,mul_pow,←Finset.mul_sum] | |
| rw [Fin.sum_univ_eq_sum_range (fun m ↦ amplitude m^2 * ∑ k, L (tentMap m k)^2) n] | |
| lemma dual_path_law (L : C(Time,ℝ) →L[ℝ] ℝ) : | |
| HasLaw (fun ω ↦ L (path ω)) | |
| (gaussianReal 0 (Real.toNNReal (L linearPath^2 + ∑' n, amplitude n^2 * ∑ k, L (tentMap n k)^2))) law := by | |
| have hv : Tendsto (fun n ↦ Real.toNNReal (∑ i : PartialIndex n, dualCoefficient L n i ^2)) atTop | |
| (𝓝 (Real.toNNReal (L linearPath^2 + ∑' n, amplitude n^2 * ∑ k, L (tentMap n k)^2))) := by | |
| simp_rw [dual_partial_variance] | |
| exact continuous_real_toNNReal.tendsto _ |>.comp | |
| (tendsto_const_nhds.add ((dual_variance_summable L).hasSum.tendsto_sum_nat)) | |
| apply hasLaw_gaussian_of_ae_tendsto (X := fun n ω ↦ L (partialPath n ω)) (m := fun _ ↦ 0) | |
| (v := fun n ↦ Real.toNNReal (∑ i : PartialIndex n, dualCoefficient L n i^2)) _ _ tendsto_const_nhds hv | |
| · intro n | |
| have h := finite_coordinate_law n (dualCoefficient L n) | |
| simp_rw [←dual_partialPath_expansion] at h | |
| convert h using 2 | |
| rw [Real.toNNReal_sum_of_nonneg (fun i _ ↦ sq_nonneg (dualCoefficient L n i))] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| exact Real.toNNReal_of_nonneg (sq_nonneg _) | |
| · filter_upwards [ae_partialPath_tendsto] with ω hω | |
| exact L.continuous.tendsto _ |>.comp hω | |
| instance wiener_isGaussian : IsGaussian wiener := by | |
| apply isGaussian_of_map_eq_gaussianReal | |
| intro L | |
| refine ⟨0,Real.toNNReal (L linearPath^2 + ∑' n, amplitude n^2 * ∑ k, L (tentMap n k)^2),?_⟩ | |
| rw [wiener,Measure.map_map L.continuous.measurable measurable_path] | |
| exact (dual_path_law L).map_eq | |
| theorem wiener_exists_integrable_exp_sq : | |
| ∃ c, 0<c ∧ Integrable (fun w : C(Time,ℝ) ↦ Real.exp (c*‖w‖^2)) wiener := | |
| IsGaussian.exists_integrable_exp_sq wiener | |
| theorem wiener_norm_gaussian_tail : | |
| ∃ (c : ℝ) (M : ℝ≥0∞), 0<c ∧ M<⊤ ∧ ∀ R : ℝ, 0≤R → | |
| wiener {w | R≤‖w‖} ≤ M * ENNReal.ofReal (Real.exp (-c*R^2)) := by | |
| obtain ⟨c,hc,hi⟩ := wiener_exists_integrable_exp_sq | |
| let M := ∫⁻ w : C(Time,ℝ), ENNReal.ofReal (Real.exp (c*‖w‖^2)) ∂wiener | |
| have hM : M<⊤ := by | |
| dsimp [M] | |
| rw [←ofReal_integral_eq_lintegral_ofReal hi (Eventually.of_forall (fun _ ↦ (Real.exp_pos _).le))] | |
| exact ENNReal.ofReal_lt_top | |
| refine ⟨c,M,hc,hM,?_⟩ | |
| intro R hR | |
| have hsub : {w : C(Time,ℝ) | R≤‖w‖} ⊆ | |
| {w | ENNReal.ofReal (Real.exp (c*R^2))≤ENNReal.ofReal (Real.exp (c*‖w‖^2))} := by | |
| intro w hw | |
| apply ENNReal.ofReal_le_ofReal | |
| exact Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hR hw 2) hc.le) | |
| apply (measure_mono hsub).trans | |
| have hm : Measurable (fun w : C(Time,ℝ) ↦ ENNReal.ofReal (Real.exp (c*‖w‖^2))) := by fun_prop | |
| have hh := meas_ge_le_lintegral_div (μ := wiener) hm.aemeasurable | |
| (ne_of_gt (ENNReal.ofReal_pos.mpr (Real.exp_pos (c*R^2)))) ENNReal.ofReal_ne_top | |
| apply hh.trans_eq | |
| change M / ENNReal.ofReal (Real.exp (c*R^2)) = M * ENNReal.ofReal (Real.exp (-c*R^2)) | |
| rw [div_eq_mul_inv,←ENNReal.ofReal_inv_of_pos (Real.exp_pos _),←Real.exp_neg] | |
| congr 3 | |
| ring | |
| end HardSphere.Wiener | |
| end | |
| end | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 7.58 kB
- Xet hash:
- 338565dfab8c7efb549217ff3feb7b639ba0911b12624c6414b605ba98700751
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.