Exact Lean source
PCTProjectorPurityEnvelope
formalization/Cloning/PCTProjectorPurityEnvelope.lean
Source hash: f8ae20dbfc8008730330305dd827d2979e5dcd3f548b0765de3fda49ceb5245d
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.PCTProjectorPurity.supportLimitdefinition Cloning.PCTProjectorPurity.internalErrordefinition Cloning.PCTProjectorPurity.lowerEnvelopedefinition Cloning.PCTProjectorPurity.upperEnvelopetheorem Cloning.PCTProjectorPurity.supportLimit_nonnegtheorem Cloning.PCTProjectorPurity.supportLimit_le_onetheorem Cloning.PCTProjectorPurity.eventually_supported_error_envelopestheorem Cloning.PCTProjectorPurity.lowerEnvelope_hasDerivAt_zerotheorem Cloning.PCTProjectorPurity.internalError_hasDerivAt_zerotheorem Cloning.PCTProjectorPurity.upperEnvelope_hasDerivAt_zerotheorem Cloning.PCTProjectorPurity.lowerEnvelope_div_tendstotheorem Cloning.PCTProjectorPurity.upperEnvelope_div_tendsto1import Mathlib.Analysis.SpecialFunctions.Pow.Deriv
2import Mathlib.Analysis.SpecialFunctions.Sqrt
3import Mathlib.Tactic
4
5/-! Scalar two-envelope bounds for a support factor times an internal
6squared fidelity. The hypotheses here are explicit intermediate data. -/
7noncomputable section
8open scoped Topology
9open Filter
10namespace Cloning.PCTProjectorPurity
11set_option maxHeartbeats 1000000
12
13def supportLimit (a : ℕ) (δ : ℝ) : ℝ := (1+δ)^(-(a:ℝ))
14def internalError (b : ℕ) (δ : ℝ) : ℝ := (1-4*δ^2)^(-((b:ℝ)/2))-1
15def lowerEnvelope (a : ℕ) (δ : ℝ) : ℝ := 1-supportLimit a δ
16def upperEnvelope (a b : ℕ) (δ : ℝ) : ℝ :=
17 1-supportLimit a δ*(1-internalError b δ)
18
19theorem supportLimit_nonneg (a : ℕ) (δ : ℝ) (hδ : 0≤δ) : 0≤supportLimit a δ :=
20 Real.rpow_nonneg (by linarith) _
21
22theorem supportLimit_le_one (a : ℕ) (δ : ℝ) (hδ : 0≤δ) : supportLimit a δ≤1 := by
23 exact Real.rpow_le_one_of_one_le_of_nonpos (by linarith) (by simp)
24
25/-- Lower and upper asymptotic error envelopes from exact support mass and
26an internal squared-error bound. This lemma does not assume a quantum law. -/
27theorem eventually_supported_error_envelopes
28 (s u : ℕ→ℝ) (S C : ℝ) (hS0 : 0≤S) (hS1 : S≤1)
29 (hs : ∀n,0≤s n) (hu : ∀n,0≤u n ∧ u n≤1)
30 (hlim : Tendsto s atTop (𝓝 S))
31 (hint : ∀η>0,∀ᶠ n in atTop,1-u n^2≤C+η) :
32 ∀ε>0,∀ᶠ n in atTop,
33 (1-S)-ε≤1-s n*u n^2 ∧
34 1-s n*u n^2≤(1-S*(1-C))+ε := by
35 intro ε hε
36 have habs : Tendsto (fun n=>|s n-S|) atTop (𝓝 0) := by
37 simpa only [sub_self,abs_zero] using (hlim.sub_const S).abs
38 have hden : 0<2*(|C-1|+1) := by positivity
39 have hclose : ∀ᶠ n in atTop,|s n-S|≤ε/(2*(|C-1|+1)) :=
40 habs.eventually (eventually_le_nhds (div_pos hε hden))
41 have hclose' : ∀ᶠ n in atTop,|s n-S|≤ε :=
42 habs.eventually (eventually_le_nhds hε)
43 have htwo : ∀ᶠ n in atTop,s n≤2 :=
44 hlim.eventually (eventually_le_nhds (by linarith))
45 filter_upwards [hclose,hclose',htwo,hint (ε/4) (by positivity)] with n hc hc' hs2 hi
46 have hu2 : u n^2≤1 := by nlinarith [(hu n).1,(hu n).2]
47 have he0 : 0≤1-u n^2 := by linarith
48 have hdiff := (abs_le.mp hc').2
49 have hprod := mul_nonneg (hs n) he0
50 constructor
51 · nlinarith
52 · have hI := mul_le_mul_of_nonneg_left hi (hs n)
53 have hupper := le_abs_self ((s n-S)*(C-1))
54 rw [abs_mul] at hupper
55 have heps : |s n-S| *|C-1|≤ε/2 := by
56 have hh := (le_div_iff₀ hden).mp hc
57 have hp : 0≤|s n-S| := abs_nonneg _
58 nlinarith
59 have hsmall := mul_le_mul_of_nonneg_right hs2 (show 0≤ε/4 by positivity)
60 nlinarith
61
62/-- A rank boundary contributes the same first-order coefficient to both
63envelopes; the internal error has zero derivative at zero. -/
64theorem lowerEnvelope_hasDerivAt_zero (a : ℕ) :
65 HasDerivAt (lowerEnvelope a) (a:ℝ) 0 := by
66 have h := (((hasDerivAt_id (0:ℝ)).const_add 1).rpow_const
67 (p := -(a:ℝ)) (Or.inl (by norm_num))).const_sub 1
68 convert h using 1 <;> simp [lowerEnvelope,supportLimit]
69
70theorem internalError_hasDerivAt_zero (b : ℕ) :
71 HasDerivAt (internalError b) 0 0 := by
72 have h := (((((hasDerivAt_id (0:ℝ)).pow 2).const_mul 4).const_sub 1).rpow_const
73 (p := -((b:ℝ)/2)) (Or.inl (by norm_num))).sub_const 1
74 convert h using 1 <;> simp [internalError]
75
76theorem upperEnvelope_hasDerivAt_zero (a b : ℕ) :
77 HasDerivAt (upperEnvelope a b) (a:ℝ) 0 := by
78 have hs : HasDerivAt (supportLimit a) (-(a:ℝ)) 0 := by
79 have h := ((hasDerivAt_id (0:ℝ)).const_add 1).rpow_const
80 (p := -(a:ℝ)) (Or.inl (by norm_num))
81 convert h using 1 <;> simp [supportLimit]
82 have h := (hs.mul ((internalError_hasDerivAt_zero b).const_sub 1)).const_sub 1
83 convert h using 1 <;> simp [upperEnvelope,supportLimit,internalError]
84
85theorem lowerEnvelope_div_tendsto (a : ℕ) :
86 Tendsto (fun δ=>lowerEnvelope a δ/δ) (𝓝[≠] (0:ℝ)) (𝓝 (a:ℝ)) := by
87 have h := (lowerEnvelope_hasDerivAt_zero a).tendsto_slope_zero
88 simpa [lowerEnvelope,supportLimit,smul_eq_mul,div_eq_mul_inv,mul_comm] using h
89
90theorem upperEnvelope_div_tendsto (a b : ℕ) :
91 Tendsto (fun δ=>upperEnvelope a b δ/δ) (𝓝[≠] (0:ℝ)) (𝓝 (a:ℝ)) := by
92 have h := (upperEnvelope_hasDerivAt_zero a b).tendsto_slope_zero
93 simpa [upperEnvelope,supportLimit,internalError,smul_eq_mul,div_eq_mul_inv,mul_comm] using h
94
95end Cloning.PCTProjectorPurity