Offline · exact source
Exact Lean source

YoungFlatCells

formalization/Cloning/YoungFlatCells.lean

Source hash: abe41805d5b419fafb830eac6711f01f15082c293d2e51ab0321c3f199611163

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.YoungFlatCorrection
2import Cloning.YoungUniformLocalSampleShape
3 
4/-! Moving-point flat cells satisfy the exact finite label constraints. -/
5noncomputable section
6open scoped BigOperators Topology Classical
7open Filter
8namespace Cloning.YoungFlat
9open Cloning.YoungHyperplane Cloning.YoungGeneral
10set_option backward.isDefEq.respectTransparency false
11set_option maxHeartbeats 1000000
12 
13theorem sampleCenter_moving_tendsto (d : ℕ) (n : ℕ → ℕ) (hn : Tendsto n atTop atTop)
14    (p : ℕ → Fin (d+1) → ℝ) (hp : ∀ k, ∑ i, p k i = 1)
15    (x : ℕ → rootSpace d) (x₀ : rootSpace d)
16    (hx : ∀ i, Tendsto (fun k ↦ (x k).1 i) atTop (𝓝 (x₀.1 i))) (i : Fin (d+1)) :
17    Tendsto (fun k ↦ (sampleCenter d (n k) (p k) (sampleLabel d (n k) (p k) (x k))).1 i)
18      atTop (𝓝 (x₀.1 i)) := by
19  have herr : Tendsto (fun k ↦
20      (sampleCenter d (n k) (p k) (sampleLabel d (n k) (p k) (x k))).1 i-(x k).1 i)
21      atTop (𝓝 0) := by
22    apply tendsto_zero_iff_norm_tendsto_zero.mpr
23    apply squeeze_zero' (Eventually.of_forall fun _ ↦ norm_nonneg _) ?_
24      ((sample_mesh_tendsto_zero d).comp hn)
25    filter_upwards [hn.eventually (eventually_gt_atTop 0)] with k hk
26    simpa only [Real.norm_eq_abs, Int.cast_natCast] using
27      sampleCenter_coordinate_distance d (n k) (by exact_mod_cast hk) (p k) (hp k)
28        (sampleLabel d (n k) (p k) (x k)) (x k)
29        (mem_sampleCell_sampleLabel d (n k) (p k) (x k)) i
30  simpa only [sub_add_cancel, zero_add] using herr.add (hx i)
31 
32theorem sampleLabel_flat_moving_ratio (d : ℕ) (n : ℕ → ℕ) (hn : Tendsto n atTop atTop)
33    (x : ℕ → rootSpace d) (x₀ : rootSpace d)
34    (hx : ∀ i, Tendsto (fun k ↦ (x k).1 i) atTop (𝓝 (x₀.1 i))) (i : Fin (d+1)) :
35    Tendsto (fun k ↦ ((sampleLabel d (n k) (flatSpectrum (d+1)) (x k)).1 i : ℝ)/(n k : ℝ))
36      atTop (𝓝 (1/((d+1 : ℕ) : ℝ))) := by
37  have hc := (sampleCenter_moving_tendsto d n hn (fun _ ↦ flatSpectrum (d+1))
38    (fun _ ↦ flatSpectrum_sum (d+1) (by omega)) x x₀ hx i).mul
39      (Cloning.YoungMultinomial.inv_sqrt_nat_tendsto_zero.comp hn)
40  have ht := hc.const_add (1/((d+1 : ℕ) : ℝ))
41  simp only [mul_zero, add_zero] at ht
42  apply ht.congr'
43  filter_upwards [hn.eventually (eventually_gt_atTop 0)] with k hk
44  rw [lattice_ratio_eq_center d (n k) hk _ (flatSpectrum_sum _ (by omega))]
45  rfl
46 
47/-- Flat labels need positivity for finite completion; no strict spectral gaps are used. -/
48theorem eventually_flat_sampleShape_valid (d : ℕ) (n : ℕ → ℕ) (hn : Tendsto n atTop atTop)
49    (x : ℕ → rootSpace d) (x₀ : rootSpace d)
50    (hx : ∀ i, Tendsto (fun k ↦ (x k).1 i) atTop (𝓝 (x₀.1 i))) :
51    ∀ᶠ k in atTop,
52      (∑ i, (sampleShape d (n k) (flatSpectrum (d+1)) (x k) i).val) = n k ∧
53      shapeLattice d (n k) (sampleShape d (n k) (flatSpectrum (d+1)) (x k)) =
54        sampleLabel d (n k) (flatSpectrum (d+1)) (x k) := by
55  have hp : ∀ᶠ k in atTop, ∀ i,
56      0 < ((sampleLabel d (n k) (flatSpectrum (d+1)) (x k)).1 i : ℝ)/(n k : ℝ) :=
57    eventually_all.mpr fun i ↦ (sampleLabel_flat_moving_ratio d n hn x x₀ hx i).eventually
58      (eventually_gt_nhds (by positivity))
59  filter_upwards [hp, hn.eventually (eventually_gt_atTop 0)] with k hk hn0
60  have hnR : (0 : ℝ) < n k := by exact_mod_cast hn0
61  have hpos i : 0 ≤ (sampleLabel d (n k) (flatSpectrum (d+1)) (x k)).1 i := by
62    exact_mod_cast ((div_pos_iff_of_pos_right hnR).mp (hk i)).le
63  exact ⟨sampleShape_sum d (n k) _ (x k) hpos, shapeLattice_sampleShape d (n k) _ (x k) hpos⟩
64 
65theorem shape_count_from_cell (d N : ℕ) (hN : 0 < N)
66    (p : Fin (d+1) → ℝ) (hp : ∑ i, p i = 1) (x : rootSpace d)
67    (μ : Shape (d+1) N) (hs : ∑ i, (μ i).val = N)
68    (he : shapeLattice d N μ = sampleLabel d N p x) (i : Fin (d+1)) :
69    ((μ i).val : ℝ) = N*(p i+
70      (sampleCenter d N p (sampleLabel d N p x)).1 i/Real.sqrt (N : ℝ)) := by
71  have hc := shapeLattice_apply d N μ hs i
72  rw [he] at hc
73  have hcast : ((sampleLabel d N p x).1 i : ℝ) = ((μ i).val : ℝ) := by exact_mod_cast hc
74  have ht := lattice_ratio_eq_center d N hN p hp (sampleLabel d N p x) i
75  rw [hcast] at ht
76  exact ((div_eq_iff (by positivity : (N : ℝ) ≠ 0)).mp ht).trans (mul_comm _ _)
77 
78end Cloning.YoungFlat