Exact Lean source
HybridFlatBox
formalization/Cloning/HybridFlatBox.lean
Source hash: 34b438a81520f5df44407818962dd4fd507944e3edfeb5c24fb9aa2ecd6e6a68
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.Hybrid.phaseSpaceBoxdefinition Cloning.Hybrid.phaseSpaceUnitBoxtheorem Cloning.Hybrid.phaseSpaceBox_closedtheorem Cloning.Hybrid.phaseSpaceBox_compacttheorem Cloning.Hybrid.phaseSpaceUnitBox_closedtheorem Cloning.Hybrid.phaseSpaceUnitBox_compacttheorem Cloning.Hybrid.phaseSpaceUnitBox_volume_postheorem Cloning.Hybrid.phaseSpaceUnitBox_volume_real_postheorem Cloning.Hybrid.phaseSpaceBox_monodefinition Cloning.Hybrid.flatBoxDensitytheorem Cloning.Hybrid.integral_flatBox_expandingPriortheorem Cloning.Hybrid.smul_mem_phaseSpaceBox_ifftheorem Cloning.Hybrid.integral_unitBox_smultheorem Cloning.Hybrid.phaseSpaceBox_volume_realtheorem Cloning.Hybrid.normalized_unitBox_smul_eq1import Cloning.HybridPrior
2import Mathlib.MeasureTheory.Measure.OpenPos
3import Mathlib.MeasureTheory.Measure.Haar.NormedSpace
4
5/-! Literal rectangular flat priors on the full joint classical and quantum
6phase space, with exact normalization and real-radius change of variables. -/
7
8noncomputable section
9open scoped Topology
10open Filter MeasureTheory
11namespace Cloning.Hybrid
12set_option backward.isDefEq.respectTransparency false
13set_option maxHeartbeats 1000000
14variable {k s : ℕ}
15
16instance phaseSpaceVolume_isAddHaarMeasure :
17 (volume : Measure (PhaseSpace k s)).IsAddHaarMeasure where
18 toIsFiniteMeasureOnCompacts := inferInstance
19 toIsAddLeftInvariant := inferInstance
20 toIsOpenPosMeasure := inferInstance
21
22/-- All classical coordinates, and real and imaginary quantum coordinates,
23lie in the same centered physical interval. -/
24def phaseSpaceBox (k s : ℕ) (L : ℝ) : Set (PhaseSpace k s) :=
25 {ξ | (∀ i, |ξ.1 i| ≤ L) ∧ (∀ j, |(ξ.2 j).re| ≤ L ∧ |(ξ.2 j).im| ≤ L)}
26
27def phaseSpaceUnitBox (k s : ℕ) : Set (PhaseSpace k s) := phaseSpaceBox k s 1
28
29theorem phaseSpaceBox_closed (k s : ℕ) (L : ℝ) : IsClosed (phaseSpaceBox k s L) := by
30 simp only [phaseSpaceBox, Set.setOf_and, Set.setOf_forall]
31 apply IsClosed.inter
32 · apply isClosed_iInter
33 intro i
34 exact isClosed_le (((continuous_apply i).comp continuous_fst).abs) continuous_const
35 · apply isClosed_iInter
36 intro j
37 exact (isClosed_le ((Complex.continuous_re.comp ((continuous_apply j).comp continuous_snd)).abs)
38 continuous_const).inter
39 (isClosed_le ((Complex.continuous_im.comp ((continuous_apply j).comp continuous_snd)).abs)
40 continuous_const)
41
42theorem phaseSpaceBox_compact (k s : ℕ) (L : ℝ) : IsCompact (phaseSpaceBox k s L) := by
43 apply (isCompact_closedBall (0 : PhaseSpace k s) (2 * |L|)).of_isClosed_subset
44 (phaseSpaceBox_closed k s L)
45 intro ξ hξ
46 rw [Metric.mem_closedBall, dist_zero_right, Prod.norm_def]
47 apply max_le
48 · apply (pi_norm_le_iff_of_nonneg (by positivity : 0 ≤ 2 * |L|)).mpr
49 intro i
50 rw [Real.norm_eq_abs]
51 exact (hξ.1 i).trans (by linarith [le_abs_self L, abs_nonneg L])
52 · apply (pi_norm_le_iff_of_nonneg (by positivity : 0 ≤ 2 * |L|)).mpr
53 intro j
54 exact (Complex.norm_le_abs_re_add_abs_im (ξ.2 j)).trans
55 (by linarith [(hξ.2 j).1, (hξ.2 j).2, le_abs_self L])
56
57theorem phaseSpaceUnitBox_closed (k s : ℕ) : IsClosed (phaseSpaceUnitBox k s) :=
58 phaseSpaceBox_closed k s 1
59
60theorem phaseSpaceUnitBox_compact (k s : ℕ) : IsCompact (phaseSpaceUnitBox k s) :=
61 phaseSpaceBox_compact k s 1
62
63theorem phaseSpaceUnitBox_volume_pos (k s : ℕ) : 0 < volume (phaseSpaceUnitBox k s) := by
64 apply Measure.measure_pos_of_nonempty_interior volume
65 refine ⟨0, mem_interior_iff_mem_nhds.mpr ?_⟩
66 apply mem_of_superset (Metric.ball_mem_nhds (0 : PhaseSpace k s) (by norm_num : (0 : ℝ) < 1))
67 intro ξ hξ
68 have hn : ‖ξ‖ < 1 := by simpa only [Metric.mem_ball, dist_zero_right] using hξ
69 constructor
70 · intro i
71 exact (show |ξ.1 i| = ‖ξ.1 i‖ from (Real.norm_eq_abs _).symm).le.trans
72 ((norm_le_pi_norm ξ.1 i).trans ((norm_fst_le ξ).trans hn.le))
73 · intro j
74 have hq := (norm_le_pi_norm ξ.2 j).trans ((norm_snd_le ξ).trans hn.le)
75 exact ⟨(Complex.abs_re_le_norm _).trans hq, (Complex.abs_im_le_norm _).trans hq⟩
76
77theorem phaseSpaceUnitBox_volume_real_pos (k s : ℕ) :
78 0 < volume.real (phaseSpaceUnitBox k s) :=
79 ENNReal.toReal_pos (phaseSpaceUnitBox_volume_pos k s).ne'
80 (phaseSpaceUnitBox_compact k s).measure_ne_top
81
82theorem phaseSpaceBox_mono {L M : ℝ} (h : L ≤ M) :
83 phaseSpaceBox k s L ⊆ phaseSpaceBox k s M := by
84 intro ξ hξ
85 exact ⟨fun i => (hξ.1 i).trans h,
86 fun j => ⟨(hξ.2 j).1.trans h, (hξ.2 j).2.trans h⟩⟩
87
88/-- A concrete normalized flat probability density on the joint unit box. -/
89def flatBoxDensity (k s : ℕ) : PhaseDensity k s where
90 value := (phaseSpaceUnitBox k s).indicator (fun _ => (volume.real (phaseSpaceUnitBox k s))⁻¹)
91 measurable := measurable_const.indicator (phaseSpaceUnitBox_closed k s).measurableSet
92 nonneg := fun ξ => Set.indicator_nonneg (fun _ _ => inv_nonneg.mpr measureReal_nonneg) ξ
93 integral_one := by
94 rw [integral_indicator (phaseSpaceUnitBox_closed k s).measurableSet, integral_const]
95 simp only [measureReal_restrict_apply_univ, smul_eq_mul]
96 exact mul_inv_cancel₀ (phaseSpaceUnitBox_volume_real_pos k s).ne'
97
98theorem integral_flatBox_expandingPrior {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
99 (k s n : ℕ) (f : PhaseSpace k s → E) (hf : Continuous f) :
100 (∫ ξ, f ξ ∂(flatBoxDensity k s).expandingPrior n) =
101 (volume.real (phaseSpaceUnitBox k s))⁻¹ •
102 ∫ z in phaseSpaceUnitBox k s, f (((n : ℝ) + 1) • z) := by
103 rw [(flatBoxDensity k s).integral_expandingPrior n f hf]
104 change (∫ z, ((phaseSpaceUnitBox k s).indicator
105 (fun _ => (volume.real (phaseSpaceUnitBox k s))⁻¹) z) • f (((n : ℝ) + 1) • z)) = _
106 rw [← integral_smul]
107 rw [← integral_indicator (phaseSpaceUnitBox_closed k s).measurableSet]
108 congr 1
109 funext z
110 by_cases hz : z ∈ phaseSpaceUnitBox k s <;> simp [hz]
111
112theorem smul_mem_phaseSpaceBox_iff {L : ℝ} (hL : 0 < L) (ξ : PhaseSpace k s) :
113 L • ξ ∈ phaseSpaceBox k s L ↔ ξ ∈ phaseSpaceUnitBox k s := by
114 have he (t : ℝ) : |L * t| ≤ L ↔ |t| ≤ 1 := by
115 rw [abs_mul, abs_of_pos hL]
116 simpa only [mul_one] using
117 (mul_le_mul_iff_right₀ hL : L * |t| ≤ L * 1 ↔ |t| ≤ 1)
118 simp only [phaseSpaceBox, phaseSpaceUnitBox, Set.mem_setOf_eq, Prod.smul_fst, Prod.smul_snd,
119 Pi.smul_apply, Complex.smul_re, Complex.smul_im, smul_eq_mul, he]
120
121/-- Exact Jacobian for joint real classical and complex quantum coordinates. -/
122theorem integral_unitBox_smul {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
123 {L : ℝ} (hL : 0 < L) (f : PhaseSpace k s → E) :
124 (∫ z in phaseSpaceUnitBox k s, f (L • z)) =
125 (L ^ Module.finrank ℝ (PhaseSpace k s))⁻¹ •
126 ∫ z in phaseSpaceBox k s L, f z := by
127 classical
128 have he : (fun z => (phaseSpaceBox k s L).indicator f (L • z)) =
129 (phaseSpaceUnitBox k s).indicator (fun z => f (L • z)) := by
130 funext z
131 by_cases hz : z ∈ phaseSpaceUnitBox k s
132 · simp only [Set.indicator_of_mem hz,
133 Set.indicator_of_mem ((smul_mem_phaseSpaceBox_iff hL z).mpr hz)]
134 · simp only [Set.indicator_of_notMem hz,
135 Set.indicator_of_notMem (mt (smul_mem_phaseSpaceBox_iff hL z).mp hz)]
136 have h := Measure.integral_comp_smul_of_nonneg volume ((phaseSpaceBox k s L).indicator f) L
137 (hR := hL.le)
138 calc
139 _ = ∫ z, (phaseSpaceUnitBox k s).indicator (fun z => f (L • z)) z :=
140 (integral_indicator (phaseSpaceUnitBox_closed k s).measurableSet).symm
141 _ = ∫ z, (phaseSpaceBox k s L).indicator f (L • z) :=
142 (congrArg (fun g : PhaseSpace k s → E => ∫ z, g z) he).symm
143 _ = _ := h
144 _ = _ := congrArg (fun v : E => (L ^ Module.finrank ℝ (PhaseSpace k s))⁻¹ • v)
145 (integral_indicator (phaseSpaceBox_closed k s L).measurableSet)
146
147theorem phaseSpaceBox_volume_real {L : ℝ} (hL : 0 < L) :
148 volume.real (phaseSpaceBox k s L) =
149 L ^ Module.finrank ℝ (PhaseSpace k s) * volume.real (phaseSpaceUnitBox k s) := by
150 have hv := integral_unitBox_smul hL (fun _ : PhaseSpace k s => (1 : ℝ))
151 simp only [integral_const, Measure.restrict_apply_univ, measureReal_def, smul_eq_mul, mul_one] at hv
152 change volume.real (phaseSpaceUnitBox k s) =
153 (L ^ Module.finrank ℝ (PhaseSpace k s))⁻¹ * volume.real (phaseSpaceBox k s L) at hv
154 rw [hv, ← mul_assoc, mul_inv_cancel₀ (pow_ne_zero _ hL.ne'), one_mul]
155
156theorem normalized_unitBox_smul_eq {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
157 {L : ℝ} (hL : 0 < L) (f : PhaseSpace k s → E) :
158 (volume.real (phaseSpaceUnitBox k s))⁻¹ • (∫ z in phaseSpaceUnitBox k s, f (L • z)) =
159 (volume.real (phaseSpaceBox k s L))⁻¹ • ∫ z in phaseSpaceBox k s L, f z := by
160 rw [integral_unitBox_smul hL f, smul_smul, phaseSpaceBox_volume_real hL, mul_inv_rev]
161
162end Cloning.Hybrid