Offline · exact source
Exact Lean source

TensorLANEmbeddingClassicalCenter

formalization/Cloning/TensorLANEmbeddingClassicalCenter.lean

Source hash: 189fca0309c8e2fbb182616450ad590866ad5936b14215c02abe55127112c270

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.

In the dependency map: Physical LAN

Declarations in this module
1import Cloning.YoungUniformLocalQuantization
2 
3/-! Exact recentering at a fixed reference spectrum. The classical cell
4protocol consequently does not depend on the unknown local parameter. -/
5noncomputable section
6open scoped BigOperators Topology Classical
7open Filter MeasureTheory
8namespace Cloning.YoungHyperplane
9set_option backward.isDefEq.respectTransparency false
10set_option maxHeartbeats 1000000
11 
12/-- The displacement of two spectral centers in physical root coordinates. -/
13def spectralCenterShift (d N : ℕ) (p q : Fin (d + 1) → ℝ) : rootSpace d :=
14  coordinates d (fun i => Real.sqrt (N : ℝ) * (q i.castSucc - p i.castSucc))
15 
16theorem sampleLabel_recenter (d N : ℕ) (p q : Fin (d + 1) → ℝ)
17    (x : rootSpace d) :
18    sampleLabel d N p x =
19      sampleLabel d N q (x - spectralCenterShift d N p q) := by
20  unfold sampleLabel
21  congr 2
22  funext i
23  simp only [Submodule.coe_sub, PiLp.sub_apply, spectralCenterShift, coordinates_head]
24  have hs := Real.sq_sqrt (Nat.cast_nonneg N : (0 : ℝ) ≤ N)
25  nlinarith [congrArg (fun t : ℝ => t * (q i.castSucc - p i.castSucc)) hs]
26 
27theorem sampleInterpolate_recenter (d N : ℕ) (hN : 0 < N)
28    (p q : Fin (d + 1) → ℝ) (P : Lattice d (N : ℤ) → ℝ) (x : rootSpace d) :
29    sampleInterpolate d N p P x =
30      sampleInterpolate d N q P (x - spectralCenterShift d N p q) := by
31  rw [sampleInterpolate_eq_on_cell d N (by exact_mod_cast hN) p P
32    (sampleLabel d N p x) x (mem_sampleCell_sampleLabel d N p x),
33    sampleInterpolate_eq_on_cell d N (by exact_mod_cast hN) q P
34      (sampleLabel d N q (x - spectralCenterShift d N p q))
35      (x - spectralCenterShift d N p q)
36      (mem_sampleCell_sampleLabel d N q (x - spectralCenterShift d N p q)),
37    sampleLabel_recenter d N p q x]
38 
39/-- Translation leaves the full L1 error exactly unchanged. -/
40theorem sampleInterpolate_recenter_l1 (d N : ℕ) (hN : 0 < N)
41    (p q : Fin (d + 1) → ℝ) (P : Lattice d (N : ℤ) → ℝ)
42    (g : rootSpace d → ℝ) :
43    (∫ x, |sampleInterpolate d N p P x - g (x - spectralCenterShift d N p q)|) =
44      ∫ x, |sampleInterpolate d N q P x - g x| := by
45  simp_rw [sampleInterpolate_recenter d N hN p q P]
46  exact integral_sub_right_eq_self (μ := (volume : Measure (rootSpace d)))
47    (fun x : rootSpace d => |sampleInterpolate d N q P x - g x|)
48    (spectralCenterShift d N p q)
49 
50/-- The true physical Young law, emitted into cells centered at the fixed
51reference `p₀`, even when the input spectrum is `p`. -/
52def fixedBaseYoungDensity (d N : ℕ) (p₀ p : Fin (d + 1) → ℝ)
53    (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : rootSpace d → ℝ :=
54  sampleInterpolate d N p₀ (fun μ => (tensorYoungLatticePMF d N p hp hs μ).toReal)
55 
56theorem fixedBaseYoungDensity_eq_translate (d N : ℕ) (hN : 0 < N)
57    (p₀ p : Fin (d + 1) → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1)
58    (x : rootSpace d) :
59    fixedBaseYoungDensity d N p₀ p hp hs x =
60      tensorYoungDensity d N p hp hs (x - spectralCenterShift d N p₀ p) :=
61  sampleInterpolate_recenter d N hN p₀ p _ x
62 
63theorem fixedBaseYoungDensity_l1_tendsto (d : ℕ) (n : ℕ → ℕ)
64    (hn : Tendsto n atTop atTop) (hn0 : ∀ k, 0 < n k)
65    (p : ℕ → Fin (d + 1) → ℝ) (hp : ∀ k, ∑ i, p k i = 1)
66    (hp0 : ∀ k i, 0 < p k i) (p₀ : Fin (d + 1) → ℝ) (hs₀ : ∑ i, p₀ i = 1)
67    (hp₀ : ∀ i, 0 < p₀ i) (hord : StrictAnti p₀)
68    (hlim : ∀ i, Tendsto (fun k => p k i) atTop (𝓝 (p₀ i))) :
69    Tendsto (fun k => ∫ x,
70      |fixedBaseYoungDensity d (n k) p₀ (p k) (fun i => (hp0 k i).le) (hp k) x -
71        covarianceGaussian d p₀ hs₀ (x - spectralCenterShift d (n k) p₀ (p k))|)
72      atTop (𝓝 0) := by
73  have h := tensorYoungDensity_l1_tendsto d n hn hn0 p hp hp0 p₀ hs₀ hp₀ hord hlim
74  simpa only [fixedBaseYoungDensity, sampleInterpolate_recenter_l1 d _ (hn0 _) p₀,
75    tensorYoungDensity] using h
76 
77/-- The fixed quantizer recovers the exact physical law, including all affine
78lattice outcomes, rather than only labels in a typical set. -/
79theorem binMass_fixedBaseYoungDensity (d N : ℕ) (hN : 0 < N)
80    (p₀ p : Fin (d + 1) → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1)
81    (μ : Lattice d (N : ℤ)) :
82    YoungRounding.binMass volume (sampleLabel d N p₀)
83      (fixedBaseYoungDensity d N p₀ p hp hs) μ =
84        (tensorYoungLatticePMF d N p hp hs μ).toReal := by
85  have hn : (0 : ℝ) < N := by exact_mod_cast hN
86  have hnz : Real.sqrt (N : ℝ) ≠ 0 := (Real.sqrt_pos.mpr hn).ne'
87  have hdz : Real.sqrt ((d : ℝ) + 1) ≠ 0 := by positivity
88  rw [YoungRounding.binMass, sampleLabel_fiber, fixedBaseYoungDensity]
89  rw [setIntegral_congr_fun (measurableSet_sampleCell d N p₀ μ)
90    (fun x hx => sampleInterpolate_eq_on_cell d N (by exact_mod_cast hN) p₀
91      (fun μ => (tensorYoungLatticePMF d N p hp hs μ).toReal) μ x hx), setIntegral_const]
92  simp only [Measure.real, volume_sampleCell d N (by exact_mod_cast hN),
93    ENNReal.toReal_mul, ENNReal.toReal_ofReal (by positivity : 0 ≤ Real.sqrt ((d : ℝ) + 1)),
94    ENNReal.toReal_ofReal (by positivity : 0 ≤ ((Real.sqrt (N : ℝ)) ^ d)⁻¹),
95    smul_eq_mul, Int.cast_natCast]
96  field_simp
97 
98end Cloning.YoungHyperplane