Exact Lean source
HybridPrior
formalization/Cloning/HybridPrior.lean
Source hash: 94d37fa069c15b223dc493c92ff5aa2e060fb29902b08aa90b91c6df5c5cbbf1
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
inductive
Cloning.Hybrid.PhaseDensitytheorem Cloning.Hybrid.PhaseDensity.integrabledefinition Cloning.Hybrid.PhaseDensity.priordefinition Cloning.Hybrid.PhaseDensity.expandingPriortheorem Cloning.Hybrid.PhaseDensity.integral_expandingPriortheorem Cloning.Hybrid.PhaseDensity.integral_expandingPrior_shiftdefinition Cloning.Hybrid.PhaseDensity.translationErrortheorem Cloning.Hybrid.PhaseDensity.translationError_nonnegtheorem Cloning.Hybrid.PhaseDensity.translationError_le_twotheorem Cloning.Hybrid.PhaseDensity.continuous_translationErrortheorem Cloning.Hybrid.PhaseDensity.translationError_zerodefinition Cloning.Hybrid.PhaseDensity.covarianceErrortheorem Cloning.Hybrid.PhaseDensity.covarianceError_nonnegtheorem Cloning.Hybrid.PhaseDensity.covarianceError_le_fourtheorem Cloning.Hybrid.PhaseDensity.continuous_covarianceErrortheorem Cloning.Hybrid.PhaseDensity.covarianceError_tendsto1import Cloning.HybridCovariantization
2import Mathlib.MeasureTheory.Function.LpSpace.ContinuousCompMeasurePreserving
3import Mathlib.MeasureTheory.Group.Integral
4import Mathlib.MeasureTheory.Group.Measure
5
6/-! Expanding genuine densities on the joint classical and quantum phase
7space. Translation error is continuous, uniformly bounded, and tends to zero. -/
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_addLeftInvariant :
17 (volume : Measure (PhaseSpace k s)).IsAddLeftInvariant :=
18 Measure.prod.instIsAddLeftInvariant
19
20structure PhaseDensity (k s : ℕ) where
21 value : PhaseSpace k s → ℝ
22 measurable : Measurable value
23 nonneg : ∀ ξ, 0 ≤ value ξ
24 integral_one : (∫ ξ, value ξ) = 1
25
26namespace PhaseDensity
27variable (p : PhaseDensity k s)
28lemma integrable : Integrable p.value := integrable_of_integral_eq_one p.integral_one
29
30def prior : Measure (PhaseSpace k s) := volume.withDensity (fun ξ => ENNReal.ofReal (p.value ξ))
31instance prior_probability : IsProbabilityMeasure p.prior := by
32 constructor
33 rw [prior, withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ]
34 rw [← ofReal_integral_eq_lintegral_ofReal p.integrable
35 (Eventually.of_forall p.nonneg), p.integral_one]
36 exact ENNReal.ofReal_one
37
38def expandingPrior (n : ℕ) : Measure (PhaseSpace k s) :=
39 p.prior.map (fun ξ => ((n : ℝ) + 1) • ξ)
40instance expandingPrior_probability (n : ℕ) : IsProbabilityMeasure (p.expandingPrior n) := by
41 unfold expandingPrior
42 exact Measure.isProbabilityMeasure_map (by fun_prop)
43
44lemma integral_expandingPrior {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
45 (n : ℕ) (f : PhaseSpace k s → E) (hf : Continuous f) :
46 (∫ ξ, f ξ ∂p.expandingPrior n) = ∫ z, p.value z • f (((n : ℝ) + 1) • z) := by
47 rw [expandingPrior, integral_map (by fun_prop) hf.aestronglyMeasurable]
48 rw [prior, integral_withDensity_eq_integral_toReal_smul p.measurable.ennreal_ofReal
49 (Eventually.of_forall (fun _ => ENNReal.ofReal_lt_top))]
50 simp only [ENNReal.toReal_ofReal (p.nonneg _)]
51
52lemma integral_expandingPrior_shift {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
53 (n : ℕ) (b : PhaseSpace k s) (f : PhaseSpace k s → E) (hf : Continuous f) :
54 (∫ ξ, f (ξ + b) ∂p.expandingPrior n) =
55 ∫ z, p.value (-(((n : ℝ) + 1)⁻¹ • b) + z) • f (((n : ℝ) + 1) • z) := by
56 rw [p.integral_expandingPrior n (fun a => f (a + b))
57 (hf.comp (continuous_id.add continuous_const))]
58 rw [← integral_add_left_eq_self
59 (fun z => p.value z • f (((n : ℝ) + 1) • z + b)) (-(((n : ℝ) + 1)⁻¹ • b))]
60 congr 1
61 funext z
62 congr 1
63 congr 1
64 have hn : (n : ℝ) + 1 ≠ 0 := ne_of_gt (by positivity)
65 rw [smul_add, smul_neg, smul_smul, mul_inv_cancel₀ hn, one_smul]
66 abel
67
68/-- Literal L¹ distance of the density from its translate. -/
69def translationError (b : PhaseSpace k s) : ℝ := ∫ z, |p.value (b + z) - p.value z|
70
71lemma translationError_nonneg (b : PhaseSpace k s) : 0 ≤ p.translationError b :=
72 integral_nonneg fun _ => abs_nonneg _
73
74lemma translationError_le_two (b : PhaseSpace k s) : p.translationError b ≤ 2 := by
75 have hi : Integrable (fun z => p.value (b + z)) :=
76 (measurePreserving_add_left volume b).integrable_comp_of_integrable p.integrable
77 have h := integral_mono (hi.sub p.integrable).abs (hi.add p.integrable) (fun z => by
78 exact (abs_sub (p.value (b + z)) (p.value z)).trans_eq
79 (by rw [abs_of_nonneg (p.nonneg _), abs_of_nonneg (p.nonneg _)]; rfl))
80 change (∫ z, |p.value (b + z) - p.value z|) ≤ ∫ z, p.value (b + z) + p.value z at h
81 rw [integral_add hi p.integrable, integral_add_left_eq_self, p.integral_one] at h
82 norm_num at h
83 exact h
84
85lemma continuous_translationError : Continuous p.translationError := by
86 let f : Lp ℝ 1 (volume : Measure (PhaseSpace k s)) := p.integrable.toL1 p.value
87 let shifts : C(PhaseSpace k s, C(PhaseSpace k s, PhaseSpace k s)) :=
88 (ContinuousMap.mk (fun z : PhaseSpace k s × PhaseSpace k s => z.1 + z.2) continuous_add).curry
89 have hm (b : PhaseSpace k s) : MeasurePreserving (shifts b) volume volume :=
90 measurePreserving_add_left volume b
91 have hc : Continuous (fun b => Lp.compMeasurePreserving (shifts b) (hm b) f) :=
92 continuous_const.compMeasurePreservingLp shifts.continuous hm (by norm_num)
93 have he (b : PhaseSpace k s) : ‖Lp.compMeasurePreserving (shifts b) (hm b) f - f‖ =
94 p.translationError b := by
95 have hi := (hm b).integrable_comp_of_integrable p.integrable
96 change ‖hi.toL1 (fun z => p.value (b + z)) - p.integrable.toL1 p.value‖ = _
97 rw [← Integrable.toL1_sub, L1.norm_of_fun_eq_integral_norm]
98 simp only [Pi.sub_apply, Real.norm_eq_abs, translationError]
99 exact (hc.sub continuous_const).norm.congr (fun b => he b)
100
101@[simp] lemma translationError_zero : p.translationError 0 = 0 := by
102 simp [translationError]
103
104/-- A uniform whole-space covariance coefficient for the actual averages. -/
105def covarianceError (n : ℕ) (b : PhaseSpace k s) : ℝ :=
106 2 * p.translationError (-(((n : ℝ) + 1)⁻¹ • b))
107
108lemma covarianceError_nonneg (n : ℕ) (b : PhaseSpace k s) : 0 ≤ p.covarianceError n b :=
109 mul_nonneg (by norm_num) (p.translationError_nonneg _)
110
111lemma covarianceError_le_four (n : ℕ) (b : PhaseSpace k s) : p.covarianceError n b ≤ 4 := by
112 unfold covarianceError
113 linarith [p.translationError_le_two (-(((n : ℝ) + 1)⁻¹ • b))]
114
115lemma continuous_covarianceError (n : ℕ) : Continuous (p.covarianceError n) :=
116 continuous_const.mul (p.continuous_translationError.comp (by fun_prop))
117
118lemma covarianceError_tendsto (b : PhaseSpace k s) :
119 Tendsto (fun n => p.covarianceError n b) atTop (𝓝 0) := by
120 have hi : Tendsto (fun n : ℕ => ((n : ℝ) + 1)⁻¹) atTop (𝓝 (0 : ℝ)) := by
121 simpa only [one_div] using (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ))
122 have hb : Tendsto (fun n : ℕ => -(((n : ℝ) + 1)⁻¹ • b)) atTop (𝓝 0) := by
123 simpa only [zero_smul, neg_zero] using (hi.smul_const b).neg
124 simpa [covarianceError] using (p.continuous_translationError.tendsto 0 |>.comp hb).const_mul 2
125
126end PhaseDensity
127end Cloning.Hybrid