Offline · exact source
Exact Lean source

TensorFlatProjectorMoments

formalization/Cloning/TensorFlatProjectorMoments.lean

Source hash: 3dd0cfed9787fe33ca9f0920fe946db8db59cda2b1a43fcab67b93711ee67c34

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
1import Cloning.TensorFlatProjectorLaw
2 
3/-! Actual physical flat Young laws have the required forward and reciprocal
4crossing-dimension moments, derived from physical concentration. -/
5noncomputable section
6open scoped BigOperators Topology
7open Filter
8namespace Cloning.TensorLie
9open Cloning.YoungGeneral Cloning.YoungDimensionRatio
10set_option maxHeartbeats 1000000
11set_option backward.isDefEq.respectTransparency false
12 
13/-- Forward relative error under the literal physical flat-spectrum law. -/
14theorem tensorFlatYoungPMF_mean_dimension_error (r k : ℕ) (hr : 0 < r) :
15    Tendsto (fun N => ∑ mu, (tensorFlatYoungPMF N r hr mu).toReal *
16      |normalizedDimension r k N mu - 1|) atTop (𝓝 0) := by
17  have htail := tensorYoungPMF_tail_tendsto_zero (fun _ => flatSpectrum r)
18    (fun _ _ => by unfold flatSpectrum; positivity) (fun _ => flatSpectrum_sum r hr)
19    (fun _ => antitone_const)
20  have hbound := (dimensionErrorEnvelope_tendsto_zero r k).add
21    (htail.const_mul (dimensionUniformBound r k))
22  simp only [mul_zero, add_zero] at hbound
23  apply squeeze_zero' (Eventually.of_forall (fun N =>
24    Finset.sum_nonneg (fun mu _ => mul_nonneg ENNReal.toReal_nonneg (abs_nonneg _)))) ?_ hbound
25  filter_upwards [Filter.eventually_ge_atTop 1] with N hN
26  exact mean_error_le (tensorFlatYoungPMF N r hr) (flatSpectrum r) (shrinkingRadius N)
27    (dimensionErrorEnvelope r k N) (dimensionUniformBound r k)
28    (dimensionErrorEnvelope_nonneg r k N) (normalizedDimension r k N)
29    (normalizedDimension_global_error r k N hr hN) (normalizedDimension_typical_error r k N hr hN)
30 
31/-- Reciprocal relative error, including all atypical physical labels. -/
32theorem tensorFlatYoungPMF_mean_inverse_dimension_error (r k : ℕ) (hr : 0 < r) :
33    Tendsto (fun N => ∑ mu, (tensorFlatYoungPMF N r hr mu).toReal *
34      |inverseNormalizedDimension r k N mu - 1|) atTop (𝓝 0) := by
35  let c := leadingConstant r k
36  let a := r * k
37  let s := Fintype.card (PositiveRoot r)
38  let C := ((r : ℝ) + 1) ^ s
39  have hc : 0 ≤ c := (leadingConstant_pos r k hr).le
40  have hC : 0 ≤ C := by dsimp [C]; positivity
41  have htail := (polynomial_concentrationEnvelope_tendsto_zero r (a+s)).const_mul ((c+1)*C)
42  have hbound := ((dimensionErrorEnvelope_tendsto_zero r k).const_mul 2).add htail
43  simp only [mul_zero, add_zero] at hbound
44  apply squeeze_zero' (Eventually.of_forall (fun N =>
45    Finset.sum_nonneg (fun mu _ => mul_nonneg ENNReal.toReal_nonneg (abs_nonneg _)))) ?_ hbound
46  have hsmall : ∀ᶠ N in atTop, dimensionErrorEnvelope r k N ≤ 1 / 2 :=
47    (dimensionErrorEnvelope_tendsto_zero r k).eventually (eventually_le_nhds (by norm_num))
48  filter_upwards [Filter.eventually_ge_atTop 1, hsmall] with N hN heN
49  have hmean := mean_error_le (tensorFlatYoungPMF N r hr) (flatSpectrum r) (shrinkingRadius N)
50    (2 * dimensionErrorEnvelope r k N) (c * (N : ℝ) ^ a + 1)
51    (mul_nonneg (by norm_num) (dimensionErrorEnvelope_nonneg r k N))
52    (inverseNormalizedDimension r k N)
53    (inverseNormalizedDimension_global_error r k N hr)
54    (inverseNormalizedDimension_typical_error r k N hr hN heN)
55  have ht := tensorYoungPMF_tail_shrinking_le N hN (flatSpectrum r)
56    (fun _ => by unfold flatSpectrum; positivity) (flatSpectrum_sum r hr) antitone_const
57  have hpw : (N : ℝ) ^ a ≤ ((N : ℝ) + 1) ^ a := pow_le_pow_left₀ (by positivity) (by linarith) _
58  have hpw1 : (1 : ℝ) ≤ ((N : ℝ) + 1) ^ a := one_le_pow₀ (by linarith [(Nat.cast_nonneg N : (0:ℝ) ≤ N)])
59  have hcoeff : c * (N : ℝ) ^ a + 1 ≤ (c+1) * ((N : ℝ)+1)^a := by
60    nlinarith [mul_le_mul_of_nonneg_left hpw hc]
61  have ht0 : 0 ≤ tailProbability (tensorFlatYoungPMF N r hr) (flatSpectrum r) (shrinkingRadius N) :=
62    tensorYoungPMF_tail_nonneg _ _ _ _
63  have hh := mul_le_mul hcoeff ht ht0 (by positivity : 0 ≤ (c+1)*((N:ℝ)+1)^a)
64  have htailbound : (c * (N : ℝ)^a+1) *
65      tailProbability (tensorFlatYoungPMF N r hr) (flatSpectrum r) (shrinkingRadius N) ≤
66      ((c+1)*C) * (((N:ℝ)+1)^(a+s)*concentrationEnvelope r N) := by
67    convert hh using 1 <;> dsimp only [C, s] <;> rw [pow_add] <;> ring
68  exact hmean.trans (by linarith)
69 
70/-- Both moments are proved for the constructed physical measurement law. -/
71theorem tensorFlatYoungPMF_dimension_moments (r k : ℕ) (hr : 0 < r) :
72    Tendsto (fun N => ∑ mu, (tensorFlatYoungPMF N r hr mu).toReal *
73      normalizedDimension r k N mu) atTop (𝓝 1) ∧
74    Tendsto (fun N => ∑ mu, (tensorFlatYoungPMF N r hr mu).toReal *
75      inverseNormalizedDimension r k N mu) atTop (𝓝 1) :=
76  ⟨mean_tendsto_one_of_mean_absolute_error (fun N => tensorFlatYoungPMF N r hr) _
77      (tensorFlatYoungPMF_mean_dimension_error r k hr),
78    mean_tendsto_one_of_mean_absolute_error (fun N => tensorFlatYoungPMF N r hr) _
79      (tensorFlatYoungPMF_mean_inverse_dimension_error r k hr)⟩
80 
81end Cloning.TensorLie