Offline · exact source
Exact Lean source

ThermalNearPure

formalization/Cloning/ThermalNearPure.lean

Source hash: 163b1547bee566d5c3d71ba7cd3e5cb267091720e6f3d04316f9198c1285a3dc

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.

In the dependency map: Small errors

Declarations in this module
1import Cloning.Thermal
2import Mathlib.Analysis.Asymptotics.Lemmas
3 
4/-! The two-scale crossover to the pure-state loss. Unlike fixed-spectrum
5Taylor expansions, the mode ratio is allowed to approach zero faster than
6the positive gain increment. -/
7noncomputable section
8open scoped Topology
9open Filter Asymptotics
10namespace Cloning.Thermal
11set_option maxHeartbeats 500000
12 
13private theorem scaled_root_tendsto {q : ℝ→ℝ}
14    (hq0 : ∀ᶠ δ in 𝓝[>] (0:ℝ),0≤q δ)
15    (hq : q =o[𝓝[>] (0:ℝ)] (fun δ=>δ)) :
16    Tendsto (fun δ=>Real.sqrt (q δ*(δ+q δ))/δ) (𝓝[>] (0:ℝ)) (𝓝 0) := by
17  have hr := hq.tendsto_div_nhds_zero
18  have h := (hr.mul (hr.const_add 1)).sqrt
19  simp only [zero_mul,Real.sqrt_zero] at h
20  apply h.congr'
21  filter_upwards [hq0,self_mem_nhdsWithin] with δ hqδ hδ
22  have hδ0 : 0<δ := hδ
23  symm
24  calc
25    Real.sqrt (q δ*(δ+q δ))/δ = Real.sqrt (q δ*(δ+q δ)/δ^2) := by
26      rw [Real.sqrt_div (mul_nonneg hqδ (by linarith)),Real.sqrt_sq hδ0.le]
27    _ = _ := by congr 1; field_simp <;> ring
28 
29/-- In the regime q=o(δ), the squared one-mode factor agrees with pure-state
30squared fidelity up to o(δ). Nonnegativity is only required eventually. -/
31theorem modeFactor_near_pure {q : ℝ→ℝ}
32    (hq0 : ∀ᶠ δ in 𝓝[>] (0:ℝ),0≤q δ)
33    (hq : q =o[𝓝[>] (0:ℝ)] (fun δ=>δ)) :
34    (fun δ=>modeFactor (1+δ) (q δ)^2-(1+δ)⁻¹)
35      =o[𝓝[>] (0:ℝ)] (fun δ=>δ) := by
36  have hid : Tendsto (fun δ:ℝ=>δ) (𝓝[>] (0:ℝ)) (𝓝 0) := nhdsWithin_le_nhds
37  have hqz := hq.tendsto_zero_of_tendsto hid
38  have hr := hq.tendsto_div_nhds_zero
39  have hg : Tendsto (fun δ:ℝ=>1+δ) (𝓝[>] (0:ℝ)) (𝓝 1) := by
40    simpa using hid.const_add 1
41  have hs := scaled_root_tendsto hq0 hq
42  have hb : Tendsto (fun δ:ℝ=>Real.sqrt (1+δ)/(1+δ)) (𝓝[>] (0:ℝ)) (𝓝 1) := by
43    simpa using hg.sqrt.div hg (by norm_num : (1:ℝ)≠0)
44  have hm : Tendsto (fun δ=>modeFactor (1+δ) (q δ)) (𝓝[>] (0:ℝ)) (𝓝 1) := by
45    have h := (modeFactor_continuousAt (g:=1) (q:=0) (by norm_num)).tendsto.comp (hg.prodMk_nhds hqz)
46    simpa [modeFactor,Function.comp_def] using h
47  have hd := ((hg.mul hs).sub (hg.sqrt.mul hr)).div (hg.mul (hg.add hqz)) (by norm_num : (1:ℝ)*(1+0)≠0)
48  simp only [one_mul,mul_zero,sub_zero,zero_div] at hd
49  have hd' : Tendsto (fun δ=>(modeFactor (1+δ) (q δ)-Real.sqrt (1+δ)/(1+δ))/δ)
50      (𝓝[>] (0:ℝ)) (𝓝 0) := by
51    apply hd.congr'
52    filter_upwards [hq0,self_mem_nhdsWithin] with δ hqδ hδ
53    have hδ0 : 0<δ := hδ
54    have hg0 : 0<1+δ := by linarith
55    have hden : 0<1+δ+q δ := by linarith
56    dsimp only [modeFactor,Pi.div_apply]
57    have he : 1+δ-1+q δ=δ+q δ := by ring
58    rw [he]
59    field_simp [hδ0.ne',hg0.ne',hden.ne']
60    <;> ring
61  have hsq := hd'.mul (hm.add hb)
62  simp only [zero_mul] at hsq
63  apply isLittleO_of_tendsto' ?_ ?_
64  · filter_upwards [self_mem_nhdsWithin] with δ hδ hzero
65    exact False.elim ((ne_of_gt hδ) hzero)
66  · apply hsq.congr'
67    filter_upwards [self_mem_nhdsWithin] with δ hδ
68    have hδ0 : 0<δ := hδ
69    have hg0 : 0<1+δ := by linarith
70    have hsquare : (Real.sqrt (1+δ)/(1+δ))^2=(1+δ)⁻¹ := by
71      rw [div_pow,Real.sq_sqrt hg0.le]
72      field_simp
73    rw [←hsquare]
74    ring
75 
76/-- The pair contributes first-order squared infidelity with coefficient one. -/
77theorem modeFactor_near_pure_infidelity {q : ℝ→ℝ}
78    (hq0 : ∀ᶠ δ in 𝓝[>] (0:ℝ),0≤q δ)
79    (hq : q =o[𝓝[>] (0:ℝ)] (fun δ=>δ)) :
80    Tendsto (fun δ=>(1-modeFactor (1+δ) (q δ)^2)/δ)
81      (𝓝[>] (0:ℝ)) (𝓝 1) := by
82  have hid : Tendsto (fun δ:ℝ=>δ) (𝓝[>] (0:ℝ)) (𝓝 0) := nhdsWithin_le_nhds
83  have hg : Tendsto (fun δ:ℝ=>(1+δ)⁻¹) (𝓝[>] (0:ℝ)) (𝓝 1) := by
84    simpa using (hid.const_add 1).inv₀ (by norm_num : (1+(0:ℝ))≠0)
85  have h := hg.sub (modeFactor_near_pure hq0 hq).tendsto_div_nhds_zero
86  simp only [sub_zero] at h
87  apply h.congr'
88  filter_upwards [self_mem_nhdsWithin] with δ hδ
89  have hδ0 : 0<δ := hδ
90  have hg0 : 0<1+δ := by linarith
91  field_simp [hδ0.ne',hg0.ne']
92  <;> ring
93 
94end Cloning.Thermal