Exact Lean source
SampleRatioFinite
formalization/Cloning/SampleRatioFinite.lean
Source hash: 170019df18e08c1ed20e0e77c32519968ae8aa4c871ab0d6a6f667430075bc9f
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.PCTRankAdaptedFactor
3
4/-! Exact finite binomial-ratio certification for the sample threshold. -/
5noncomputable section
6open scoped BigOperators
7namespace Cloning.SampleRatio
8open Cloning.PCTRankAdapted Cloning.WernerAsymptotics
9set_option backward.isDefEq.respectTransparency false
10
11theorem wernerScale_product (n m a : ℕ) (hnm : n≤m) :
12 wernerScale n m a = ∏ j ∈ Finset.range a,
13 ((n:ℝ)+j+1)/((m:ℝ)+j+1) := by
14 simp_rw [wernerScale_eq_vacuum n m a hnm]
15 induction a with
16 | zero => simp [coefficient_zero_zero n m hnm]
17 | succ a ih =>
18 rw [coefficient_succ_modes n m a 0 hnm,Finset.prod_range_succ,ih]
19 ring
20
21theorem wernerScale_power_lower (N M a : ℕ) (hN : 0<N) :
22 ((N:ℝ)/(N+M))^a ≤ wernerScale N (N+M) a := by
23 rw [wernerScale_product N (N+M) a (Nat.le_add_right N M)]
24 simpa only [Nat.cast_add] using finite_product_lower a N M hN
25
26/-- The finite binomial ratio already exceeds the requested squared fidelity
27under the stated sample-ratio condition. No limiting approximation is used. -/
28theorem wernerScale_ge_target (N M a : ℕ) (hN : 0<N) (hM : 0<M) (ha : 0<a)
29 {ε : ℝ} (hε : 0<ε) (hε1 : ε<1)
30 (hR : threshold a ε ≤ (N:ℝ)/M) :
31 1-ε ≤ wernerScale N (N+M) a := by
32 have hn : (0:ℝ)<N := by exact_mod_cast hN
33 have hm : (0:ℝ)<M := by exact_mod_cast hM
34 have hh := (power_fidelity_iff (by exact_mod_cast ha) hε hε1 (div_pos hn hm)).mpr hR
35 have he : (1+((N:ℝ)/M)⁻¹)^(-(a:ℝ)) = ((N:ℝ)/(N+M))^a := by
36 have hb : 1+((N:ℝ)/M)⁻¹=((N:ℝ)+M)/N := by field_simp
37 rw [hb,Real.rpow_neg (by positivity),Real.rpow_natCast,div_pow,inv_div,div_pow]
38 rw [he] at hh
39 exact hh.trans (wernerScale_power_lower N M a hN)
40
41end Cloning.SampleRatio