Exact Lean source
YoungHyperplaneVolume
formalization/Cloning/YoungHyperplaneVolume.lean
Source hash: fe063764739cdecf52829122b4c865025c50495d2632e39fc4a226ea1032b9b3
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
definition
Cloning.YoungHyperplane.rootBasistheorem Cloning.YoungHyperplane.rootSpace_finranktheorem Cloning.YoungHyperplane.rootBasis_innertheorem Cloning.YoungHyperplane.rootBasis_gram_detdefinition Cloning.YoungHyperplane.rootOrthonormalBasistheorem Cloning.YoungHyperplane.rootBasis_det_sqtheorem Cloning.YoungHyperplane.rootBasis_abs_dettheorem Cloning.YoungHyperplane.volume_rootBasis_parallelepipedtheorem Cloning.YoungHyperplane.coordinateMeasure_eq_basistheorem Cloning.YoungHyperplane.volume_eq_sqrt_smul_coordinateMeasuretheorem Cloning.YoungHyperplane.volume_celldefinition Cloning.YoungHyperplane.euclideanInterpolatetheorem Cloning.YoungHyperplane.integral_volume_normalizetheorem Cloning.YoungHyperplane.euclideanInterpolate_integraltheorem Cloning.YoungHyperplane.euclideanInterpolate_l1_isometrytheorem Cloning.YoungHyperplane.euclideanInterpolate_affinity1import Cloning.YoungHyperplane
2
3/-!
4# The Euclidean volume normalization of the root hyperplane
5
6The coordinate basis has Gram matrix `I + 11ᵀ`, determinant `d+1`. Its
7Euclidean fundamental volume is therefore `sqrt (d+1)`. The measure identity
8below relates the actual induced hyperplane volume to coordinate transport.
9-/
10
11set_option maxHeartbeats 800000
12set_option backward.isDefEq.respectTransparency false
13noncomputable section
14open scoped BigOperators Topology Classical
15open MeasureTheory
16
17namespace Cloning.YoungHyperplane
18
19
20instance rootSpace_borelSpace (d : ℕ) : BorelSpace (rootSpace d) := by
21 change BorelSpace {x : EuclideanSpace ℝ (Fin (d + 1)) // ∑ i, x i = 0}
22 infer_instance
23
24def rootBasis (d : ℕ) : Module.Basis (Fin d) ℝ (rootSpace d) :=
25 (Pi.basisFun ℝ (Fin d)).map (coordinates d)
26
27theorem rootSpace_finrank (d : ℕ) : Module.finrank ℝ (rootSpace d) = d := by
28 simpa only [Fintype.card_fin] using Module.finrank_eq_card_basis (rootBasis d)
29
30theorem rootBasis_inner (d : ℕ) (i j : Fin d) :
31 inner ℝ (rootBasis d i) (rootBasis d j) = (if i = j then 1 else 0) + 1 := by
32 change inner ℝ (rootBasis d i).1 (rootBasis d j).1 = _
33 erw [EuclideanSpace.inner_eq_star_dotProduct]
34 simp only [dotProduct, Pi.star_apply, star_trivial]
35 rw [Fin.sum_univ_castSucc]
36 simp only [rootBasis, Module.Basis.map_apply, Pi.basisFun_apply, coordinates_head,
37 coordinates_last]
38 by_cases hij : i = j
39 · subst j
40 simp [Pi.single_apply]
41 · simp [Pi.single_apply, hij]
42
43theorem rootBasis_gram_det (d : ℕ) :
44 Matrix.det (fun i j : Fin d ↦ inner ℝ (rootBasis d i) (rootBasis d j)) = (d : ℝ) + 1 := by
45 have heq : (fun i j : Fin d ↦ inner ℝ (rootBasis d i) (rootBasis d j)) =
46 (1 : Matrix (Fin d) (Fin d) ℝ) +
47 Matrix.replicateCol Unit (fun _ : Fin d ↦ (1 : ℝ)) *
48 Matrix.replicateRow Unit (fun _ : Fin d ↦ (1 : ℝ)) := by
49 ext i j
50 rw [rootBasis_inner]
51 simp [Matrix.mul_apply, Matrix.one_apply]
52 rw [heq, Matrix.det_one_add_replicateCol_mul_replicateRow]
53 simp [dotProduct, add_comm]
54
55/-- The exact basis change from an orthonormal basis. -/
56def rootOrthonormalBasis (d : ℕ) : OrthonormalBasis (Fin d) ℝ (rootSpace d) :=
57 (stdOrthonormalBasis ℝ (rootSpace d)).reindex (finCongr (rootSpace_finrank d))
58
59/-- Its determinant squared is the determinant of the explicit Gram matrix. -/
60theorem rootBasis_det_sq (d : ℕ) :
61 ((rootOrthonormalBasis d).toBasis.det (rootBasis d)) ^ 2 = (d : ℝ) + 1 := by
62 let o := rootOrthonormalBasis d
63 let M := o.toBasis.toMatrix (rootBasis d)
64 have hgram : M.transpose * M = fun i j : Fin d ↦ inner ℝ (rootBasis d i) (rootBasis d j) := by
65 ext i j
66 simp only [Matrix.mul_apply, Matrix.transpose_apply, M, Module.Basis.toMatrix_apply]
67 have hrepr (x : rootSpace d) (k : Fin d) : o.toBasis.repr x k = inner ℝ (o k) x :=
68 o.repr_apply_apply x k
69 simp only [hrepr]
70 simpa only [real_inner_comm] using o.sum_inner_mul_inner (rootBasis d i) (rootBasis d j)
71 have hdet := congrArg Matrix.det hgram
72 rw [Matrix.det_mul, Matrix.det_transpose, rootBasis_gram_det] at hdet
73 simpa only [o, M, Module.Basis.det_apply, pow_two] using hdet
74
75theorem rootBasis_abs_det (d : ℕ) :
76 |(rootOrthonormalBasis d).toBasis.det (rootBasis d)| = Real.sqrt ((d : ℝ) + 1) := by
77 rw [← rootBasis_det_sq d, Real.sqrt_sq_eq_abs]
78
79theorem volume_rootBasis_parallelepiped (d : ℕ) :
80 volume (parallelepiped (rootBasis d)) = ENNReal.ofReal (Real.sqrt ((d : ℝ) + 1)) := by
81 rw [← (rootOrthonormalBasis d).addHaar_eq_volume,
82 Measure.addHaar_parallelepiped, rootBasis_abs_det]
83
84/-- The coordinate pushforward is the Haar measure normalized on the explicit
85root basis. -/
86theorem coordinateMeasure_eq_basis (d : ℕ) : coordinateMeasure d = (rootBasis d).addHaar := by
87 have hpi : (Pi.basisFun ℝ (Fin d)).addHaar = volume := by
88 rw [Module.Basis.addHaar_def, Module.Basis.parallelepiped_basisFun,
89 addHaarMeasure_eq_volume_pi]
90 rw [coordinateMeasure, ← hpi, Module.Basis.map_addHaar]
91 rfl
92
93/-- Canonical induced Euclidean hyperplane volume has the manuscript's
94`sqrt(number of rows)` Jacobian relative to the explicit coordinate map. -/
95theorem volume_eq_sqrt_smul_coordinateMeasure (d : ℕ) :
96 (volume : Measure (rootSpace d)) =
97 ENNReal.ofReal (Real.sqrt ((d : ℝ) + 1)) • coordinateMeasure d := by
98 have h := Measure.addHaarMeasure_unique (volume : Measure (rootSpace d))
99 (rootBasis d).parallelepiped
100 rw [Module.Basis.coe_parallelepiped, volume_rootBasis_parallelepiped,
101 ← Module.Basis.addHaar_def, ← coordinateMeasure_eq_basis] at h
102 exact h
103
104/-- The actual half-open fundamental cell has Euclidean volume `sqrt(d+1)`. -/
105theorem volume_cell (d : ℕ) (z : Fin d → ℤ) :
106 volume (cell d z) = ENNReal.ofReal (Real.sqrt ((d : ℝ) + 1)) := by
107 rw [volume_eq_sqrt_smul_coordinateMeasure, Measure.smul_apply, coordinateMeasure_cell]
108 simp
109
110/-- A density with respect to Euclidean volume has the extra reciprocal
111fundamental-cell volume appearing in the manuscript. -/
112def euclideanInterpolate (d : ℕ) (n : ℤ) (h : ℝ) (a : rootSpace d)
113 (P : Lattice d n → ℝ) (x : rootSpace d) : ℝ :=
114 (Real.sqrt ((d : ℝ) + 1))⁻¹ * interpolate d n h a P x
115
116/-- Exact integration formula for the Jacobian-normalized density. -/
117theorem integral_volume_normalize (d : ℕ) (f : rootSpace d → ℝ) :
118 (∫ x, (Real.sqrt ((d : ℝ) + 1))⁻¹ * f x) = ∫ x, f x ∂coordinateMeasure d := by
119 have hj : 0 < Real.sqrt ((d : ℝ) + 1) := Real.sqrt_pos.2 (by positivity)
120 rw [volume_eq_sqrt_smul_coordinateMeasure, integral_smul_measure,
121 integral_const_mul, ENNReal.toReal_ofReal hj.le, smul_eq_mul,
122 ← mul_assoc, mul_inv_cancel₀ hj.ne', one_mul]
123
124/-- Exact normalization of the manuscript's interpolated full-label law with
125respect to the canonical induced Euclidean hyperplane volume. -/
126theorem euclideanInterpolate_integral (d : ℕ) (n : ℤ) (h : ℝ) (hh : 0 < h)
127 (a : rootSpace d) (P : Lattice d n → ℝ) (hP : Summable P) :
128 (∫ x, euclideanInterpolate d n h a P x) = ∑' μ, P μ := by
129 unfold euclideanInterpolate
130 rw [integral_volume_normalize, interpolate_integral d n h hh a P hP]
131
132/-- The `sqrt(d+1)` factors cancel in the actual Euclidean `L¹` integral. -/
133theorem euclideanInterpolate_l1_isometry (d : ℕ) (n : ℤ) (h : ℝ) (hh : 0 < h)
134 (a : rootSpace d) (P Q : Lattice d n → ℝ) (hP : Summable P) (hQ : Summable Q) :
135 (∫ x, |euclideanInterpolate d n h a P x - euclideanInterpolate d n h a Q x|) =
136 ∑' μ, |P μ - Q μ| := by
137 have hj : 0 ≤ (Real.sqrt ((d : ℝ) + 1))⁻¹ := inv_nonneg.mpr (Real.sqrt_nonneg _)
138 simp only [euclideanInterpolate, ← mul_sub, abs_mul, abs_of_nonneg hj]
139 rw [integral_volume_normalize, interpolate_l1_isometry d n h hh a P Q hP hQ]
140
141private theorem sqrt_scale_product (c : ℝ) (hc : 0 ≤ c) (x y : ℝ) :
142 Real.sqrt (c * x) * Real.sqrt (c * y) = c * (Real.sqrt x * Real.sqrt y) := by
143 rw [Real.sqrt_mul hc, Real.sqrt_mul hc]
144 calc
145 _ = (Real.sqrt c)^2 * (Real.sqrt x * Real.sqrt y) := by ring
146 _ = _ := by rw [Real.sq_sqrt hc]
147
148/-- Exact Hellinger preservation for the canonical Euclidean volume; the
149hyperplane Jacobian is now proved and included, not left as a premise. -/
150theorem euclideanInterpolate_affinity (d : ℕ) (n : ℤ) (h : ℝ) (hh : 0 < h)
151 (a : rootSpace d) (P Q : Lattice d n → ℝ)
152 (hP0 : ∀ μ, 0 ≤ P μ) (hQ0 : ∀ μ, 0 ≤ Q μ) (hP : Summable P) (hQ : Summable Q) :
153 (∫ x, Real.sqrt (euclideanInterpolate d n h a P x) *
154 Real.sqrt (euclideanInterpolate d n h a Q x)) =
155 ∑' μ, Real.sqrt (P μ) * Real.sqrt (Q μ) := by
156 have hj : 0 ≤ (Real.sqrt ((d : ℝ) + 1))⁻¹ := inv_nonneg.mpr (Real.sqrt_nonneg _)
157 simp only [euclideanInterpolate, sqrt_scale_product _ hj]
158 rw [integral_volume_normalize, interpolate_affinity d n h hh a P Q hP0 hQ0 hP hQ]
159
160end Cloning.YoungHyperplane