Offline · exact source
Exact Lean source

YoungPhysicalRoundingCoordinates

formalization/Cloning/YoungPhysicalRoundingCoordinates.lean

Source hash: cdd8e4659dae847b3c9cb70733e62e4126fc7f607f82e04c9cc5a2a08fd75386

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: Lifted channels

Declarations in this module
1import Cloning.YoungUniformLocalPhysicalL1
2 
3/-! The actual physical Young law in the head coordinates used by the dither kernel. -/
4noncomputable section
5open scoped BigOperators Topology Classical
6open MeasureTheory Filter
7namespace Cloning.YoungHyperplane
8open Cloning.TensorLie Cloning.YoungGeneral
9set_option backward.isDefEq.respectTransparency false
10set_option maxHeartbeats 1000000
11 
12/-- The fixed coordinate Jacobian turns any root-space density into a head density. -/
13def coordinateDensity (d : ℕ) (f : rootSpace d → ℝ) (x : Fin d → ℝ) : ℝ :=
14  Real.sqrt ((d : ℝ) + 1) * f (coordinates d x)
15 
16theorem integral_coordinateDensity (d : ℕ) (f : rootSpace d → ℝ) :
17    (∫ x, coordinateDensity d f x) = ∫ x, f x := by
18  rw [volume_eq_sqrt_smul_coordinateMeasure, integral_smul_measure,
19    ENNReal.toReal_ofReal (Real.sqrt_nonneg _), smul_eq_mul]
20  unfold coordinateDensity
21  rw [integral_const_mul]
22  congr 1
23  exact (coordinates_measurePreserving d).integral_comp
24    (coordinatesContinuous d).toHomeomorph.measurableEmbedding f
25 
26theorem coordinateDensity_l1_isometry (d : ℕ) (f g : rootSpace d → ℝ) :
27    (∫ x, |coordinateDensity d f x - coordinateDensity d g x|) = ∫ x, |f x-g x| := by
28  have he : (fun x ↦ |coordinateDensity d f x - coordinateDensity d g x|) =
29      coordinateDensity d (fun x ↦ |f x-g x|) := by
30    funext x
31    simp only [coordinateDensity, ← mul_sub, abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)]
32  rw [he, integral_coordinateDensity]
33 
34def tensorYoungHeadPMF (d N : ℕ) (p : Fin (d + 1) → ℝ)
35    (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : PMF (Fin d → ℤ) :=
36  (tensorYoungLatticePMF d N p hp hs).map (latticeCoordinates d N).symm
37 
38theorem tensorYoungHeadPMF_apply (d N : ℕ) (p : Fin (d + 1) → ℝ)
39    (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) (z : Fin d → ℤ) :
40    tensorYoungHeadPMF d N p hp hs z =
41      tensorYoungLatticePMF d N p hp hs (latticeCoordinates d N z) := by
42  rw [tensorYoungHeadPMF, PMF.map_apply]
43  rw [tsum_eq_single (latticeCoordinates d N z)]
44  · simp
45  · intro b hb
46    have hne : z ≠ (latticeCoordinates d N).symm b := by
47      intro h
48      apply hb
49      exact ((latticeCoordinates d N).apply_eq_iff_eq_symm_apply.mpr h).symm
50    simp [hne]
51 
52/-- The head law is the literal pushforward of the actual finite Young measurement. -/
53theorem tensorYoungHeadPMF_eq_map (d N : ℕ) (p : Fin (d + 1) → ℝ)
54    (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
55    tensorYoungHeadPMF d N p hp hs =
56      (tensorYoungPMF N (d+1) p hp hs).map
57        (fun μ i ↦ ((μ i.castSucc).val : ℤ)) := by
58  rw [tensorYoungHeadPMF, tensorYoungLatticePMF, PMF.map_comp]
59  congr 1
60  funext μ
61  exact (latticeCoordinates d N).symm_apply_apply _
62 
63def headAnchor (d N : ℕ) (p : Fin (d+1) → ℝ) : Fin d → ℝ :=
64  fun i ↦ -Real.sqrt (N : ℝ) * p i.castSucc
65 
66def headDensity (d N : ℕ) (p : Fin (d+1) → ℝ)
67    (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) : (Fin d → ℝ) → ℝ :=
68  YoungRounding.affineDensity (Real.sqrt (N : ℝ))⁻¹ (headAnchor d N p)
69    (YoungRounding.interpolate (fun z ↦ (tensorYoungHeadPMF d N p hp hs z).toReal))
70 
71theorem coordinateDensity_tensorYoungDensity (d N : ℕ) (p : Fin (d+1) → ℝ)
72    (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
73    coordinateDensity d (tensorYoungDensity d N p hp hs) = headDensity d N p hp hs := by
74  funext x
75  simp only [coordinateDensity, tensorYoungDensity, sampleInterpolate, euclideanInterpolate,
76    interpolate, tensorYoungHeadPMF_apply, headDensity, headAnchor, sampleAnchor,
77    LinearEquiv.symm_apply_apply, Int.cast_natCast]
78  rw [← mul_assoc, mul_inv_cancel₀ (Real.sqrt_ne_zero'.mpr (by positivity)), one_mul]
79  rfl
80 
81/-- The actual physical global L¹ limit in the precise dither coordinate system. -/
82theorem headDensity_l1_tendsto (d : ℕ) (n : ℕ → ℕ)
83    (hn : Tendsto n atTop atTop) (hn0 : ∀ k, 0 < n k)
84    (p : ℕ → Fin (d + 1) → ℝ) (hp : ∀ k, ∑ i, p k i = 1)
85    (hp0 : ∀ k i, 0 < p k i) (p₀ : Fin (d + 1) → ℝ) (hs₀ : ∑ i, p₀ i = 1)
86    (hp₀ : ∀ i, 0 < p₀ i) (hord : StrictAnti p₀)
87    (hlim : ∀ i, Tendsto (fun k ↦ p k i) atTop (𝓝 (p₀ i))) :
88    Tendsto (fun k ↦ ∫ x, |headDensity d (n k) (p k) (fun i ↦ (hp0 k i).le) (hp k) x -
89      coordinateDensity d (covarianceGaussian d p₀ hs₀) x|) atTop (𝓝 0) := by
90  have h := tensorYoungDensity_l1_tendsto d n hn hn0 p hp hp0 p₀ hs₀ hp₀ hord hlim
91  simpa only [← coordinateDensity_l1_isometry, coordinateDensity_tensorYoungDensity] using h
92 
93end Cloning.YoungHyperplane