Exact Lean source
SampleRatioExpansion
formalization/Cloning/SampleRatioExpansion.lean
Source hash: 5ef8eeeae15e40f103cf231deb65ebf0dd50ba327b7b515acc23ed1b058475b8
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.SampleRatioThreshold
2import Cloning.ScalarTaylorInverse
3import Cloning.ScalarPowerExpansion
4
5/-! The first two terms of the exact inverse power-fidelity threshold,
6with the manuscript's O(error) remainder. -/
7noncomputable section
8open scoped Topology
9open Filter Asymptotics
10namespace Cloning.SampleRatio
11set_option backward.isDefEq.respectTransparency false
12
13theorem threshold_expansion {a : ℝ} (ha : 0<a) :
14 (fun ε => threshold a ε-(a/ε-(a+1)/2))
15 =O[𝓝[≠] (0:ℝ)] (fun ε => ε) := by
16 let f : ℝ → ℝ := fun x => (1-x)^(-1/a)-1
17 let α : ℝ := 1/a
18 let β : ℝ := (a+1)/(2*a^2)
19 have hα : α≠0 := one_div_ne_zero ha.ne'
20 have hf0 : f 0=0 := by simp [f]
21 have hf : HasDerivAt f α 0 := by
22 have hh := (ScalarTaylor.hasDerivAt_one_sub_rpow (-1/a) 0 (by norm_num)).sub_const 1
23 convert hh using 1 <;> simp [f,α,div_eq_mul_inv]
24 have hrem : (fun x => f x-α*x-β*x^2) =O[𝓝 (0:ℝ)] (fun x => x^3) := by
25 have hh := ScalarTaylor.one_sub_rpow_quadratic (-1/a)
26 convert hh using 1
27 ext x
28 dsimp [f,α,β]
29 field_simp
30 <;> ring
31 have hi := ScalarTaylor.inverse_remainder hα hf0 hf hrem
32 apply hi.congr' ?_ (Eventually.of_forall (fun _ => rfl))
33 filter_upwards [self_mem_nhdsWithin] with x hx
34 have hx0 : x≠0 := hx
35 have he₁ : (α*x)⁻¹=a/x := by simp [α, mul_inv, div_eq_mul_inv,mul_comm]
36 have he₂ : β/α^2=(a+1)/2 := by
37 dsimp [α,β]
38 field_simp
39 rw [he₁,he₂]
40 dsimp [f,threshold]
41 ring
42
43end Cloning.SampleRatio