Exact Lean source
ScalarTaylorInverse
formalization/Cloning/ScalarTaylorInverse.lean
Source hash: d04b34f121e2a7c826eb71f43130fe32f8ade776b8de19325c8883828fed58a8
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.ScalarTaylorRemainder
2import Mathlib.Analysis.Calculus.Deriv.Slope
3import Mathlib.Analysis.Asymptotics.Lemmas
4
5/-! Inverting a simple zero with a cubic Taylor remainder retains the linear
6big-O error in the resulting Laurent expansion. -/
7noncomputable section
8open scoped Topology
9open Filter Set Asymptotics
10namespace Cloning.ScalarTaylor
11set_option backward.isDefEq.respectTransparency false
12
13theorem inverse_remainder {f : ℝ → ℝ} {α β : ℝ} (hα : α ≠ 0)
14 (hf0 : f 0=0) (hf : HasDerivAt f α 0)
15 (hrem : (fun x => f x-α*x-β*x^2) =O[𝓝 (0:ℝ)] (fun x => x^3)) :
16 (fun x => (f x)⁻¹-(α*x)⁻¹+β/α^2)
17 =O[𝓝[≠] (0:ℝ)] (fun x => x) := by
18 let L := 𝓝[≠] (0:ℝ)
19 have hid : Tendsto (fun x : ℝ => x) L (𝓝 0) := nhdsWithin_le_nhds
20 have hq : Tendsto (fun x : ℝ => f x/x) L (𝓝 α) := by
21 simpa [hf0, smul_eq_mul, div_eq_mul_inv, mul_comm] using hf.tendsto_slope_zero
22 have hw : Tendsto (fun x : ℝ => -1+(β/α)*x) L (𝓝 (-1)) := by
23 simpa using (hid.const_mul (β/α)).const_add (-1)
24 let R : ℝ → ℝ := fun x => f x-α*x-β*x^2
25 let N : ℝ → ℝ := fun x => (-1+(β/α)*x)*R x+(β^2/α)*x^3
26 have hR : R =O[L] (fun x => x^3) := hrem.mono nhdsWithin_le_nhds
27 have hN : N =O[L] (fun x => x^3) := by
28 have hh₁ : (fun x => (-1+(β/α)*x)*R x) =O[L] (fun x => x^3) := by
29 simpa only [one_mul] using (hw.isBigO_one ℝ).mul hR
30 have hh := hh₁.add
31 (isBigO_const_mul_self (β^2/α) (fun x : ℝ => x^3) L)
32 simpa [N, one_mul] using hh
33 have hscaled := ((hN.mul ((hq.inv₀ hα).isBigO_one ℝ)).const_mul_left α⁻¹).mul
34 (isBigO_refl (fun x : ℝ => (x^2)⁻¹) L)
35 have hright (x : ℝ) : (x^3*1)*(x^2)⁻¹=x := by
36 by_cases hx : x=0
37 · simp [hx]
38 · field_simp
39 have hs : (fun x => α⁻¹*(N x*(f x/x)⁻¹)*(x^2)⁻¹) =O[L] (fun x => x) := by
40 simpa only [hright] using hscaled
41 apply hs.congr' ?_ (Eventually.of_forall (fun _ => rfl))
42 have hx : ∀ᶠ x : ℝ in L, x≠0 := self_mem_nhdsWithin
43 have hqne : ∀ᶠ x : ℝ in L, f x/x ≠ 0 := hq.eventually_ne hα
44 filter_upwards [hx,hqne] with x hx hqne
45 have hfx : f x≠0 := by intro h; exact hqne (by simp [h])
46 dsimp [N,R]
47 field_simp
48 <;> ring
49
50end Cloning.ScalarTaylor