Offline · exact source
Exact Lean source

WeylFlatPrior

formalization/Cloning/WeylFlatPrior.lean

Source hash: 7f30b7e8b80bcab629f07ea4caf8ce67b59776bf03cbbdafbfe5e432829d5ae9

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.WeylFoelner
2 
3/-! Expanding flat priors on arbitrary finite positive-volume phase-space
4regions. The Følner property is derived from L1 translation continuity, so it
5applies in particular to boxes and requires no assumed boundary estimate. -/
6noncomputable section
7open scoped ComplexOrder BigOperators Topology
8open Filter MeasureTheory
9namespace Cloning.MultimodeCoherent
10open Cloning.InfiniteTraceClass
11set_option backward.isDefEq.respectTransparency false
12set_option maxHeartbeats 1000000
13variable {d : ℕ}
14 
15/-- An actual nonnegative unit-mass phase-space density. -/
16structure PhaseSpaceDensity (d : ℕ) where
17  value : (Fin d → ℂ) → ℝ
18  measurable : Measurable value
19  nonneg : ∀ a, 0 ≤ value a
20  integral_one : (∫ a, value a) = 1
21 
22namespace PhaseSpaceDensity
23variable (p : PhaseSpaceDensity d)
24 
25lemma integrable : Integrable p.value := integrable_of_integral_eq_one p.integral_one
26 
27def prior : Measure (Fin d → ℂ) := volume.withDensity (fun a => ENNReal.ofReal (p.value a))
28 
29instance prior_probability : IsProbabilityMeasure p.prior := by
30  constructor
31  rw [prior, withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ]
32  rw [← ofReal_integral_eq_lintegral_ofReal p.integrable
33    (Eventually.of_forall p.nonneg), p.integral_one]
34  exact ENNReal.ofReal_one
35 
36def expandingPrior (n : ℕ) : Measure (Fin d → ℂ) :=
37  p.prior.map (fun a => ((n : ℝ) + 1) • a)
38 
39instance expandingPrior_probability (n : ℕ) : IsProbabilityMeasure (p.expandingPrior n) := by
40  unfold expandingPrior
41  exact Measure.isProbabilityMeasure_map (by fun_prop)
42 
43lemma integral_expandingPrior {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
44    (n : ℕ) (f : (Fin d → ℂ) → E) (hf : Continuous f) :
45    (∫ a, f a ∂p.expandingPrior n) =
46      ∫ 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 : Fin d → ℂ) (f : (Fin d → ℂ) → E) (hf : Continuous f) :
54    (∫ a, f (a + 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 
68lemma translation_error_tendsto (b : Fin d → ℂ) :
69    Tendsto (fun n : ℕ => ∫ x, |p.value (-(((n : ℝ) + 1)⁻¹ • b) + x) - p.value x|)
70      atTop (𝓝 0) := by
71  have hi : Tendsto (fun n : ℕ => ((n : ℝ) + 1)⁻¹) atTop (𝓝 (0 : ℝ)) := by
72    simpa only [one_div] using (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ))
73  have h' : Tendsto (fun n : ℕ => -(((n : ℝ) + 1)⁻¹ • b)) atTop (𝓝 0) := by
74    simpa only [zero_smul, neg_zero] using (hi.smul_const b).neg
75  exact (integral_abs_translate_sub_tendsto p.value p.integrable).comp h'
76 
77/-- Actual CPTP averages under the chosen expanding density. -/
78def foelnerChannel (gain : ℝ) (Φ : QuantumChannel (Fock d) (Fock d))
79    (n : ℕ) : QuantumChannel (Fock d) (Fock d) := covariantAverage (p.expandingPrior n) gain Φ
80 
81lemma foelnerChannel_covariance_bound (gain : ℝ) (Φ : QuantumChannel (Fock d) (Fock d))
82    (b : Fin d → ℂ) (A : TraceClass (Fock d)) (hA : 0 ≤ A.1) (n : ℕ) :
83    ‖(p.foelnerChannel gain Φ n).toLinearMap (displacementTraceMap b A) -
84      displacementTraceMap (gain • b) ((p.foelnerChannel gain Φ n).toLinearMap A)‖ ≤
85      ‖A‖ * ∫ z, |p.value (-(((n : ℝ) + 1)⁻¹ • b) + z) - p.value z| := by
86  let f : (Fin d → ℂ) → TraceClass (Fock d) :=
87    fun a => (translatedChannel gain Φ a).toLinearMap A
88  have hf : Continuous f := continuous_translatedChannel gain Φ A
89  change ‖(covariantAverage (p.expandingPrior n) gain Φ).toLinearMap
90    (displacementTraceMap b A) - displacementTraceMap (gain • b)
91      ((covariantAverage (p.expandingPrior n) gain Φ).toLinearMap A)‖ ≤ _
92  rw [covariantAverage_shift, ← map_sub, displacementTraceMap_norm]
93  change ‖(∫ a, f (a + b) ∂p.expandingPrior n) - (∫ a, f a ∂p.expandingPrior n)‖ ≤ _
94  rw [p.integral_expandingPrior_shift n b f hf, p.integral_expandingPrior n f hf]
95  apply weighted_integral_difference_le
96  · exact hf.comp (by fun_prop)
97  · intro a
98    exact (translatedChannel gain Φ (((n : ℝ) + 1) • a)).toPositiveTracePreservingMap.norm_map_of_nonneg A hA
99  · exact (measurePreserving_add_left volume (-(((n : ℝ) + 1)⁻¹ • b))).integrable_comp_of_integrable
100      p.integrable
101  · exact p.integrable
102 
103end PhaseSpaceDensity
104 
105/-- The literal uniform Lebesgue density on a measurable finite-volume region.
106Regions can be boxes, balls, or any other measurable set of positive finite volume. -/
107def flatRegionDensity (s : Set (Fin d → ℂ)) (hs : MeasurableSet s)
108    (hs0 : volume s ≠ 0) (hsf : volume s ≠ ⊤) : PhaseSpaceDensity d where
109  value := s.indicator (fun _ => (volume.real s)⁻¹)
110  measurable := measurable_const.indicator hs
111  nonneg := fun a => Set.indicator_nonneg (fun _ _ => inv_nonneg.mpr measureReal_nonneg) a
112  integral_one := by
113    rw [integral_indicator_const _ hs, smul_eq_mul,
114      mul_inv_cancel₀ ((measureReal_ne_zero_iff hsf).mpr hs0)]
115 
116/-- Integrating the flat prior is exactly the normalized flat-region payoff.
117The dilation `n+1` turns the fixed reference region into an expanding window. -/
118theorem integral_flatRegion_expandingPrior {E : Type*} [NormedAddCommGroup E]
119    [NormedSpace ℝ E] (s : Set (Fin d → ℂ)) (hs : MeasurableSet s)
120    (hs0 : volume s ≠ 0) (hsf : volume s ≠ ⊤)
121    (n : ℕ) (f : (Fin d → ℂ) → E) (hf : Continuous f) :
122    (∫ a, f a ∂(flatRegionDensity s hs hs0 hsf).expandingPrior n) =
123      (volume.real s)⁻¹ • ∫ z in s, f (((n : ℝ) + 1) • z) := by
124  rw [PhaseSpaceDensity.integral_expandingPrior _ n f hf]
125  change (∫ z, s.indicator (fun _ => (volume.real s)⁻¹) z •
126    f (((n : ℝ) + 1) • z)) = _
127  rw [show (fun z => s.indicator (fun _ => (volume.real s)⁻¹) z •
128      f (((n : ℝ) + 1) • z)) =
129    s.indicator (fun z => (volume.real s)⁻¹ • f (((n : ℝ) + 1) • z)) by
130      funext z
131      by_cases hz : z ∈ s <;> simp [hz]]
132  rw [integral_indicator hs, integral_smul]
133 
134end Cloning.MultimodeCoherent