Offline · exact source
Exact Lean source

MultimodeCoherent

formalization/Cloning/MultimodeCoherent.lean

Source hash: a7073e46cdc701954d0336210ba18058cedceaae7a4044b76383560c7a022d2a

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.CoherentContinuity
2import Mathlib.Analysis.Normed.Ring.InfiniteSum
3 
4/-!
5# Actual multimode complex coherent vectors
6 
7Finite products of one-mode coefficient vectors define actual vectors in the
8multimode occupation Hilbert space. Norms and inner products are proved by
9absolutely convergent finite product sums. This includes zero modes, where the
10occupation index type is a singleton and the coherent vector has coefficient one.
11-/
12 
13noncomputable section
14open scoped BigOperators InnerProductSpace ComplexOrder Topology ENNReal
15open Filter MeasureTheory
16 
17namespace Cloning.MultimodeCoherent
18 
19open Cloning Cloning.InfiniteTraceClass
20set_option backward.isDefEq.respectTransparency false
21set_option maxHeartbeats 800000
22 
23abbrev Fock (s : ℕ) := lp (fun _ : Fin s → ℕ ↦ ℂ) 2
24 
25/-- Finite tensor products of convergent complex series, with absolute
26summability supplied by finite-dimensionality of the scalar field. -/
27theorem hasSum_fin_product_complex (s : ℕ) (f : Fin s → ℕ → ℂ) (a : Fin s → ℂ)
28    (hs : ∀ i, HasSum (f i) (a i)) :
29    HasSum (fun k : Fin s → ℕ ↦ ∏ i, f i (k i)) (∏ i, a i) := by
30  induction s with
31  | zero => simp
32  | succ s ih =>
33    have ht : HasSum (fun k : Fin s → ℕ ↦ ∏ i : Fin s, f i.succ (k i))
34        (∏ i : Fin s, a i.succ) := ih (fun i ↦ f i.succ) (fun i ↦ a i.succ)
35          (fun i ↦ hs i.succ)
36    have hsum : Summable (fun k : ℕ × (Fin s → ℕ) ↦
37        f 0 k.1 * ∏ i : Fin s, f i.succ (k.2 i)) :=
38      summable_mul_of_summable_norm (f := f 0)
39        (g := fun k : Fin s → ℕ ↦ ∏ i : Fin s, f i.succ (k i))
40        (hs 0).summable.norm ht.summable.norm
41    have hm : HasSum (fun k : ℕ × (Fin s → ℕ) ↦
42        f 0 k.1 * ∏ i : Fin s, f i.succ (k.2 i)) (a 0 * ∏ i : Fin s, a i.succ) :=
43      HasSum.mul (f := f 0) (g := fun k : Fin s → ℕ ↦ ∏ i : Fin s, f i.succ (k i))
44        (s := a 0) (t := ∏ i : Fin s, a i.succ) (hs 0) ht hsum
45    rw [← (Fin.consEquiv (fun _ : Fin (s + 1) ↦ ℕ)).hasSum_iff]
46    simpa [Fin.prod_univ_succ, Fin.consEquiv, Function.comp_def] using hm
47 
48theorem product_norm_sq_hasSum {s : ℕ} (x : Fin s → ComplexCoherent.Fock) :
49    HasSum (fun k : Fin s → ℕ ↦ ‖∏ i, x i (k i)‖ ^ (2 : ℕ))
50      (∏ i, ‖x i‖ ^ (2 : ℕ)) := by
51  have hs (i : Fin s) : HasSum (fun n ↦ ‖x i n‖ ^ (2 : ℕ)) (‖x i‖ ^ (2 : ℕ)) := by
52    simpa only [ENNReal.toReal_ofNat, Real.rpow_two] using
53      lp.hasSum_norm (by norm_num : 0 < (2 : ℝ≥0∞).toReal) (x i)
54  simpa only [norm_prod, Finset.prod_pow] using
55    Thermal.hasSum_fin_product s (fun i n ↦ ‖x i n‖ ^ (2 : ℕ))
56      (fun i ↦ ‖x i‖ ^ (2 : ℕ)) (fun i n ↦ sq_nonneg _) hs
57 
58/-- The literal finite tensor product of arbitrary one-mode occupation vectors. -/
59def tensorVector {s : ℕ} (x : Fin s → ComplexCoherent.Fock) : Fock s := by
60  refine ⟨fun k ↦ ∏ i, x i (k i), memℓp_gen ?_⟩
61  simpa only [ENNReal.toReal_ofNat, Real.rpow_two] using (product_norm_sq_hasSum x).summable
62 
63@[simp] theorem tensorVector_apply {s : ℕ} (x : Fin s → ComplexCoherent.Fock)
64    (k : Fin s → ℕ) : tensorVector x k = ∏ i, x i (k i) := rfl
65 
66theorem tensorVector_norm {s : ℕ} (x : Fin s → ComplexCoherent.Fock) :
67    ‖tensorVector x‖ = ∏ i, ‖x i‖ := by
68  have hsq : ‖tensorVector x‖ ^ (2 : ℕ) = (∏ i, ‖x i‖) ^ (2 : ℕ) := by
69    calc
70      _ = ∑' k : Fin s → ℕ, ‖∏ i, x i (k i)‖ ^ (2 : ℕ) := by
71        simpa only [ENNReal.toReal_ofNat, Real.rpow_two, tensorVector_apply] using
72          lp.norm_rpow_eq_tsum (by norm_num : 0 < (2 : ℝ≥0∞).toReal) (tensorVector x)
73      _ = ∏ i, ‖x i‖ ^ (2 : ℕ) := (product_norm_sq_hasSum x).tsum_eq
74      _ = _ := Finset.prod_pow _ _ _
75  have hprod : 0 ≤ ∏ i, ‖x i‖ := Finset.prod_nonneg (fun i _ ↦ norm_nonneg _)
76  nlinarith [norm_nonneg (tensorVector x)]
77 
78/-- Exact inner-product factorization, derived from actual ℓ² coefficients. -/
79theorem inner_tensorVector {s : ℕ} (x y : Fin s → ComplexCoherent.Fock) :
80    ⟪tensorVector x, tensorVector y⟫_ℂ = ∏ i, ⟪x i, y i⟫_ℂ := by
81  rw [lp.inner_eq_tsum]
82  have he (k : Fin s → ℕ) :
83      ⟪tensorVector x k, tensorVector y k⟫_ℂ = ∏ i, ⟪x i (k i), y i (k i)⟫_ℂ := by
84    simp only [tensorVector_apply, RCLike.inner_apply, map_prod, Finset.prod_mul_distrib]
85  simp_rw [he]
86  exact (hasSum_fin_product_complex s (fun i n ↦ ⟪x i n, y i n⟫_ℂ)
87    (fun i ↦ ⟪x i, y i⟫_ℂ) (fun i ↦ lp.hasSum_inner (x i) (y i))).tsum_eq
88 
89/-- The genuine multimode coherent vector, with arbitrary complex amplitudes. -/
90def coherentVector {s : ℕ} (z : Fin s → ℂ) : Fock s :=
91  tensorVector (fun i ↦ ComplexCoherent.coherentVector (z i))
92 
93@[simp] theorem coherentVector_apply {s : ℕ} (z : Fin s → ℂ) (k : Fin s → ℕ) :
94    coherentVector z k = ∏ i, ComplexCoherent.coherentVector (z i) (k i) := rfl
95 
96theorem coherentVector_coefficients {s : ℕ} (z : Fin s → ℂ) (k : Fin s → ℕ) :
97    coherentVector z k = ∏ i, (Real.exp (-‖z i‖ ^ 2 / 2) : ℂ) * z i ^ k i /
98      (Real.sqrt ((k i).factorial : ℝ) : ℂ) := by
99  simp only [coherentVector_apply, ComplexCoherent.coherentVector_apply]
100 
101theorem coherentVector_norm {s : ℕ} (z : Fin s → ℂ) : ‖coherentVector z‖ = 1 := by
102  simp only [coherentVector, tensorVector_norm, ComplexCoherent.coherentVector_norm,
103    Finset.prod_const_one]
104 
105/-- The multimode coherent kernel is the product of the one-mode kernels. -/
106theorem inner_coherentVector {s : ℕ} (z w : Fin s → ℂ) :
107    ⟪coherentVector z, coherentVector w⟫_ℂ = ∏ i,
108      Complex.exp (((-(‖z i‖ ^ 2 + ‖w i‖ ^ 2) / 2 : ℝ) : ℂ) +
109        starRingEnd ℂ (z i) * w i) := by
110  simp only [coherentVector, inner_tensorVector, ComplexCoherent.inner_coherentVector]
111 
112/-- Norm continuity holds jointly in all amplitudes, including zero amplitudes
113and the empty tuple of modes. -/
114theorem continuous_coherentVector (s : ℕ) : Continuous (@coherentVector s) := by
115  apply continuous_iff_continuousAt.mpr
116  intro z
117  have hn (w : Fin s → ℂ) : ‖coherentVector w - coherentVector z‖ ^ 2 =
118      2 - 2 * (⟪coherentVector w, coherentVector z⟫_ℂ).re := by
119    have h := norm_sub_sq (𝕜 := ℂ) (coherentVector w) (coherentVector z)
120    simp only [coherentVector_norm, one_pow] at h
121    change ‖coherentVector w - coherentVector z‖ ^ 2 =
122      1 - 2 * (⟪coherentVector w, coherentVector z⟫_ℂ).re + 1 at h
123    linarith
124  have hs : Continuous (fun w : Fin s → ℂ ↦ ‖coherentVector w - coherentVector z‖ ^ 2) := by
125    simp_rw [hn, inner_coherentVector]
126    fun_prop
127  have ht : Tendsto (fun w : Fin s → ℂ ↦ ‖coherentVector w - coherentVector z‖ ^ 2)
128      (𝓝 z) (𝓝 (0 : ℝ)) := by
129    simpa only [sub_self, norm_zero, zero_pow (by norm_num : (2 : ℕ) ≠ 0)] using hs.tendsto z
130  apply tendsto_iff_norm_sub_tendsto_zero.mpr
131  have hroot := (Real.continuous_sqrt.tendsto 0).comp ht
132  simpa only [Function.comp_def, Real.sqrt_sq (norm_nonneg _), Real.sqrt_zero] using hroot
133 
134/-- The rank-one coherent operator as an element of the trace-class Banach space. -/
135def coherentProjector {s : ℕ} (z : Fin s → ℂ) : TraceClass (Fock s) :=
136  vectorProjector (coherentVector z)
137 
138theorem continuous_coherentProjector (s : ℕ) : Continuous (@coherentProjector s) := by
139  apply continuous_iff_continuousAt.mpr
140  intro z
141  exact vectorProjector_tendsto ((continuous_coherentVector s).tendsto z)
142 
143theorem coherentProjector_norm {s : ℕ} (z : Fin s → ℂ) : ‖coherentProjector z‖ = 1 := by
144  rw [coherentProjector, norm_vectorProjector, coherentVector_norm, one_pow]
145 
146theorem coherentProjector_trace {s : ℕ} (z : Fin s → ℂ) : traceCLM (coherentProjector z) = 1 := by
147  rw [coherentProjector, traceCLM_vectorProjector, coherentVector_norm, one_pow]
148  rfl
149 
150theorem coherentProjector_nonneg {s : ℕ} (z : Fin s → ℂ) : 0 ≤ (coherentProjector z).1 := by
151  change 0 ≤ InnerProductSpace.rankOne ℂ (coherentVector z) (coherentVector z)
152  exact (InnerProductSpace.rankOne ℂ _ _).nonneg_iff_isPositive.mpr
153    (InnerProductSpace.isPositive_rankOne_self _)
154 
155def coherentState {s : ℕ} (z : Fin s → ℂ) : DensityState (Fock s) :=
156  DensityState.pure (coherentVector z) (coherentVector_norm z)
157 
158/-- Bochner integrability in the genuine Hilbert norm under any finite measure. -/
159theorem integrable_coherentVector {s : ℕ} (μ : Measure (Fin s → ℂ)) [IsFiniteMeasure μ] :
160    Integrable coherentVector μ := by
161  apply (integrable_const (1 : ℝ)).mono' (continuous_coherentVector s).aestronglyMeasurable
162  exact Eventually.of_forall (fun z ↦ le_of_eq (coherentVector_norm z))
163 
164/-- The actual coherent density operators are Bochner integrable in trace norm. -/
165theorem integrable_coherentProjector {s : ℕ} (μ : Measure (Fin s → ℂ)) [IsFiniteMeasure μ] :
166    Integrable coherentProjector μ := by
167  apply (integrable_const (1 : ℝ)).mono' (continuous_coherentProjector s).aestronglyMeasurable
168  exact Eventually.of_forall (fun z ↦ le_of_eq (coherentProjector_norm z))
169 
170end Cloning.MultimodeCoherent