Offline · exact source
Exact Lean source

WeylFlatBox

formalization/Cloning/WeylFlatBox.lean

Source hash: 8ec06f55d24aa88551caee067bbb83a1ca34a3a7d1553bcaf42e37132d693e42

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.WeylFlatPrior
2import Mathlib.MeasureTheory.Measure.OpenPos
3import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
4 
5/-! The literal rectangular phase-space boxes used by flat-prior averaging. -/
6noncomputable section
7open scoped Topology
8open Filter MeasureTheory
9namespace Cloning.MultimodeCoherent
10variable {d : ℕ}
11 
12/-- The unit box in all real and imaginary phase-space coordinates. -/
13def phaseSpaceUnitBox (d : ℕ) : Set (Fin d → ℂ) :=
14  {z | ∀ i, |(z i).re| ≤ 1 ∧ |(z i).im| ≤ 1}
15 
16lemma phaseSpaceUnitBox_closed (d : ℕ) : IsClosed (phaseSpaceUnitBox d) := by
17  simp only [phaseSpaceUnitBox, Set.setOf_forall]
18  apply isClosed_iInter
19  intro i
20  exact (isClosed_le ((Complex.continuous_re.comp (continuous_apply i)).abs) continuous_const).inter
21    (isClosed_le ((Complex.continuous_im.comp (continuous_apply i)).abs) continuous_const)
22 
23lemma phaseSpaceUnitBox_compact (d : ℕ) : IsCompact (phaseSpaceUnitBox d) := by
24  apply (isCompact_closedBall (0 : Fin d → ℂ) 2).of_isClosed_subset
25    (phaseSpaceUnitBox_closed d)
26  intro z hz
27  rw [Metric.mem_closedBall, dist_zero_right]
28  apply (pi_norm_le_iff_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)).mpr
29  intro i
30  exact (Complex.norm_le_abs_re_add_abs_im (z i)).trans (by linarith [(hz i).1, (hz i).2])
31 
32lemma phaseSpaceUnitBox_volume_pos (d : ℕ) : 0 < volume (phaseSpaceUnitBox d) := by
33  apply Measure.measure_pos_of_nonempty_interior volume
34  refine ⟨0, mem_interior_iff_mem_nhds.mpr ?_⟩
35  apply mem_of_superset (Metric.ball_mem_nhds (0 : Fin d → ℂ) (by norm_num : (0 : ℝ) < 1))
36  intro z hz i
37  have hn : ‖z‖ < 1 := by simpa only [Metric.mem_ball, dist_zero_right] using hz
38  exact ⟨(Complex.abs_re_le_norm (z i)).trans ((norm_le_pi_norm z i).trans hn.le),
39    (Complex.abs_im_le_norm (z i)).trans ((norm_le_pi_norm z i).trans hn.le)⟩
40 
41/-- An explicit normalized flat-box prior with all measurability, positivity,
42normalization and finite-volume obligations discharged. -/
43def flatBoxDensity (d : ℕ) : PhaseSpaceDensity d :=
44  flatRegionDensity (phaseSpaceUnitBox d) (phaseSpaceUnitBox_closed d).measurableSet
45    (phaseSpaceUnitBox_volume_pos d).ne' (phaseSpaceUnitBox_compact d).measure_ne_top
46 
47/-- The actual flat-box average over all amplitudes with real and imaginary
48coordinates between `-(n+1)` and `n+1`, written by exact dilation of the unit box. -/
49theorem integral_flatBox_expandingPrior {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
50    (d n : ℕ) (f : (Fin d → ℂ) → E) (hf : Continuous f) :
51    (∫ a, f a ∂(flatBoxDensity d).expandingPrior n) =
52      (volume.real (phaseSpaceUnitBox d))⁻¹ •
53        ∫ z in phaseSpaceUnitBox d, f (((n : ℝ) + 1) • z) :=
54  integral_flatRegion_expandingPrior _ _ _ _ n f hf
55 
56/-- The physical rectangular box of amplitude radius `L`. -/
57def phaseSpaceBox (d : ℕ) (L : ℝ) : Set (Fin d → ℂ) :=
58  {z | ∀ i, |(z i).re| ≤ L ∧ |(z i).im| ≤ L}
59 
60lemma phaseSpaceBox_closed (d : ℕ) (L : ℝ) : IsClosed (phaseSpaceBox d L) := by
61  simp only [phaseSpaceBox, Set.setOf_forall]
62  apply isClosed_iInter
63  intro i
64  exact (isClosed_le ((Complex.continuous_re.comp (continuous_apply i)).abs) continuous_const).inter
65    (isClosed_le ((Complex.continuous_im.comp (continuous_apply i)).abs) continuous_const)
66 
67lemma smul_mem_phaseSpaceBox_iff {L : ℝ} (hL : 0 < L) (z : Fin d → ℂ) :
68    L • z ∈ phaseSpaceBox d L ↔ z ∈ phaseSpaceUnitBox d := by
69  have he (t : ℝ) : |L * t| ≤ L ↔ |t| ≤ 1 := by
70    rw [abs_mul, abs_of_pos hL]
71    simpa only [mul_one] using (mul_le_mul_iff_right₀ hL : L * |t| ≤ L * 1 ↔ |t| ≤ 1)
72  simp only [phaseSpaceBox, phaseSpaceUnitBox, Set.mem_setOf_eq, Pi.smul_apply,
73    Complex.smul_re, Complex.smul_im, smul_eq_mul, he]
74 
75/-- Exact Lebesgue change of variables between unit-box coordinates and the
76physical expanding box. The Jacobian is the real phase-space dimension. -/
77lemma integral_unitBox_smul {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
78    {L : ℝ} (hL : 0 < L) (f : (Fin d → ℂ) → E) :
79    (∫ z in phaseSpaceUnitBox d, f (L • z)) =
80      (L ^ Module.finrank ℝ (Fin d → ℂ))⁻¹ • ∫ z in phaseSpaceBox d L, f z := by
81  classical
82  have he : (fun z => (phaseSpaceBox d L).indicator f (L • z)) =
83      (phaseSpaceUnitBox d).indicator (fun z => f (L • z)) := by
84    funext z
85    by_cases hz : z ∈ phaseSpaceUnitBox d
86    · simp only [Set.indicator_of_mem hz,
87        Set.indicator_of_mem ((smul_mem_phaseSpaceBox_iff hL z).mpr hz)]
88    · simp only [Set.indicator_of_notMem hz,
89        Set.indicator_of_notMem (mt (smul_mem_phaseSpaceBox_iff hL z).mp hz)]
90  have h := Measure.integral_comp_smul_of_nonneg volume ((phaseSpaceBox d L).indicator f) L
91    (hR := hL.le)
92  calc
93    _ = ∫ z, (phaseSpaceUnitBox d).indicator (fun z => f (L • z)) z :=
94      (integral_indicator (phaseSpaceUnitBox_closed d).measurableSet).symm
95    _ = ∫ z, (phaseSpaceBox d L).indicator f (L • z) :=
96      (congrArg (fun g : (Fin d → ℂ) → E => ∫ z, g z) he).symm
97    _ = _ := h
98    _ = _ := congrArg (fun v : E => (L ^ Module.finrank ℝ (Fin d → ℂ))⁻¹ • v)
99      (integral_indicator (phaseSpaceBox_closed d L).measurableSet)
100 
101/-- The normalized unit-box dilation is exactly the normalized Lebesgue
102integral on the physical box, including zero quantum modes. -/
103theorem normalized_unitBox_smul_eq {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
104    {L : ℝ} (hL : 0 < L) (f : (Fin d → ℂ) → E) :
105    (volume.real (phaseSpaceUnitBox d))⁻¹ • (∫ z in phaseSpaceUnitBox d, f (L • z)) =
106      (volume.real (phaseSpaceBox d L))⁻¹ • ∫ z in phaseSpaceBox d L, f z := by
107  have hv := integral_unitBox_smul hL (fun _ : Fin d → ℂ => (1 : ℝ))
108  simp only [integral_const, Measure.restrict_apply_univ, measureReal_def,
109    smul_eq_mul, mul_one] at hv
110  have hc : (L ^ Module.finrank ℝ (Fin d → ℂ)) ≠ 0 := pow_ne_zero _ hL.ne'
111  rw [integral_unitBox_smul hL f, smul_smul]
112  congr 1
113  change (volume.real (phaseSpaceUnitBox d))⁻¹ * (L ^ Module.finrank ℝ (Fin d → ℂ))⁻¹ = _
114  change volume.real (phaseSpaceUnitBox d) =
115    (L ^ Module.finrank ℝ (Fin d → ℂ))⁻¹ * volume.real (phaseSpaceBox d L) at hv
116  rw [hv, mul_inv_rev, inv_inv]
117  rw [mul_assoc, mul_inv_cancel₀ hc, mul_one]
118 
119end Cloning.MultimodeCoherent