Exact Lean source
YoungPhysicalRoundingAnalysis
formalization/Cloning/YoungPhysicalRoundingAnalysis.lean
Source hash: c338154040095a525026e2eb62b1fa6d98bd131a1624884433bff74aed33ef08
Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.
The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.
Declarations in this module
theorem
Cloning.YoungRounding.affineDensity_comptheorem Cloning.YoungRounding.affineDensity_l1_tendsto_scaletheorem Cloning.YoungRounding.affineDensity_l1_tendstotheorem Cloning.YoungRounding.roundedDensity_l1_tendsto_of_pretheorem Cloning.YoungHyperplane.density_affinity_l1_boundtheorem Cloning.YoungHyperplane.density_affinity_tendsto1import Cloning.YoungPhysicalRoundingCoordinates
2import Cloning.HybridIntegralBounds
3import Cloning.ClassicalFidelity
4
5/-! Analytic transport and affinity bounds for the physical rounding limit. -/
6noncomputable section
7open scoped BigOperators Topology Classical
8open MeasureTheory Filter
9namespace Cloning.YoungRounding
10set_option backward.isDefEq.respectTransparency false
11set_option maxHeartbeats 1000000
12variable {ι : Type*} [Fintype ι]
13
14/-- Scalar affine transports compose with their exact density Jacobians. -/
15theorem affineDensity_comp (h k : ℝ) (hh : h ≠ 0) (hk : k ≠ 0)
16 (a b : ι → ℝ) (f : (ι → ℝ) → ℝ) :
17 affineDensity h a (affineDensity k b f) = affineDensity (h*k) (a + h • b) f := by
18 funext x
19 simp only [affineDensity, mul_pow, mul_inv_rev]
20 have harg : k⁻¹ • (h⁻¹ • (x-a)-b) = (h*k)⁻¹ • (x-(a+h • b)) := by
21 ext i
22 simp only [Pi.smul_apply, smul_eq_mul, Pi.sub_apply, Pi.add_apply]
23 field_simp
24 <;> ring
25 rw [harg]
26 ring
27
28/-- A fixed continuous density is L¹-continuous under positive scalar dilation. -/
29theorem affineDensity_l1_tendsto_scale (s : ℕ → ℝ) (hs : ∀ n, 0 < s n)
30 (s₀ : ℝ) (hs₀ : 0 < s₀) (hlim : Tendsto s atTop (𝓝 s₀))
31 (f : (ι → ℝ) → ℝ) (hf : Integrable f) (hf0 : ∀ x, 0 ≤ f x) (hfc : Continuous f) :
32 Tendsto (fun n ↦ ∫ x, |affineDensity (s n) 0 f x - affineDensity s₀ 0 f x|) atTop (𝓝 0) := by
33 apply YoungHyperplane.density_scheffe volume
34 (fun n ↦ affineDensity (s n) 0 f) (affineDensity s₀ 0 f)
35 (fun n ↦ integrable_affineDensity (s n) (hs n) 0 hf)
36 (integrable_affineDensity s₀ hs₀ 0 hf)
37 (fun n x ↦ mul_nonneg (inv_nonneg.mpr (pow_nonneg (hs n).le _)) (hf0 _))
38 (fun x ↦ mul_nonneg (inv_nonneg.mpr (pow_nonneg hs₀.le _)) (hf0 _))
39 · intro n
40 rw [integral_affineDensity (s n) (hs n), integral_affineDensity s₀ hs₀]
41 · apply ae_of_all
42 intro x
43 have harg : Tendsto (fun n ↦ (s n)⁻¹ • (x-(0 : ι → ℝ))) atTop
44 (𝓝 (s₀⁻¹ • (x-(0 : ι → ℝ)))) := (hlim.inv₀ hs₀.ne').smul tendsto_const_nhds
45 exact ((hlim.pow (Fintype.card ι)).inv₀ (pow_ne_zero _ hs₀.ne')).mul
46 (hfc.continuousAt.tendsto.comp harg)
47
48/-- Scalar dilation transports an actual L¹ density limit, even with moving scales. -/
49theorem affineDensity_l1_tendsto (s : ℕ → ℝ) (hs : ∀ n, 0 < s n)
50 (s₀ : ℝ) (hs₀ : 0 < s₀) (hlim : Tendsto s atTop (𝓝 s₀))
51 (f : ℕ → (ι → ℝ) → ℝ) (hf : ∀ n, Integrable (f n))
52 (g : (ι → ℝ) → ℝ) (hg : Integrable g) (hg0 : ∀ x, 0 ≤ g x) (hgc : Continuous g)
53 (hfg : Tendsto (fun n ↦ ∫ x, |f n x-g x|) atTop (𝓝 0)) :
54 Tendsto (fun n ↦ ∫ x, |affineDensity (s n) 0 (f n) x-affineDensity s₀ 0 g x|)
55 atTop (𝓝 0) := by
56 have hsc := affineDensity_l1_tendsto_scale s hs s₀ hs₀ hlim g hg hg0 hgc
57 have hadd := hfg.add hsc
58 simp only [add_zero] at hadd
59 apply squeeze_zero (fun n ↦ integral_nonneg (fun _ ↦ abs_nonneg _)) ?_ hadd
60 intro n
61 rw [← affineDensity_l1_isometry (s n) (hs n) 0 (f n) g]
62 have hfi := integrable_affineDensity (s n) (hs n) 0 (hf n)
63 have hgi := integrable_affineDensity (s n) (hs n) 0 hg
64 have hzi := integrable_affineDensity s₀ hs₀ 0 hg
65 erw [← integral_add (hfi.sub hgi).abs (hgi.sub hzi).abs]
66 apply integral_mono (hfi.sub hzi).abs ((hfi.sub hgi).abs.add (hgi.sub hzi).abs)
67 intro x
68 exact abs_sub_le _ _ _
69
70/-- The proved cell-average error upgrades any L¹ pre-rounding limit to the actual output. -/
71theorem roundedDensity_l1_tendsto_of_pre
72 (h γ : ℕ → ℝ) (a : ℕ → ι → ℝ) (p : ℕ → PMF (ι → ℤ))
73 (hh : ∀ n, 0 < h n) (hγ : ∀ n, 0 < γ n) (hlim : Tendsto h atTop (𝓝 0))
74 (g : (ι → ℝ) → ℝ) (hg : Integrable g) (hg0 : ∀ x, 0 ≤ g x) (hgc : Continuous g)
75 (hpre : Tendsto (fun n ↦ ∫ x, |preRoundedDensity (h n) (a n) (γ n) (p n) x-g x|)
76 atTop (𝓝 0)) :
77 Tendsto (fun n ↦ ∫ x, |roundedDensity (h n) (a n) (γ n) (p n) x-g x|)
78 atTop (𝓝 0) := by
79 apply Metric.tendsto_nhds.mpr
80 intro ε hε
81 have hsource := hpre.eventually (gt_mem_nhds (show 0 < ε/2 by positivity))
82 filter_upwards [hsource, scaledCellAverage_l1_tendsto_uniform_translation
83 hg hg0 hgc h hh hlim (ε/2) (by positivity)] with n hn hnav
84 rw [Real.dist_eq, sub_zero, abs_of_nonneg (integral_nonneg (fun _ ↦ abs_nonneg _))]
85 have hb := roundedDensity_l1_comparison (h n) (hh n) (a n) (γ n) (hγ n) (p n) hg
86 have ha := hnav (a n)
87 linarith
88
89end Cloning.YoungRounding
90
91namespace Cloning.YoungHyperplane
92variable {X : Type*} [MeasurableSpace X] (ν : Measure X)
93
94/-- Continuous-density counterpart of the discrete Hellinger perturbation bound. -/
95theorem density_affinity_l1_bound (f g r : X → ℝ)
96 (hf : Integrable f ν) (hg : Integrable g ν) (hr : Integrable r ν)
97 (hf0 : ∀ x, 0 ≤ f x) (hg0 : ∀ x, 0 ≤ g x) (hr0 : ∀ x, 0 ≤ r x)
98 (hrmass : (∫ x, r x ∂ν) = 1) :
99 |(∫ x, Real.sqrt (f x)*Real.sqrt (r x) ∂ν) -
100 ∫ x, Real.sqrt (g x)*Real.sqrt (r x) ∂ν| ≤
101 Real.sqrt (∫ x, |f x-g x| ∂ν) := by
102 have hfi := Hybrid.integrable_sqrt_mul_sqrt hf hr hf0 hr0
103 have hgi := Hybrid.integrable_sqrt_mul_sqrt hg hr hg0 hr0
104 have hbi := Hybrid.integrable_sqrt_mul_sqrt (hf.sub hg).abs hr
105 (fun _ ↦ abs_nonneg _) hr0
106 rw [← integral_sub hfi hgi]
107 calc
108 _ ≤ ∫ x, |Real.sqrt (f x)*Real.sqrt (r x)-Real.sqrt (g x)*Real.sqrt (r x)| ∂ν :=
109 abs_integral_le_integral_abs
110 _ ≤ ∫ x, Real.sqrt |f x-g x| * Real.sqrt (r x) ∂ν := by
111 apply integral_mono (hfi.sub hgi).abs hbi
112 intro x
113 dsimp only [Pi.sub_apply]
114 rw [← sub_mul, abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)]
115 exact mul_le_mul_of_nonneg_right
116 (ClassicalFidelity.sqrt_difference_bound _ _ (hf0 x) (hg0 x)) (Real.sqrt_nonneg _)
117 _ ≤ Real.sqrt (∫ x, |f x-g x| ∂ν) * Real.sqrt (∫ x, r x ∂ν) :=
118 Hybrid.integral_sqrt_mul_sqrt_le (hf.sub hg).abs hr (fun _ ↦ abs_nonneg _) hr0
119 _ = _ := by rw [hrmass, Real.sqrt_one, mul_one]
120
121/-- Joint L¹ convergence of probability densities implies convergence of affinity. -/
122theorem density_affinity_tendsto (f g : ℕ → X → ℝ) (f₀ g₀ : X → ℝ)
123 (hf : ∀ n, Integrable (f n) ν) (hg : ∀ n, Integrable (g n) ν)
124 (hf₀ : Integrable f₀ ν) (hg₀ : Integrable g₀ ν)
125 (hf0 : ∀ n x, 0 ≤ f n x) (hg0 : ∀ n x, 0 ≤ g n x)
126 (hf₀0 : ∀ x, 0 ≤ f₀ x) (hg₀0 : ∀ x, 0 ≤ g₀ x)
127 (hfmass : (∫ x, f₀ x ∂ν) = 1) (hgmass : ∀ n, (∫ x, g n x ∂ν) = 1)
128 (hflim : Tendsto (fun n ↦ ∫ x, |f n x-f₀ x| ∂ν) atTop (𝓝 0))
129 (hglim : Tendsto (fun n ↦ ∫ x, |g n x-g₀ x| ∂ν) atTop (𝓝 0)) :
130 Tendsto (fun n ↦ ∫ x, Real.sqrt (f n x)*Real.sqrt (g n x) ∂ν) atTop
131 (𝓝 (∫ x, Real.sqrt (f₀ x)*Real.sqrt (g₀ x) ∂ν)) := by
132 have hb n : |(∫ x, Real.sqrt (f n x)*Real.sqrt (g n x) ∂ν) -
133 ∫ x, Real.sqrt (f₀ x)*Real.sqrt (g₀ x) ∂ν| ≤
134 Real.sqrt (∫ x, |f n x-f₀ x| ∂ν) + Real.sqrt (∫ x, |g n x-g₀ x| ∂ν) := by
135 apply (abs_sub_le _ (∫ x, Real.sqrt (f₀ x)*Real.sqrt (g n x) ∂ν) _).trans
136 apply add_le_add (density_affinity_l1_bound ν _ _ _ (hf n) hf₀ (hg n)
137 (hf0 n) hf₀0 (hg0 n) (hgmass n))
138 simpa only [mul_comm] using density_affinity_l1_bound ν _ _ _ (hg n) hg₀ hf₀
139 (hg0 n) hg₀0 hf₀0 hfmass
140 have hh := (hflim.sqrt).add hglim.sqrt
141 simp only [Real.sqrt_zero, add_zero] at hh
142 apply tendsto_iff_norm_sub_tendsto_zero.mpr
143 simpa only [Real.norm_eq_abs] using squeeze_zero (fun n ↦ abs_nonneg _) hb hh
144
145end Cloning.YoungHyperplane