Offline · exact source
Exact Lean source

ScalarPowerExpansion

formalization/Cloning/ScalarPowerExpansion.lean

Source hash: 1e62489a8210771ea235a9b00c247649a5c9c0a4f949d28042a86b6c5d2f28bd

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.SpecialFunctions.Pow.Deriv
3 
4/-! The local real-power expansion used in the sample-ratio thresholds. -/
5noncomputable section
6open scoped Topology
7open Filter Asymptotics
8namespace Cloning.ScalarTaylor
9set_option backward.isDefEq.respectTransparency false
10 
11theorem hasDerivAt_one_sub_rpow (c x : ℝ) (hx : x<1) :
12    HasDerivAt (fun y : ℝ => (1-y)^c) (-c*(1-x)^(c-1)) x := by
13  convert ((hasDerivAt_id x).const_sub 1).rpow_const
14    (Or.inl (by linarith : 1-x≠0)) using 1 <;> simp only [id_eq] <;> ring
15 
16theorem deriv_one_sub_rpow (c x : ℝ) (hx : x<1) :
17    deriv (fun y : ℝ => (1-y)^c) x = -c*(1-x)^(c-1) :=
18  (hasDerivAt_one_sub_rpow c x hx).deriv
19 
20theorem secondDeriv_one_sub_rpow_zero (c : ℝ) :
21    deriv (deriv (fun y : ℝ => (1-y)^c)) 0 = c*(c-1) := by
22  have he : deriv (fun y : ℝ => (1-y)^c) =ᶠ[𝓝 (0:ℝ)]
23      (fun x => -c*(1-x)^(c-1)) := by
24    filter_upwards [gt_mem_nhds (show (0:ℝ)<1 by norm_num)] with x hx
25    exact deriv_one_sub_rpow c x hx
26  rw [he.deriv_eq]
27  have hh := (hasDerivAt_one_sub_rpow (c-1) 0 (by norm_num)).const_mul (-c)
28  convert hh.deriv using 1 <;> simp <;> ring
29 
30theorem one_sub_rpow_quadratic (c : ℝ) :
31    (fun x : ℝ => (1-x)^c-(1-c*x+c*(c-1)/2*x^2))
32      =O[𝓝 (0:ℝ)] (fun x => x^3) := by
33  have hc : ContDiffAt ℝ 3 (fun x : ℝ => (1-x)^c) 0 :=
34    (contDiffAt_const.sub contDiffAt_id).rpow_const_of_ne (by norm_num)
35  have h := quadratic_remainder hc
36  rw [secondDeriv_one_sub_rpow_zero, deriv_one_sub_rpow c 0 (by norm_num)] at h
37  convert h using 1
38  ext x
39  simp
40  ring
41 
42end Cloning.ScalarTaylor