Exact Lean source
PCTProjectorPurityEnvelopeExpansion
formalization/Cloning/PCTProjectorPurityEnvelopeExpansion.lean
Source hash: 34bb95b07529a34fa43a2e660a6c2bf87f7063a6bf4ef37ecda4236e7302f029
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.PCTProjectorPurityEnvelope
2import Cloning.ScalarTaylorRemainder
3
4/-! Quadratic internal error and the precise two-stage small-gain coefficient. -/
5noncomputable section
6open scoped Topology
7open Filter Asymptotics
8namespace Cloning.PCTProjectorPurity
9set_option maxHeartbeats 1000000
10
11theorem internalError_isBigO_square (b : ℕ) :
12 internalError b =O[𝓝 (0:ℝ)] (fun δ=>δ^2) := by
13 have hf : ContDiffAt ℝ 2 (internalError b) 0 := by
14 unfold internalError
15 exact (((contDiffAt_const.sub (contDiffAt_const.mul (contDiffAt_id.pow 2))).rpow_const_of_ne
16 (by norm_num)).sub contDiffAt_const)
17 have h := Cloning.ScalarTaylor.local_taylor_isBigO 1 hf
18 have hz : internalError b 0=0 := by simp [internalError]
19 have hd : deriv (internalError b) 0=0 := (internalError_hasDerivAt_zero b).deriv
20 simpa only [taylorWithinEval_succ,taylor_within_zero_eval,iteratedDerivWithin_univ,
21 Nat.zero_add,iteratedDeriv_one,smul_eq_mul,hz,hd,mul_zero,zero_mul,add_zero,sub_zero] using h
22
23/-- If the physical errors lie between these envelopes after taking large
24sample sizes, their normalized small-gain coefficient is exactly a. The
25statement allows all parameters in the index type to vary uniformly. -/
26theorem error_envelopes_first_order {ι : Type*} (a b : ℕ) (δ₀ : ℝ) (hδ₀ : 0<δ₀)
27 (E : ℝ→ℕ→ι→ℝ)
28 (henv : ∀δ,0<δ→δ<δ₀→∀ε>0,∀ᶠ n in atTop,∀i,
29 lowerEnvelope a δ-ε≤E δ n i ∧ E δ n i≤upperEnvelope a b δ+ε) :
30 ∀η>0,∀ᶠ δ in 𝓝[>] (0:ℝ),∀ᶠ n in atTop,∀i,
31 |E δ n i/δ-(a:ℝ)|≤η := by
32 intro η hη
33 have hfilter : (𝓝[>] (0:ℝ))≤𝓝[≠] (0:ℝ) :=
34 nhdsWithin_mono 0 (fun δ hδ=>ne_of_gt hδ)
35 have hl := (lowerEnvelope_div_tendsto a).mono_left hfilter
36 have hu := (upperEnvelope_div_tendsto a b).mono_left hfilter
37 have hlo : ∀ᶠ δ in 𝓝[>] (0:ℝ),(a:ℝ)-η/2≤lowerEnvelope a δ/δ :=
38 hl.eventually (eventually_ge_nhds (by linarith))
39 have hup : ∀ᶠ δ in 𝓝[>] (0:ℝ),upperEnvelope a b δ/δ≤(a:ℝ)+η/2 :=
40 hu.eventually (eventually_le_nhds (by linarith))
41 have hsmall : ∀ᶠ δ in 𝓝[>] (0:ℝ),δ<δ₀ :=
42 (eventually_lt_nhds hδ₀).filter_mono nhdsWithin_le_nhds
43 filter_upwards [self_mem_nhdsWithin,hsmall,hlo,hup] with δ hδ hs hl hu
44 have hd : 0<δ := hδ
45 filter_upwards [henv δ hd hs (δ*(η/2)) (by positivity)] with n hn i
46 have ha := div_le_div_of_nonneg_right (hn i).1 hd.le
47 have hb := div_le_div_of_nonneg_right (hn i).2 hd.le
48 have he : (δ*(η/2))/δ=η/2 := mul_div_cancel_left₀ _ hd.ne'
49 simp only [sub_div,add_div,he] at ha hb
50 exact abs_le.mpr ⟨by linarith,by linarith⟩
51
52end Cloning.PCTProjectorPurity