Offline · exact source
Exact Lean source

ComplexCoherent

formalization/Cloning/ComplexCoherent.lean

Source hash: a9e9e3b20fcfdb4e1749d9c519119d4a587b923e1343e2fe7095b2438ebacfe0

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.ComplexCoherent.Fockdefinition Cloning.ComplexCoherent.phaseVectortheorem Cloning.ComplexCoherent.phaseVector_applytheorem Cloning.ComplexCoherent.phaseVector_normdefinition Cloning.ComplexCoherent.phaseIsometrytheorem Cloning.ComplexCoherent.phaseIsometry_applydefinition Cloning.ComplexCoherent.phasetheorem Cloning.ComplexCoherent.phase_normtheorem Cloning.ComplexCoherent.phase_mul_normtheorem Cloning.ComplexCoherent.phase_pow_normdefinition Cloning.ComplexCoherent.numberPhasetheorem Cloning.ComplexCoherent.numberPhase_applydefinition Cloning.ComplexCoherent.coherentVectortheorem Cloning.ComplexCoherent.coherentVector_applytheorem Cloning.ComplexCoherent.coherentVector_normdefinition Cloning.ComplexCoherent.productVectortheorem Cloning.ComplexCoherent.productVector_normtheorem Cloning.ComplexCoherent.productVector_tendsto_coherentVectortheorem Cloning.ComplexCoherent.product_projector_tendstodefinition Cloning.ComplexCoherent.finiteProductVectortheorem Cloning.ComplexCoherent.restrict_productVectordefinition Cloning.ComplexCoherent.productTensortheorem Cloning.ComplexCoherent.productTensor_normtheorem Cloning.ComplexCoherent.productTensor_phasetheorem Cloning.ComplexCoherent.phase_mul_scaled_radiustheorem Cloning.ComplexCoherent.productTensor_applydefinition Cloning.ComplexCoherent.embeddedCoherenttheorem Cloning.ComplexCoherent.embeddedCoherent_sub_productTensor_letheorem Cloning.ComplexCoherent.embeddedCoherent_sub_productTensor_tendstotheorem Cloning.ComplexCoherent.productVector_eq_zero_of_lttheorem Cloning.ComplexCoherent.occupationChannel_coherent_product_tendsto
1import Cloning.OccupationChannel
2 
3/-! Arbitrary complex coherent amplitudes via genuine phase isometries on ℓ².
4Normalization and binomial approximation are derived from the proved radial
5probability laws, including zero amplitude. -/
6 
7noncomputable section
8open scoped BigOperators InnerProductSpace Topology
9open Filter
10 
11namespace Cloning.ComplexCoherent
12set_option maxHeartbeats 800000
13set_option backward.isDefEq.respectTransparency false
14 
15abbrev Fock := lp (fun _ : ℕ => ℂ) 2
16 
17variable {ι : Type*}
18 
19/-- Multiplication by coordinate phases as an actual ℓ² vector. -/
20def phaseVector (u : ι → ℂ) (hu : ∀ i, ‖u i‖ = 1)
21    (x : lp (fun _ : ι => ℂ) 2) : lp (fun _ : ι => ℂ) 2 := by
22  refine ⟨fun i => u i * x i, memℓp_gen ?_⟩
23  simpa only [norm_mul, hu, one_mul] using (lp.memℓp x).summable (by norm_num)
24 
25@[simp] theorem phaseVector_apply (u : ι → ℂ) (hu : ∀ i, ‖u i‖ = 1)
26    (x : lp (fun _ : ι => ℂ) 2) (i : ι) : phaseVector u hu x i = u i * x i := rfl
27 
28theorem phaseVector_norm (u : ι → ℂ) (hu : ∀ i, ‖u i‖ = 1)
29    (x : lp (fun _ : ι => ℂ) 2) : ‖phaseVector u hu x‖ = ‖x‖ := by
30  rw [lp.norm_eq_tsum_rpow (by norm_num), lp.norm_eq_tsum_rpow (by norm_num)]
31  simp only [phaseVector_apply, norm_mul, hu, one_mul]
32 
33/-- Coordinate phases define a complex-linear isometry, rather than merely a
34coefficient transformation preserving a formally assigned norm. -/
35def phaseIsometry (u : ι → ℂ) (hu : ∀ i, ‖u i‖ = 1) :
36    lp (fun _ : ι => ℂ) 2 →ₗᵢ[ℂ] lp (fun _ : ι => ℂ) 2 where
37  toLinearMap :=
38    { toFun := phaseVector u hu
39      map_add' := by intro x y; ext i; simp [mul_add]
40      map_smul' := by intro c x; ext i; simp [mul_left_comm] }
41  norm_map' := phaseVector_norm u hu
42 
43@[simp] theorem phaseIsometry_apply (u : ι → ℂ) (hu : ∀ i, ‖u i‖ = 1)
44    (x : lp (fun _ : ι => ℂ) 2) (i : ι) : phaseIsometry u hu x i = u i * x i := rfl
45 
46/-- The phase of zero is chosen to be one, making all coefficients total. -/
47def phase (z : ℂ) : ℂ := if z = 0 then 1 else z / (‖z‖ : ℂ)
48 
49theorem phase_norm (z : ℂ) : ‖phase z‖ = 1 := by
50  by_cases hz : z = 0
51  · simp [phase, hz]
52  · simp [phase, hz, Complex.norm_real, norm_ne_zero_iff.mpr hz]
53 
54theorem phase_mul_norm (z : ℂ) : phase z * (‖z‖ : ℂ) = z := by
55  by_cases hz : z = 0
56  · simp [phase, hz]
57  · simp only [phase, if_neg hz]
58    exact div_mul_cancel₀ z (Complex.ofReal_ne_zero.mpr (norm_ne_zero_iff.mpr hz))
59 
60theorem phase_pow_norm (z : ℂ) (n : ℕ) : phase z ^ n * (‖z‖ : ℂ) ^ n = z ^ n := by
61  rw [← mul_pow, phase_mul_norm]
62 
63def numberPhase (z : ℂ) : Fock →ₗᵢ[ℂ] Fock :=
64  phaseIsometry (fun n => phase z ^ n) (fun n => by rw [norm_pow, phase_norm, one_pow])
65 
66@[simp] theorem numberPhase_apply (z : ℂ) (x : Fock) (n : ℕ) :
67    numberPhase z x n = phase z ^ n * x n := rfl
68 
69open Cloning.CoherentCoefficients
70 
71/-- The normalized coherent vector for an arbitrary complex amplitude. -/
72def coherentVector (z : ℂ) : Fock :=
73  numberPhase z (Cloning.CoherentCoefficients.coherentVector (‖z‖ ^ 2) (sq_nonneg _))
74 
75/-- The familiar exponential/power/factorial coefficients, valid also at zero. -/
76theorem coherentVector_apply (z : ℂ) (n : ℕ) :
77    coherentVector z n = (Real.exp (-‖z‖ ^ 2 / 2) : ℂ) * z ^ n /
78      (Real.sqrt (n.factorial : ℝ) : ℂ) := by
79  rw [coherentVector, numberPhase_apply, Cloning.CoherentCoefficients.coherentVector_apply,
80    Real.sqrt_sq (norm_nonneg z)]
81  simp only [Complex.ofReal_div, Complex.ofReal_mul, Complex.ofReal_pow]
82  calc
83    _ = (Real.exp (-‖z‖ ^ 2 / 2) : ℂ) * (phase z ^ n * (‖z‖ : ℂ) ^ n) /
84        (Real.sqrt (n.factorial : ℝ) : ℂ) := by ring
85    _ = _ := by rw [phase_pow_norm]
86 
87theorem coherentVector_norm (z : ℂ) : ‖coherentVector z‖ = 1 := by
88  rw [coherentVector, LinearIsometry.norm_map]
89  exact Cloning.CoherentCoefficients.coherentVector_norm _ _
90 
91/-- The normalized padded binomial approximation with its full complex phase. -/
92def productVector (z : ℂ) (L : ℕ) : Fock :=
93  numberPhase z (Cloning.CoherentCoefficients.productVector (‖z‖ ^ 2) (sq_nonneg _) L)
94 
95theorem productVector_norm (z : ℂ) (L : ℕ) : ‖productVector z L‖ = 1 := by
96  rw [productVector, LinearIsometry.norm_map]
97  exact Cloning.CoherentCoefficients.productVector_norm _ _ _
98 
99theorem productVector_tendsto_coherentVector (z : ℂ) :
100    Tendsto (productVector z) atTop (𝓝 (coherentVector z)) :=
101  (numberPhase z).continuous.tendsto _ |>.comp
102    (Cloning.CoherentCoefficients.productVector_tendsto_coherentVector (‖z‖ ^ 2) (sq_nonneg _))
103 
104theorem product_projector_tendsto (z : ℂ) :
105    Tendsto (fun L => Cloning.InfiniteTraceClass.vectorProjector (productVector z L)) atTop
106      (𝓝 (Cloning.InfiniteTraceClass.vectorProjector (coherentVector z))) :=
107  Cloning.InfiniteTraceClass.vectorProjector_tendsto (productVector_tendsto_coherentVector z)
108 
109open SymmetricOccupation
110 
111/-- The finite occupation vector with the same complex binomial amplitudes. -/
112def finiteProductVector (z : ℂ) (L : ℕ) : OccupationSpace L :=
113  phaseIsometry (fun j : Fin (L + 1) => phase z ^ j.val)
114    (fun j => by rw [norm_pow, phase_norm, one_pow])
115    (SymmetricOccupation.finiteProductVector (‖z‖ ^ 2) (sq_nonneg _) L)
116 
117theorem restrict_productVector (z : ℂ) (L : ℕ) :
118    restrict L (productVector z L) = finiteProductVector z L := by
119  ext j
120  rfl
121 
122/-- An actual normalized vector in the finite computational tensor space. -/
123def productTensor (z : ℂ) (L : ℕ) : TensorSpace L :=
124  SymmetricOccupation.isometry L (finiteProductVector z L)
125 
126theorem productTensor_norm (z : ℂ) (L : ℕ) : ‖productTensor z L‖ = 1 := by
127  rw [productTensor, LinearIsometry.norm_map, finiteProductVector, LinearIsometry.norm_map]
128  exact Cloning.CoherentCoefficients.amplitudeVector_norm _ _ _
129 
130theorem productTensor_phase (z : ℂ) (L : ℕ) (S : Finset (Fin L)) :
131    productTensor z L S = phase z ^ S.card *
132      SymmetricOccupation.productTensor (‖z‖ ^ 2) (sq_nonneg _) L S := by
133  rw [productTensor, SymmetricOccupation.productTensor, SymmetricOccupation.isometry_apply,
134    SymmetricOccupation.isometry_apply]
135  simp only [finiteProductVector, phaseIsometry_apply]
136  ring
137 
138lemma phase_mul_scaled_radius (z : ℂ) (L : ℕ) :
139    phase z * (Real.sqrt (‖z‖ ^ 2 / L) : ℂ) = z / (Real.sqrt (L : ℝ) : ℂ) := by
140  rw [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq (norm_nonneg z)]
141  push_cast
142  rw [← mul_div_assoc, phase_mul_norm]
143 
144/-- Literal coefficients of the normalized product
145`(|0⟩ + z/√L |1⟩)^⊗L`, including the zero-length convention. -/
146theorem productTensor_apply (z : ℂ) (L : ℕ) (S : Finset (Fin L)) :
147    productTensor z L S = (z / (Real.sqrt (L : ℝ) : ℂ)) ^ S.card /
148      (Real.sqrt (1 + ‖z‖ ^ 2 / L) : ℂ) ^ L := by
149  rw [productTensor_phase, SymmetricOccupation.productTensor_apply]
150  push_cast
151  rw [← mul_div_assoc, ← mul_pow, phase_mul_scaled_radius]
152 
153/-- The actual occupation embedding of the truncated complex coherent vector. -/
154def embeddedCoherent (z : ℂ) (L : ℕ) : TensorSpace L :=
155  SymmetricOccupation.isometry L (restrict L (coherentVector z))
156 
157theorem embeddedCoherent_sub_productTensor_le (z : ℂ) (L : ℕ) :
158    ‖embeddedCoherent z L - productTensor z L‖ ≤ ‖coherentVector z - productVector z L‖ := by
159  rw [embeddedCoherent, productTensor, ← restrict_productVector, ← map_sub,
160    LinearIsometry.norm_map, ← restrict_sub]
161  exact restrict_norm_le _ _
162 
163theorem embeddedCoherent_sub_productTensor_tendsto (z : ℂ) :
164    Tendsto (fun L => ‖embeddedCoherent z L - productTensor z L‖) atTop (𝓝 0) := by
165  apply squeeze_zero (fun L => norm_nonneg _) (embeddedCoherent_sub_productTensor_le z)
166  simpa using ((productVector_tendsto_coherentVector z).const_sub (coherentVector z)).norm
167 
168/-- The binomial vector is supported in exactly the retained occupations. -/
169theorem productVector_eq_zero_of_lt (z : ℂ) (L j : ℕ) (hLj : L < j) :
170    productVector z L j = 0 := by
171  simp only [productVector, numberPhase_apply, Cloning.CoherentCoefficients.productVector,
172    amplitudeVector_apply, Cloning.PoissonApproximation.binomialWeight_eq_zero_of_lt _ hLj,
173    Real.sqrt_zero, Complex.ofReal_zero, mul_zero]
174 
175/-- The actual occupation channel sends any complex coherent vector to its
176normalized finite computational product approximation in genuine trace norm. -/
177theorem occupationChannel_coherent_product_tendsto (z : ℂ) :
178    Tendsto (fun L => ‖(SymmetricOccupation.occupationChannel L).toLinearMap
179      (Cloning.InfiniteTraceClass.vectorProjector (coherentVector z)) -
180        Cloning.InfiniteTraceClass.vectorProjector (productTensor z L)‖) atTop (𝓝 0) := by
181  have hb (L : ℕ) : ‖(SymmetricOccupation.occupationChannel L).toLinearMap
182      (Cloning.InfiniteTraceClass.vectorProjector (coherentVector z)) -
183        Cloning.InfiniteTraceClass.vectorProjector (productTensor z L)‖ ≤
184      2 * ‖coherentVector z - productVector z L‖ := by
185    have h := SymmetricOccupation.occupationChannel_pure_distance_le L
186      (coherentVector z) (productVector z L)
187      (SymmetricOccupation.restrict_norm_eq_of_support L (productVector z L)
188        (fun j hj => productVector_eq_zero_of_lt z L j hj))
189    simpa only [coherentVector_norm, productVector_norm, show (1 : ℝ) + 1 = 2 by norm_num,
190      SymmetricOccupation.compression_apply, restrict_productVector, productTensor] using h
191  apply squeeze_zero (fun L => norm_nonneg _) hb
192  simpa using (((productVector_tendsto_coherentVector z).const_sub (coherentVector z)).norm).const_mul 2
193 
194end Cloning.ComplexCoherent