Exact Lean source
YoungTwoRowConcentration
formalization/Cloning/YoungTwoRowConcentration.lean
Source hash: ec3ee0462478e0a1d2815f32300631032d885c7227f3a04c4557d534ba9a99c1
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.YoungTwoRow.sum_four_pow_upperRowtheorem Cloning.YoungTwoRow.weight_le_uniform_factordefinition Cloning.YoungTwoRow.largeGapProbabilitytheorem Cloning.YoungTwoRow.largeGapProbability_nonnegtheorem Cloning.YoungTwoRow.largeGapProbability_letheorem Cloning.YoungTwoRow.dimensionRatio_ge_onetheorem Cloning.YoungTwoRow.rowVector_lower_of_small_gaptheorem Cloning.YoungTwoRow.normalized_dimensionRatio_lowertheorem Cloning.YoungTwoRow.inverse_normalized_dimensionRatio_uppertheorem Cloning.YoungTwoRow.reciprocal_error_of_small_gaptheorem Cloning.YoungTwoRow.reciprocal_error_globaldefinition Cloning.YoungTwoRow.reciprocalTailEnvelopetheorem Cloning.YoungTwoRow.mean_absolute_reciprocal_errordefinition Cloning.YoungTwoRow.meanInverseDimensionRatiotheorem Cloning.YoungTwoRow.meanInverseDimensionRatio_relative_errortheorem Cloning.YoungTwoRow.scaled_reciprocalTail_tendsto_zerotheorem Cloning.YoungTwoRow.meanInverseDimensionRatio_eventual_ratetheorem Cloning.YoungTwoRow.meanInverseDimensionRatio_relative_isBigOtheorem Cloning.YoungTwoRow.meanInverseDimensionRatio_eq_shape_sumtheorem Cloning.YoungTwoRow.shape_inverse_dimensionRatio_relative_isBigO1import Cloning.YoungTwoRowAsymptotics
2import Mathlib.Analysis.SpecificLimits.Normed
3
4/-!
5# Exponential concentration and reciprocal Weyl moments for two rows
6
7The concrete tableau-path law is bounded by `(N+1)` times the fair binary
8path law. An exact generating-function calculation proves a fixed-fraction
9tail bound `(N+1)(9/10)^N`, without any concentration hypothesis.
10-/
11
12noncomputable section
13open scoped BigOperators Topology
14open Filter
15
16namespace Cloning.YoungTwoRow
17open YoungDimensionRatio
18
19/-- The unnormalized exponential moment of the actual upper-row count. -/
20theorem sum_four_pow_upperRow (N : ℕ) :
21 (∑ p : Path N, (4 : ℝ) ^ upperRow N p) = 5 ^ N := by
22 induction N with
23 | zero => simp [Path, upperRow]
24 | succ N ih =>
25 change (∑ p : Path N × Bool, (4 : ℝ) ^ upperRow (N + 1) p) = _
26 rw [Fintype.sum_prod_type]
27 have hp (p : Path N) : (∑ b : Bool, (4 : ℝ) ^ upperRow (N + 1) (p, b)) =
28 5 * 4 ^ upperRow N p := by
29 simp [upperRow, pow_succ]
30 ring
31 simp_rw [hp]
32 rw [← Finset.mul_sum, ih, pow_succ]
33 ring
34
35/-- Every legal path has Schur weight at most `(N+1)` times its fair-walk weight. -/
36theorem weight_le_uniform_factor (N : ℕ) (p : Path N) :
37 weight N p ≤ ((N : ℝ) + 1) / (2 : ℝ) ^ N := by
38 rw [weight_formula]
39 split_ifs
40 · apply div_le_div_of_nonneg_right _ (pow_nonneg (by norm_num) _)
41 exact_mod_cast Nat.succ_le_succ (spin_le_length N p)
42 · positivity
43
44/-- The actual probability of a row gap larger than half the sample size. -/
45def largeGapProbability (N : ℕ) : ℝ :=
46 ∑ p : Path N, if N < 2 * spin N p then weight N p else 0
47
48theorem largeGapProbability_nonneg (N : ℕ) : 0 ≤ largeGapProbability N := by
49 apply Finset.sum_nonneg
50 intro p hp
51 split_ifs
52 · exact weight_nonneg N p
53 · exact le_rfl
54
55private theorem sqrt_eight_pow_le (N : ℕ) (p : Path N) (hp : legal N p)
56 (htail : N < 2 * spin N p) :
57 Real.sqrt 8 ^ N ≤ (4 : ℝ) ^ upperRow N p := by
58 have hsum := row_sum N p
59 have hgap := spin_add_lower_eq_upper N p hp
60 have hexp : 3 * N ≤ 4 * upperRow N p := by omega
61 have hpow : (8 : ℝ) ^ N ≤ (16 : ℝ) ^ upperRow N p := by
62 calc
63 _ = (2 : ℝ) ^ (3 * N) := by rw [pow_mul]; norm_num
64 _ ≤ (2 : ℝ) ^ (4 * upperRow N p) := pow_le_pow_right₀ (by norm_num) hexp
65 _ = _ := by rw [pow_mul]; norm_num
66 have hs : (Real.sqrt 8) ^ 2 = (8 : ℝ) := Real.sq_sqrt (by norm_num)
67 have hl : (Real.sqrt 8 ^ N) ^ 2 = (8 : ℝ) ^ N := by
68 rw [← pow_mul, Nat.mul_comm N 2, pow_mul, hs]
69 have hr : ((4 : ℝ) ^ upperRow N p) ^ 2 = (16 : ℝ) ^ upperRow N p := by
70 rw [← pow_mul, Nat.mul_comm (upperRow N p) 2, pow_mul]
71 norm_num
72 apply (sq_le_sq₀ (pow_nonneg (Real.sqrt_nonneg _) _) (pow_nonneg (by norm_num) _)).mp
73 rwa [hl, hr]
74
75/-- A genuine exponential tail bound for the concrete Schur path law. -/
76theorem largeGapProbability_le (N : ℕ) :
77 largeGapProbability N ≤ ((N : ℝ) + 1) * (9 / 10 : ℝ) ^ N := by
78 have hs0 : 0 < Real.sqrt (8 : ℝ) := Real.sqrt_pos.mpr (by norm_num)
79 have hpoint (p : Path N) :
80 (if N < 2 * spin N p then weight N p else 0) ≤
81 (((N : ℝ) + 1) / ((2 : ℝ) ^ N * Real.sqrt 8 ^ N)) * 4 ^ upperRow N p := by
82 by_cases ht : N < 2 * spin N p
83 · rw [if_pos ht]
84 by_cases hp : legal N p
85 · have hratio : (1 : ℝ) ≤ 4 ^ upperRow N p / Real.sqrt 8 ^ N :=
86 (one_le_div (pow_pos hs0 N)).mpr (sqrt_eight_pow_le N p hp ht)
87 calc
88 _ ≤ ((N : ℝ) + 1) / (2 : ℝ) ^ N := weight_le_uniform_factor N p
89 _ ≤ (((N : ℝ) + 1) / (2 : ℝ) ^ N) *
90 (4 ^ upperRow N p / Real.sqrt 8 ^ N) :=
91 le_mul_of_one_le_right (by positivity) hratio
92 _ = _ := by ring
93 · rw [weight_eq_zero_of_not_legal N p hp]
94 positivity
95 · rw [if_neg ht]
96 positivity
97 have hq0 : (0 : ℝ) ≤ 5 / (2 * Real.sqrt 8) := by positivity
98 have hq : (5 : ℝ) / (2 * Real.sqrt 8) ≤ 9 / 10 := by
99 apply (div_le_iff₀ (mul_pos (by norm_num) hs0)).mpr
100 nlinarith [Real.sq_sqrt (show (0 : ℝ) ≤ 8 by norm_num)]
101 calc
102 _ ≤ ∑ p : Path N,
103 (((N : ℝ) + 1) / ((2 : ℝ) ^ N * Real.sqrt 8 ^ N)) * 4 ^ upperRow N p :=
104 Finset.sum_le_sum (fun p _ => hpoint p)
105 _ = ((N : ℝ) + 1) * (5 / (2 * Real.sqrt 8)) ^ N := by
106 rw [← Finset.mul_sum, sum_four_pow_upperRow, div_pow, mul_pow]
107 ring
108 _ ≤ _ := mul_le_mul_of_nonneg_left (pow_le_pow_left₀ hq0 hq N) (by positivity)
109
110theorem dimensionRatio_ge_one (k N : ℕ) (p : Path N) :
111 1 ≤ dimensionRatio 2 k (rowVector N p) := by
112 apply Finset.one_le_prod
113 intro a ha
114 apply (one_le_div (crossingGap_pos a)).mpr
115 exact le_add_of_nonneg_left (rowVector_bounds N p a.1).1
116
117/-- Central legal shapes have both rows at least `N/4`. -/
118theorem rowVector_lower_of_small_gap (N : ℕ) (p : Path N) (hp : legal N p)
119 (hgap : 2 * spin N p ≤ N) (i : Fin 2) : (N : ℝ) / 4 ≤ rowVector N p i := by
120 have hs : (upperRow N p : ℝ) + (lowerRow N p : ℝ) = N := by exact_mod_cast row_sum N p
121 have hg : (spin N p : ℝ) + (lowerRow N p : ℝ) = upperRow N p :=
122 by exact_mod_cast spin_add_lower_eq_upper N p hp
123 have ht : 2 * (spin N p : ℝ) ≤ N := by exact_mod_cast hgap
124 have hsp : 0 ≤ (spin N p : ℝ) := Nat.cast_nonneg _
125 dsimp [rowVector]
126 split_ifs <;> linarith
127
128theorem normalized_dimensionRatio_lower (k N : ℕ) (hN : 1 ≤ N)
129 (p : Path N) (hp : legal N p) (hgap : 2 * spin N p ≤ N) :
130 (1 / 2 : ℝ) ^ (2 * k) ≤ dimensionRatio 2 k (rowVector N p) /
131 (leadingConstant 2 k * (N : ℝ) ^ (2 * k)) := by
132 have hN0 : (0 : ℝ) < N := by exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hN
133 have hden : leadingConstant 2 k * (N : ℝ) ^ (2 * k) ≠ 0 :=
134 (mul_pos (leadingConstant_pos 2 k (by decide)) (pow_pos hN0 _)).ne'
135 rw [dimensionRatio_factorization 2 k (rowVector N p) N (by decide) hN0,
136 mul_div_cancel_left₀ _ hden]
137 have hf (a : Fin 2 × Fin k) : (1 / 2 : ℝ) ≤
138 (2 : ℝ) * (rowVector N p a.1 + crossingGap a) / N := by
139 apply (le_div_iff₀ hN0).mpr
140 have := rowVector_lower_of_small_gap N p hp hgap a.1
141 have := (crossingGap_pos a).le
142 linarith
143 calc
144 _ = ∏ _a : Fin 2 × Fin k, (1 / 2 : ℝ) := by simp
145 _ ≤ _ := Finset.prod_le_prod (fun _ _ => by norm_num) (fun a _ => hf a)
146
147theorem inverse_normalized_dimensionRatio_upper (k N : ℕ) (hN : 1 ≤ N)
148 (p : Path N) (hp : legal N p) (hgap : 2 * spin N p ≤ N) :
149 (leadingConstant 2 k * (N : ℝ) ^ (2 * k)) /
150 dimensionRatio 2 k (rowVector N p) ≤ (2 : ℝ) ^ (2 * k) := by
151 have hN0 : (0 : ℝ) < N := by exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hN
152 have hden : 0 < leadingConstant 2 k * (N : ℝ) ^ (2 * k) :=
153 mul_pos (leadingConstant_pos 2 k (by decide)) (pow_pos hN0 _)
154 have hR : 0 < dimensionRatio 2 k (rowVector N p) :=
155 lt_of_lt_of_le zero_lt_one (dimensionRatio_ge_one k N p)
156 apply (div_le_iff₀ hR).mpr
157 have hl := (le_div_iff₀ hden).mp (normalized_dimensionRatio_lower k N hN p hp hgap)
158 have hid : (2 : ℝ) ^ (2 * k) * (1 / 2 : ℝ) ^ (2 * k) = 1 := by
159 rw [← mul_pow]
160 norm_num
161 calc
162 _ = (2 : ℝ) ^ (2 * k) * ((1 / 2 : ℝ) ^ (2 * k) *
163 (leadingConstant 2 k * (N : ℝ) ^ (2 * k))) := by rw [← mul_assoc, hid, one_mul]
164 _ ≤ _ := mul_le_mul_of_nonneg_left hl (pow_nonneg (by norm_num) _)
165
166theorem reciprocal_error_of_small_gap (k N : ℕ) (hN : 1 ≤ N)
167 (p : Path N) (hp : legal N p) (hgap : 2 * spin N p ≤ N) :
168 |(leadingConstant 2 k * (N : ℝ) ^ (2 * k)) /
169 dimensionRatio 2 k (rowVector N p) - 1| ≤
170 (2 : ℝ) ^ (2 * k) * |dimensionRatio 2 k (rowVector N p) /
171 (leadingConstant 2 k * (N : ℝ) ^ (2 * k)) - 1| := by
172 let R := dimensionRatio 2 k (rowVector N p)
173 let D := leadingConstant 2 k * (N : ℝ) ^ (2 * k)
174 have hN0 : (0 : ℝ) < N := by exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hN
175 have hD : 0 < D := mul_pos (leadingConstant_pos 2 k (by decide)) (pow_pos hN0 _)
176 have hR : 0 < R := lt_of_lt_of_le zero_lt_one (dimensionRatio_ge_one k N p)
177 have heq : D / R - 1 = -(D / R) * (R / D - 1) := by field_simp; ring
178 change |D / R - 1| ≤ 2 ^ (2 * k) * |R / D - 1|
179 rw [heq, abs_mul, abs_neg, abs_of_pos (div_pos hD hR)]
180 exact mul_le_mul_of_nonneg_right (inverse_normalized_dimensionRatio_upper k N hN p hp hgap)
181 (abs_nonneg _)
182
183/-- The reciprocal error is at most polynomial even on extreme shapes. -/
184theorem reciprocal_error_global (k N : ℕ) (p : Path N) :
185 |(leadingConstant 2 k * (N : ℝ) ^ (2 * k)) /
186 dimensionRatio 2 k (rowVector N p) - 1| ≤
187 leadingConstant 2 k * (N : ℝ) ^ (2 * k) + 1 := by
188 have hD : 0 ≤ leadingConstant 2 k * (N : ℝ) ^ (2 * k) :=
189 mul_nonneg (leadingConstant_pos 2 k (by decide)).le (pow_nonneg (Nat.cast_nonneg _) _)
190 have hR := dimensionRatio_ge_one k N p
191 have hR0 : 0 < dimensionRatio 2 k (rowVector N p) := lt_of_lt_of_le zero_lt_one hR
192 have hdiv : (leadingConstant 2 k * (N : ℝ) ^ (2 * k)) /
193 dimensionRatio 2 k (rowVector N p) ≤ leadingConstant 2 k * (N : ℝ) ^ (2 * k) :=
194 div_le_self hD hR
195 calc
196 _ ≤ |(leadingConstant 2 k * (N : ℝ) ^ (2 * k)) /
197 dimensionRatio 2 k (rowVector N p)| + |(1 : ℝ)| := abs_sub _ _
198 _ ≤ _ := by rw [abs_of_nonneg (div_nonneg hD hR0.le), abs_one]; linarith
199
200/-- The exponentially small remainder after the polynomial reciprocal bound. -/
201def reciprocalTailEnvelope (k N : ℕ) : ℝ :=
202 (leadingConstant 2 k * (N : ℝ) ^ (2 * k) + 1) *
203 ((N : ℝ) + 1) * (9 / 10 : ℝ) ^ N
204
205theorem mean_absolute_reciprocal_error (k N : ℕ) (hN : 1 ≤ N) :
206 (∑ p : Path N, weight N p *
207 |(leadingConstant 2 k * (N : ℝ) ^ (2 * k)) /
208 dimensionRatio 2 k (rowVector N p) - 1|) ≤
209 (2 : ℝ) ^ (2 * k) * dimensionMomentConstant k / N + reciprocalTailEnvelope k N := by
210 let D := leadingConstant 2 k * (N : ℝ) ^ (2 * k)
211 have hD : 0 ≤ D :=
212 mul_nonneg (leadingConstant_pos 2 k (by decide)).le (pow_nonneg (Nat.cast_nonneg _) _)
213 have hpoint (p : Path N) :
214 weight N p * |D / dimensionRatio 2 k (rowVector N p) - 1| ≤
215 (2 : ℝ) ^ (2 * k) * (weight N p *
216 |dimensionRatio 2 k (rowVector N p) / D - 1|) +
217 (D + 1) * (if N < 2 * spin N p then weight N p else 0) := by
218 by_cases hp : legal N p
219 · by_cases ht : N < 2 * spin N p
220 · rw [if_pos ht]
221 have hb := mul_le_mul_of_nonneg_left (reciprocal_error_global k N p) (weight_nonneg N p)
222 have hn : 0 ≤ (2 : ℝ) ^ (2 * k) * (weight N p *
223 |dimensionRatio 2 k (rowVector N p) / D - 1|) :=
224 mul_nonneg (pow_nonneg (by norm_num) _) (mul_nonneg (weight_nonneg N p) (abs_nonneg _))
225 change weight N p * |D / dimensionRatio 2 k (rowVector N p) - 1| ≤
226 weight N p * (D + 1) at hb
227 nlinarith
228 · rw [if_neg ht, mul_zero, add_zero]
229 have hb := mul_le_mul_of_nonneg_left
230 (reciprocal_error_of_small_gap k N hN p hp (Nat.le_of_not_gt ht)) (weight_nonneg N p)
231 convert hb using 1
232 ring
233 · rw [weight_eq_zero_of_not_legal N p hp]
234 simp
235 calc
236 _ ≤ ∑ p : Path N, ((2 : ℝ) ^ (2 * k) * (weight N p *
237 |dimensionRatio 2 k (rowVector N p) / D - 1|) +
238 (D + 1) * (if N < 2 * spin N p then weight N p else 0)) :=
239 Finset.sum_le_sum (fun p _ => hpoint p)
240 _ = (2 : ℝ) ^ (2 * k) * (∑ p : Path N, weight N p *
241 |dimensionRatio 2 k (rowVector N p) / D - 1|) +
242 (D + 1) * largeGapProbability N := by
243 rw [Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.mul_sum]
244 rfl
245 _ ≤ (2 : ℝ) ^ (2 * k) * (dimensionMomentConstant k / N) +
246 (D + 1) * (((N : ℝ) + 1) * (9 / 10 : ℝ) ^ N) :=
247 add_le_add (mul_le_mul_of_nonneg_left (mean_absolute_dimensionRatio_error k N hN)
248 (pow_nonneg (by norm_num) _))
249 (mul_le_mul_of_nonneg_left (largeGapProbability_le N) (by linarith))
250 _ = _ := by dsimp [reciprocalTailEnvelope, D]; ring
251
252/-- The actual reciprocal Weyl-product moment of the concrete law. -/
253def meanInverseDimensionRatio (k N : ℕ) : ℝ :=
254 ∑ p : Path N, weight N p / dimensionRatio 2 k (rowVector N p)
255
256theorem meanInverseDimensionRatio_relative_error (k N : ℕ) (hN : 1 ≤ N) :
257 |(leadingConstant 2 k * (N : ℝ) ^ (2 * k)) * meanInverseDimensionRatio k N - 1| ≤
258 (2 : ℝ) ^ (2 * k) * dimensionMomentConstant k / N + reciprocalTailEnvelope k N := by
259 let D := leadingConstant 2 k * (N : ℝ) ^ (2 * k)
260 have heq : D * meanInverseDimensionRatio k N - 1 =
261 ∑ p : Path N, weight N p * (D / dimensionRatio 2 k (rowVector N p) - 1) := by
262 calc
263 _ = (∑ p : Path N, D * (weight N p / dimensionRatio 2 k (rowVector N p))) -
264 ∑ p : Path N, weight N p := by rw [← Finset.mul_sum, weight_sum]; rfl
265 _ = _ := by
266 rw [← Finset.sum_sub_distrib]
267 apply Finset.sum_congr rfl
268 intro p hp
269 ring
270 change |D * meanInverseDimensionRatio k N - 1| ≤ _
271 rw [heq]
272 calc
273 _ ≤ ∑ p : Path N, |weight N p * (D / dimensionRatio 2 k (rowVector N p) - 1)| :=
274 Finset.abs_sum_le_sum_abs _ _
275 _ = ∑ p : Path N, weight N p * |D / dimensionRatio 2 k (rowVector N p) - 1| := by
276 apply Finset.sum_congr rfl
277 intro p hp
278 rw [abs_mul, abs_of_nonneg (weight_nonneg N p)]
279 _ ≤ _ := mean_absolute_reciprocal_error k N hN
280
281/-- The exponential remainder is smaller than `1/N`, after multiplying by
282any fixed polynomial supplied by the ambient dimension. -/
283theorem scaled_reciprocalTail_tendsto_zero (k : ℕ) :
284 Tendsto (fun N : ℕ => (N : ℝ) * reciprocalTailEnvelope k N) atTop (𝓝 0) := by
285 have h (j : ℕ) : Tendsto (fun N : ℕ => (N : ℝ) ^ j * (9 / 10 : ℝ) ^ N) atTop (𝓝 0) :=
286 tendsto_pow_const_mul_const_pow_of_lt_one j (by norm_num) (by norm_num)
287 have hl := (((h (2 * k + 2)).const_mul (leadingConstant 2 k)).add
288 ((h (2 * k + 1)).const_mul (leadingConstant 2 k))).add ((h 2).add (h 1))
289 convert hl using 1
290 · funext N
291 dsimp [reciprocalTailEnvelope]
292 simp only [pow_add, pow_one, pow_two]
293 ring
294 · simp
295
296/-- An explicit eventual `1/N` bound for the normalized reciprocal moment. -/
297theorem meanInverseDimensionRatio_eventual_rate (k : ℕ) :
298 ∀ᶠ N : ℕ in atTop,
299 |(leadingConstant 2 k * (N : ℝ) ^ (2 * k)) * meanInverseDimensionRatio k N - 1| ≤
300 ((2 : ℝ) ^ (2 * k) * dimensionMomentConstant k + 1) / N := by
301 have ht := (scaled_reciprocalTail_tendsto_zero k).eventually
302 (eventually_lt_nhds (show (0 : ℝ) < 1 by norm_num))
303 filter_upwards [eventually_ge_atTop 1, ht] with N hN htN
304 have hN0 : (0 : ℝ) < N := by exact_mod_cast lt_of_lt_of_le Nat.zero_lt_one hN
305 have htail : reciprocalTailEnvelope k N ≤ 1 / (N : ℝ) := by
306 apply (le_div_iff₀ hN0).mpr
307 nlinarith
308 calc
309 _ ≤ (2 : ℝ) ^ (2 * k) * dimensionMomentConstant k / N + reciprocalTailEnvelope k N :=
310 meanInverseDimensionRatio_relative_error k N hN
311 _ ≤ (2 : ℝ) ^ (2 * k) * dimensionMomentConstant k / N + 1 / N :=
312 add_le_add le_rfl htail
313 _ = _ := by ring
314
315theorem meanInverseDimensionRatio_relative_isBigO (k : ℕ) :
316 Asymptotics.IsBigO atTop
317 (fun N : ℕ => (leadingConstant 2 k * (N : ℝ) ^ (2 * k)) *
318 meanInverseDimensionRatio k N - 1)
319 (fun N : ℕ => 1 / (N : ℝ)) := by
320 apply Asymptotics.IsBigO.of_bound ((2 : ℝ) ^ (2 * k) * dimensionMomentConstant k + 1)
321 filter_upwards [meanInverseDimensionRatio_eventual_rate k] with N hN
322 have hn : (0 : ℝ) ≤ 1 / (N : ℝ) := by positivity
323 simpa only [Real.norm_eq_abs, abs_of_nonneg hn, mul_one_div] using hN
324
325theorem meanInverseDimensionRatio_eq_shape_sum (k N : ℕ) :
326 meanInverseDimensionRatio k N = ∑ s : Fin (N + 1), shapeProbability N s /
327 dimensionRatio 2 k (shapeRowVector N s) := by
328 simp only [meanInverseDimensionRatio, div_eq_mul_inv]
329 rw [shape_expectation N (fun s => (dimensionRatio 2 k (shapeRowVector N s))⁻¹)]
330 apply Finset.sum_congr rfl
331 intro p hp
332 by_cases hl : legal N p
333 · rw [rowVector_eq_shapeRowVector N p hl]
334 · rw [weight_eq_zero_of_not_legal N p hl]
335 simp
336
337/-- The reciprocal moment rate directly under the normalized concrete shape law. -/
338theorem shape_inverse_dimensionRatio_relative_isBigO (k : ℕ) :
339 Asymptotics.IsBigO atTop
340 (fun N : ℕ => (leadingConstant 2 k * (N : ℝ) ^ (2 * k)) *
341 (∑ s : Fin (N + 1), shapeProbability N s / dimensionRatio 2 k (shapeRowVector N s)) - 1)
342 (fun N : ℕ => 1 / (N : ℝ)) := by
343 simpa only [meanInverseDimensionRatio_eq_shape_sum] using meanInverseDimensionRatio_relative_isBigO k
344
345end Cloning.YoungTwoRow