Exact Lean source
UniversalLeastNoiseRecursion
formalization/Cloning/UniversalLeastNoiseRecursion.lean
Source hash: 01bad23c9071a447bd424a7ea60bc3c1069895a0fe7c16c57906d39c59565f2c
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.UniversalLeastNoise.abs_le_one_of_sq_le_nexttheorem Cloning.UniversalLeastNoise.abs_le_one_of_sq_le_next_of_bounddefinition Cloning.UniversalLeastNoise.gaussianUpdatetheorem Cloning.UniversalLeastNoise.le_gaussianUpdatetheorem Cloning.UniversalLeastNoise.gaussianUpdate_letheorem Cloning.UniversalLeastNoise.gaussianUpdate_normalizationtheorem Cloning.UniversalLeastNoise.gaussianUpdate_sub_le_halfdefinition Cloning.UniversalLeastNoise.GaussianWidthsdefinition Cloning.UniversalLeastNoise.updateWidthstheorem Cloning.UniversalLeastNoise.gaussianUpdate_prod_normalizationdefinition Cloning.UniversalLeastNoise.gaussianNormalizationdefinition Cloning.UniversalLeastNoise.gaussianL1Bounddefinition Cloning.UniversalLeastNoise.gaussianConvolutionFactordefinition Cloning.UniversalLeastNoise.gaussianSharpBoundtheorem Cloning.UniversalLeastNoise.gaussianNormalization_postheorem Cloning.UniversalLeastNoise.gaussianNormalization_mul_L1Bound_letheorem Cloning.UniversalLeastNoise.gaussianNormalization_sq_mul_convolutiontheorem Cloning.UniversalLeastNoise.gaussianNormalization_mul_sharpBoundtheorem Cloning.UniversalLeastNoise.abs_le_gaussianSharpBound_of_normalizedtheorem Cloning.UniversalLeastNoise.gaussianSharpBound_of_convolution1import Mathlib.Data.Real.Archimedean
2import Mathlib.Order.ConditionallyCompleteLattice.Basic
3import Mathlib.Algebra.BigOperators.Group.Finset.Basic
4import Mathlib.Algebra.Order.BigOperators.Ring.Finset
5import Mathlib.Tactic.FieldSimp
6import Mathlib.Tactic.Linarith
7import Mathlib.Tactic.Positivity
8import Mathlib.Tactic.Ring
9
10/-! # The bounded squaring recurrence
11
12A bounded real function whose square is controlled by its value at a successor
13cannot have absolute value larger than one. The anisotropic Gaussian update
14below supplies the exact normalization identity used with that recurrence.
15-/
16
17noncomputable section
18open scoped BigOperators
19
20namespace Cloning.UniversalLeastNoise
21
22/-- A uniformly upper-bounded squaring recurrence forces a universal bound of
23one. No convergence of the successor iterates and no positivity of `J` is
24required. -/
25theorem abs_le_one_of_sq_le_next {α : Type*} (T : α → α) (J : α → ℝ)
26 (hbounded : BddAbove (Set.range J)) (hsq : ∀ a, J a ^ 2 ≤ J (T a))
27 (a : α) : |J a| ≤ 1 := by
28 let S := sSup (Set.range J)
29 have hle (b : α) : J b ≤ S := le_csSup hbounded (Set.mem_range_self b)
30 have hS : S ≤ 1 := by
31 by_contra h
32 have hS1 : 1 < S := lt_of_not_ge h
33 obtain ⟨j, ⟨b, rfl⟩, hj⟩ :=
34 exists_lt_of_lt_csSup (show (Set.range J).Nonempty from ⟨J a, ⟨a, rfl⟩⟩) (show (S + 1) / 2 < S by linarith)
35 have hbj : 0 < J b := by linarith
36 have hrec := (hsq b).trans (hle (T b))
37 nlinarith [sq_nonneg (S - 1)]
38 have hrec := (hsq a).trans ((hle (T a)).trans hS)
39 exact abs_le.mpr ⟨by nlinarith [sq_nonneg (J a + 1)],
40 by nlinarith [sq_nonneg (J a - 1)]⟩
41
42/-- A supplied finite scalar bound is sufficient for the recurrence theorem. -/
43theorem abs_le_one_of_sq_le_next_of_bound {α : Type*} (T : α → α) (J : α → ℝ)
44 (C : ℝ) (hbound : ∀ a, J a ≤ C) (hsq : ∀ a, J a ^ 2 ≤ J (T a))
45 (a : α) : |J a| ≤ 1 :=
46 abs_le_one_of_sq_le_next T J ⟨C, by rintro _ ⟨a, rfl⟩; exact hbound a⟩ hsq a
47
48/-- The one-coordinate Gaussian update. -/
49def gaussianUpdate (h t : ℝ) : ℝ := (t ^ 2 + h ^ 2) / (2 * t)
50
51/-- The update preserves the closed physical domain `t ≥ h > 0`. -/
52theorem le_gaussianUpdate {h t : ℝ} (hh : 0 < h) (ht : h ≤ t) :
53 h ≤ gaussianUpdate h t := by
54 have ht0 : 0 < t := lt_of_lt_of_le hh ht
55 unfold gaussianUpdate
56 apply (le_div_iff₀ (by positivity : 0 < 2 * t)).mpr
57 nlinarith [sq_nonneg (t - h)]
58
59/-- The update decreases the Gaussian width. -/
60theorem gaussianUpdate_le {h t : ℝ} (hh : 0 < h) (ht : h ≤ t) :
61 gaussianUpdate h t ≤ t := by
62 have ht0 : 0 < t := lt_of_lt_of_le hh ht
63 unfold gaussianUpdate
64 apply (div_le_iff₀ (by positivity : 0 < 2 * t)).mpr
65 nlinarith
66
67/-- Exact normalization identity for a single Gaussian factor. -/
68theorem gaussianUpdate_normalization {h t : ℝ} (ht : t ≠ 0) :
69 (t + h) ^ 2 = 2 * t * (gaussianUpdate h t + h) := by
70 unfold gaussianUpdate
71 field_simp
72 ring
73
74/-- The distance to the fixed point contracts by at least one half. -/
75theorem gaussianUpdate_sub_le_half {h t : ℝ} (hh : 0 < h) (ht : h ≤ t) :
76 gaussianUpdate h t - h ≤ (t - h) / 2 := by
77 have ht0 : 0 < t := lt_of_lt_of_le hh ht
78 have hnorm := gaussianUpdate_normalization (h := h) ht0.ne'
79 nlinarith [mul_nonneg hh.le (sub_nonneg.mpr ht)]
80
81/-- Coordinatewise Gaussian widths above their positive physical thresholds. -/
82def GaussianWidths {ι : Type*} (h : ι → ℝ) := {t : ι → ℝ // ∀ i, h i ≤ t i}
83
84/-- The update is a genuine self-map of the anisotropic physical domain. -/
85def updateWidths {ι : Type*} {h : ι → ℝ} (hh : ∀ i, 0 < h i)
86 (t : GaussianWidths h) : GaussianWidths h :=
87 ⟨fun i => gaussianUpdate (h i) (t.1 i),
88 fun i => le_gaussianUpdate (hh i) (t.2 i)⟩
89
90/-- Normalization identity for every finite collection of Gaussian modes. -/
91theorem gaussianUpdate_prod_normalization {ι : Type*} [Fintype ι]
92 (h t : ι → ℝ) (ht : ∀ i, t i ≠ 0) :
93 (∏ i, (t i + h i)) ^ 2 =
94 (∏ i, (2 * t i)) * (∏ i, (gaussianUpdate (h i) (t i) + h i)) := by
95 rw [← Finset.prod_pow, ← Finset.prod_mul_distrib]
96 exact Finset.prod_congr rfl (fun i _ => gaussianUpdate_normalization (ht i))
97
98/-- Inverse of the sharp anisotropic Gaussian integral bound. -/
99def gaussianNormalization {ι : Type*} [Fintype ι] (P : ℝ) (h t : ι → ℝ) : ℝ :=
100 ∏ i, (t i + h i) / P
101
102/-- Elementary absolute-integral bound before using positivity. -/
103def gaussianL1Bound {ι : Type*} [Fintype ι] (P : ℝ) (t : ι → ℝ) : ℝ :=
104 ∏ i, P / t i
105
106/-- Scalar factor in the Gaussian convolution recurrence. -/
107def gaussianConvolutionFactor {ι : Type*} [Fintype ι] (P : ℝ) (t : ι → ℝ) : ℝ :=
108 ∏ i, P / (2 * t i)
109
110/-- Sharp bound for the anisotropic Gaussian integral. -/
111def gaussianSharpBound {ι : Type*} [Fintype ι] (P : ℝ) (h t : ι → ℝ) : ℝ :=
112 ∏ i, P / (t i + h i)
113
114/-- The normalizing factor is strictly positive throughout the physical domain. -/
115theorem gaussianNormalization_pos {ι : Type*} [Fintype ι] {P : ℝ}
116 (hP : 0 < P) {h t : ι → ℝ} (hh : ∀ i, 0 < h i) (ht : ∀ i, h i ≤ t i) :
117 0 < gaussianNormalization P h t := by
118 apply Finset.prod_pos
119 intro i _
120 exact div_pos (add_pos (lt_of_lt_of_le (hh i) (ht i)) (hh i)) hP
121
122/-- The normalized elementary bound is uniformly bounded by two per mode. -/
123theorem gaussianNormalization_mul_L1Bound_le {ι : Type*} [Fintype ι] {P : ℝ}
124 (hP : 0 < P) {h t : ι → ℝ} (hh : ∀ i, 0 < h i) (ht : ∀ i, h i ≤ t i) :
125 gaussianNormalization P h t * gaussianL1Bound P t ≤ (2 : ℝ) ^ Fintype.card ι := by
126 unfold gaussianNormalization gaussianL1Bound
127 rw [← Finset.prod_mul_distrib]
128 calc
129 _ ≤ ∏ _i : ι, (2 : ℝ) := by
130 apply Finset.prod_le_prod
131 · intro i _
132 exact mul_nonneg (div_nonneg (add_nonneg (le_of_lt (lt_of_lt_of_le (hh i) (ht i)))
133 (hh i).le) hP.le) (div_nonneg hP.le (le_of_lt (lt_of_lt_of_le (hh i) (ht i))))
134 · intro i _
135 have ht0 := lt_of_lt_of_le (hh i) (ht i)
136 have heq : ((t i + h i) / P) * (P / t i) = (t i + h i) / t i := by
137 field_simp
138 rw [heq]
139 apply (div_le_iff₀ ht0).mpr
140 linarith [ht i]
141 _ = _ := by simp
142
143/-- The normalizing factor cancels the convolution constant exactly. -/
144theorem gaussianNormalization_sq_mul_convolution {ι : Type*} [Fintype ι] {P : ℝ}
145 (hP : P ≠ 0) (h t : ι → ℝ) (ht : ∀ i, t i ≠ 0) :
146 gaussianNormalization P h t ^ 2 * gaussianConvolutionFactor P t =
147 gaussianNormalization P h (fun i => gaussianUpdate (h i) (t i)) := by
148 unfold gaussianNormalization gaussianConvolutionFactor
149 rw [← Finset.prod_pow, ← Finset.prod_mul_distrib]
150 apply Finset.prod_congr rfl
151 intro i _
152 unfold gaussianUpdate
153 field_simp [ht i]
154 ring
155
156/-- The sharp bound is the exact reciprocal of the normalizing factor. -/
157theorem gaussianNormalization_mul_sharpBound {ι : Type*} [Fintype ι] {P : ℝ}
158 (hP : P ≠ 0) (h t : ι → ℝ) (ht : ∀ i, t i + h i ≠ 0) :
159 gaussianNormalization P h t * gaussianSharpBound P h t = 1 := by
160 unfold gaussianNormalization gaussianSharpBound
161 rw [← Finset.prod_mul_distrib]
162 convert Finset.prod_const_one (s := Finset.univ) using 1
163 apply Finset.prod_congr rfl
164 intro i _
165 field_simp [ht i]
166
167/-- Convert a unit bound after normalization into the sharp product bound. -/
168theorem abs_le_gaussianSharpBound_of_normalized {ι : Type*} [Fintype ι] {P : ℝ}
169 (hP : 0 < P) {h t : ι → ℝ} (hh : ∀ i, 0 < h i) (ht : ∀ i, h i ≤ t i)
170 {x : ℝ} (hx : |gaussianNormalization P h t * x| ≤ 1) :
171 |x| ≤ gaussianSharpBound P h t := by
172 have hc := gaussianNormalization_pos hP hh ht
173 have hnorm := gaussianNormalization_mul_sharpBound hP.ne' h t
174 (fun i => (add_pos (lt_of_lt_of_le (hh i) (ht i)) (hh i)).ne')
175 rw [abs_mul, abs_of_pos hc] at hx
176 exact (mul_le_mul_iff_right₀ hc).mp (hx.trans_eq hnorm.symm)
177
178/-- Gaussian convolution and the elementary absolute-integral bound imply the
179sharp product estimate. This result uses no limit or compactness argument. -/
180theorem gaussianSharpBound_of_convolution {ι : Type*} [Fintype ι] {P : ℝ}
181 (hP : 0 < P) {h : ι → ℝ} (hh : ∀ i, 0 < h i)
182 (J : GaussianWidths h → ℝ)
183 (hL1 : ∀ t, J t ≤ gaussianL1Bound P t.1)
184 (hconv : ∀ t, J t ^ 2 ≤ gaussianConvolutionFactor P t.1 * J (updateWidths hh t))
185 (t : GaussianWidths h) :
186 |J t| ≤ gaussianSharpBound P h t.1 := by
187 apply abs_le_gaussianSharpBound_of_normalized hP hh t.2
188 apply abs_le_one_of_sq_le_next_of_bound (updateWidths hh)
189 (fun t => gaussianNormalization P h t.1 * J t) ((2 : ℝ) ^ Fintype.card ι)
190 · intro u
191 exact (mul_le_mul_of_nonneg_left (hL1 u)
192 (gaussianNormalization_pos hP hh u.2).le).trans
193 (gaussianNormalization_mul_L1Bound_le hP hh u.2)
194 · intro u
195 have hstep := mul_le_mul_of_nonneg_left (hconv u)
196 (sq_nonneg (gaussianNormalization P h u.1))
197 rw [mul_pow]
198 convert hstep using 1
199 rw [← mul_assoc, gaussianNormalization_sq_mul_convolution hP.ne' h u.1
200 (fun i => (lt_of_lt_of_le (hh i) (u.2 i)).ne')]
201 rfl
202
203end Cloning.UniversalLeastNoise