OAI/Probability/TraceReconstruction/Binomial.lean
162 declarations, 0 contain sorry, 0 declared as axioms
Binomial
Fair and biased binomial laws, generating series, differences, concentration, Gaussian overlap, hidden counts, and local lower bounds.
- def
OAI.TraceReconstruction.fairBinomialline 24Source documentation
Fair-binomial mass, extended by zero beyond its natural support.
def fairBinomial (n k : ℕ) : ℝ := (n.choose k : ℝ) / 2 ^ n
- theorem
OAI.TraceReconstruction.fairBinomial_nonnegline 26 - theorem
OAI.TraceReconstruction.centralBinom_square_boundline 30 - theorem
OAI.TraceReconstruction.choose_odd_le_twice_centralline 59 - theorem
OAI.TraceReconstruction.fairBinomial_square_boundline 69 - abbrev
OAI.TraceReconstruction.IntSeriesline 108 - def
OAI.TraceReconstruction.seriesL1line 110 - def
OAI.TraceReconstruction.seriesL2Sqline 111 - theorem
OAI.TraceReconstruction.series_summableline 113 - theorem
OAI.TraceReconstruction.seriesL1_nonnegline 117 - theorem
OAI.TraceReconstruction.seriesL2Sq_nonnegline 120 - theorem
OAI.TraceReconstruction.seriesL1_eq_sumline 123 - theorem
OAI.TraceReconstruction.seriesL2Sq_eq_sumline 129 - theorem
OAI.TraceReconstruction.series_summable_shiftline 135 - theorem
OAI.TraceReconstruction.series_sum_shiftline 140 - theorem
OAI.TraceReconstruction.series_coeff_mul_abs_leline 144 - theorem
OAI.TraceReconstruction.seriesL1_mul_leline 150 - theorem
OAI.TraceReconstruction.series_coeff_mul_sq_leline 166 - theorem
OAI.TraceReconstruction.seriesL2Sq_mul_leline 176 - theorem
OAI.TraceReconstruction.series_coeff_mul_boundline 195 - def
OAI.TraceReconstruction.fairSeriesline 206 - theorem
OAI.TraceReconstruction.fairSeries_addline 209 - theorem
OAI.TraceReconstruction.fairSeries_sumline 212 - theorem
OAI.TraceReconstruction.fairSeries_coeff_natline 230 - theorem
OAI.TraceReconstruction.fairSeries_coeff_negline 246 - theorem
OAI.TraceReconstruction.seriesL1_eq_sum_rangeline 254 - def
OAI.TraceReconstruction.firstDifferenceline 273 - theorem
OAI.TraceReconstruction.firstDifference_coeffline 276 - theorem
OAI.TraceReconstruction.fairSeries_difference_coeff_zeroline 283 - theorem
OAI.TraceReconstruction.fairSeries_difference_coeff_succline 290 - theorem
OAI.TraceReconstruction.fairBinomial_unimodal_leftline 296 - theorem
OAI.TraceReconstruction.fairBinomial_unimodal_rightline 301 - theorem
OAI.TraceReconstruction.fairBinomial_variationline 309 - theorem
OAI.TraceReconstruction.fairSeries_difference_L1line 338 - def
OAI.TraceReconstruction.binomialBoundline 356 - theorem
OAI.TraceReconstruction.binomialBound_nonnegline 358 - theorem
OAI.TraceReconstruction.fairBinomial_le_boundline 360 - theorem
OAI.TraceReconstruction.fairSeries_nonnegline 365 - theorem
OAI.TraceReconstruction.fairSeries_coeff_boundline 371 - theorem
OAI.TraceReconstruction.fairSeries_L1line 380 - theorem
OAI.TraceReconstruction.seriesL2Sq_le_L1_mul_boundline 392 - theorem
OAI.TraceReconstruction.fairSeries_L2Sq_boundline 405 - theorem
OAI.TraceReconstruction.fairSeries_difference_L1_boundline 409 - theorem
OAI.TraceReconstruction.seriesL1_singleline 414 - theorem
OAI.TraceReconstruction.seriesL1_oneline 421 - theorem
OAI.TraceReconstruction.seriesL1_pow_leline 425 - theorem
OAI.TraceReconstruction.fairSeries_mul_powerline 433 - theorem
OAI.TraceReconstruction.binomial_difference_coeff_boundline 441Source documentation
Quantitative higher-order smoothing, with n trials assigned to each difference and one further group reserved for anti-concentration.
theorem binomial_difference_coeff_bound (n s : ℕ) (z : ℤ) : |(firstDifference ^ s * fairSeries ((s + 1) * n)).coeff z| ≤ (2 * binomialBound n) ^ s * binomialBound n := by …Mentions: OAI.TraceReconstruction.firstDifference, OAI.TraceReconstruction.fairSeries, OAI.TraceReconstruction.binomialBound
- theorem
OAI.TraceReconstruction.binomial_difference_L2Sq_boundline 450 - theorem
OAI.TraceReconstruction.seriesL1_add_leline 463 - theorem
OAI.TraceReconstruction.seriesL1_zeroline 475 - theorem
OAI.TraceReconstruction.seriesL1_sum_leline 478 - theorem
OAI.TraceReconstruction.seriesL1_prod_leline 487 - def
OAI.TraceReconstruction.geomSeriesline 496 - def
OAI.TraceReconstruction.prouhetSeriesline 498 - def
OAI.TraceReconstruction.prouhetQuotientline 501 - theorem
OAI.TraceReconstruction.geomSeries_differenceline 504 - theorem
OAI.TraceReconstruction.geomSeries_L1_leline 508 - theorem
OAI.TraceReconstruction.prouhetSeries_factorline 513 - theorem
OAI.TraceReconstruction.prouhetQuotient_L1_leline 520 - theorem
OAI.TraceReconstruction.prouhet_binomial_coeff_boundline 538Source documentation
Prouhet smoothing in an explicit finite-trial form. The constants 2^(s*s) and (2 sqrt(2/(n+1)))^s are exp(O(s^2)) after assigning n = floor(g/(s+1)) trials to each group. No Fourier theorem or probabilistic estimate is assumed.
theorem prouhet_binomial_coeff_bound (n s : ℕ) (z : ℤ) : |(prouhetSeries s * fairSeries ((s + 1) * n)).coeff z| ≤ (2 : ℝ) ^ (s * s) * ((2 * binomialBound n) ^ s * binomialBound n) := by …Mentions: OAI.TraceReconstruction.prouhetSeries, OAI.TraceReconstruction.fairSeries, OAI.TraceReconstruction.binomialBound
- theorem
OAI.TraceReconstruction.prouhet_binomial_L2Sq_boundline 546 - theorem
OAI.TraceReconstruction.prouhet_binomial_coeff_bound_remainderline 559Source documentation
Arbitrary trial counts are obtained by convolving with the independent unused trials; this cannot enlarge the coefficient or squared-L2 bounds.
theorem prouhet_binomial_coeff_bound_remainder (n s r : ℕ) (z : ℤ) : |(prouhetSeries s * fairSeries ((s + 1) * n + r)).coeff z| ≤ (2 : ℝ) ^ (s * s) * ((2 * binomialBound n) ^ s * binomialBound n) := by …Mentions: OAI.TraceReconstruction.prouhetSeries, OAI.TraceReconstruction.fairSeries, OAI.TraceReconstruction.binomialBound
- theorem
OAI.TraceReconstruction.prouhet_binomial_L2Sq_bound_remainderline 567 - theorem
OAI.TraceReconstruction.signed_binomial_smoothingline 577 - theorem
OAI.TraceReconstruction.binomialBound_quotient_leline 592 - theorem
OAI.TraceReconstruction.prouhetSeries_succ_coeffline 606 - theorem
OAI.TraceReconstruction.prouhetSeries_coeff_specline 618Source documentation
The exact generating polynomial from the manuscript has unit signed coefficients at every index 0,...,2^s-1, and no other coefficients.
theorem prouhetSeries_coeff_spec (s : ℕ) : (∀ z : ℤ, (z < 0 ∨ (2 ^ s : ℕ) ≤ z) → (prouhetSeries s).coeff z = 0) ∧ (∀ z : ℤ, 0 ≤ z → z < (2 ^ s : ℕ) → |(prouhetSeries s).coeff z| = 1) := by …Mentions: OAI.TraceReconstruction.prouhetSeries
- def
OAI.TraceReconstruction.binomialMassline 657 - theorem
OAI.TraceReconstruction.binomialMass_nonnegline 660 - theorem
OAI.TraceReconstruction.sum_binomialMassline 665 - theorem
OAI.TraceReconstruction.binomialMass_harmonic_stepline 675 - theorem
OAI.TraceReconstruction.binomialMass_harmonic_identityline 686 - theorem
OAI.TraceReconstruction.binomialMass_harmonic_leline 698 - theorem
OAI.TraceReconstruction.weighted_sum_sq_leline 707Source documentation
The weighted Cauchy--Schwarz step for mixing the fair estimates.
theorem weighted_sum_sq_le {ι : Type*} (S : Finset ι) (w f : ι → ℝ) (hw : ∀ i, 0 ≤ w i) : (∑ i ∈ S, w i * f i) ^ 2 ≤ (∑ i ∈ S, w i) * ∑ i ∈ S, w i * f i ^ 2 := by … - theorem
OAI.TraceReconstruction.mixed_binomialBound_leline 717 - def
OAI.TraceReconstruction.mixedFairSeriesline 747 - def
OAI.TraceReconstruction.biasedSeriesline 750 - theorem
OAI.TraceReconstruction.mixedFairSeries_expansionline 753 - theorem
OAI.TraceReconstruction.mixedFairSeries_eq_biasedline 765 - theorem
OAI.TraceReconstruction.mixedFairSeries_coeff_boundline 775 - theorem
OAI.TraceReconstruction.biasedSeries_coeff_bound_lowline 792Source documentation
At success probabilities at most 1/2, this gives the sharp variance scale up to an absolute constant, using only the fair-coin estimate.
theorem biasedSeries_coeff_bound_low (n : ℕ) {p : ℝ} (hp : p ∈ Set.Ioc 0 (1 / 2)) (z : ℤ) : |(biasedSeries n p).coeff z| ≤ Real.sqrt (1 / (((n : ℝ) + 1) * p)) := by …Mentions: OAI.TraceReconstruction.biasedSeries
- theorem
OAI.TraceReconstruction.biasedSeries_sumline 803 - theorem
OAI.TraceReconstruction.biasedSeries_coeff_natline 817 - theorem
OAI.TraceReconstruction.biasedSeries_coeff_negline 833 - theorem
OAI.TraceReconstruction.biasedSeries_coeff_highline 841 - theorem
OAI.TraceReconstruction.binomialMass_symmline 849 - theorem
OAI.TraceReconstruction.biasedSeries_coeff_reflectline 855 - theorem
OAI.TraceReconstruction.biasedSeries_coeff_boundline 872Source documentation
Uniform nonfair-binomial anti-concentration. This is the absolute variance-scale upper bound used in the manuscript's rank kernels.
theorem biasedSeries_coeff_bound (n : ℕ) {p : ℝ} (hp : p ∈ Set.Ioo 0 1) (z : ℤ) : |(biasedSeries n p).coeff z| ≤ Real.sqrt (1 / (((n : ℝ) + 1) * p * (1 - p))) := by …Mentions: OAI.TraceReconstruction.biasedSeries
- theorem
OAI.TraceReconstruction.binomialMass_mul_indexline 893 - theorem
OAI.TraceReconstruction.binomialMass_index_sumline 901 - theorem
OAI.TraceReconstruction.binomialMass_meanline 913 - theorem
OAI.TraceReconstruction.binomialMass_second_momentline 921 - theorem
OAI.TraceReconstruction.binomialMass_varianceline 938 - theorem
OAI.TraceReconstruction.binomialMass_adjacentline 951 - theorem
OAI.TraceReconstruction.binomialMass_le_modeline 963 - theorem
OAI.TraceReconstruction.discrete_mode_lowerline 1005Source documentation
A discrete law cannot have a very small maximum when its variance is bounded. The explicit constant is deliberately loose, avoiding any use of Stirling.
theorem discrete_mode_lower (n l : ℕ) (f : ℕ → ℝ) (M v : ℝ) (hf : ∀ k, 0 ≤ f k) (hsum : ∑ k ∈ Finset.range (n + 1), f k = 1) (hmax : ∀ k, f k ≤ M) (hvar : ∑ k ∈ Finset.range (n + 1), f k * ((k : ℝ) - l) ^ 2 = v) (hv : 1 ≤ v) : 1 / (12 * Real.sqrt v) ≤ M := by … - theorem
OAI.TraceReconstruction.binomialMass_mean_lowerline 1062 - theorem
OAI.TraceReconstruction.binomialMass_mean_inverse_sqline 1074 - theorem
OAI.TraceReconstruction.seriesL1_smulline 1090 - theorem
OAI.TraceReconstruction.mixedFairSeries_difference_L1_boundline 1096 - theorem
OAI.TraceReconstruction.biasedSeries_difference_L1_bound_lowline 1116 - theorem
OAI.TraceReconstruction.biasedSeries_difference_reflectline 1130 - theorem
OAI.TraceReconstruction.biasedSeries_difference_L1_reflectline 1146 - theorem
OAI.TraceReconstruction.biasedSeries_difference_L1_boundline 1154 - def
OAI.TraceReconstruction.biasedBinomialBoundline 1175 - theorem
OAI.TraceReconstruction.biasedSeries_L1line 1178 - theorem
OAI.TraceReconstruction.biasedSeries_L2Sq_boundline 1186 - theorem
OAI.TraceReconstruction.biasedSeries_addline 1191 - theorem
OAI.TraceReconstruction.biasedSeries_mul_powerline 1195 - theorem
OAI.TraceReconstruction.biased_difference_coeff_boundline 1201 - theorem
OAI.TraceReconstruction.biased_difference_L2Sq_boundline 1210 - theorem
OAI.TraceReconstruction.biased_difference_coeff_bound_remainderline 1223 - theorem
OAI.TraceReconstruction.biased_difference_L2Sq_bound_remainderline 1232 - theorem
OAI.TraceReconstruction.biased_difference_smoothingline 1245Source documentation
All fixed-order nonfair binomial differences, at the exact variance scale. This is the analytic estimate needed for the initial conditional rank kernels.
theorem biased_difference_smoothing (g s : ℕ) {p : ℝ} (hp : p ∈ Set.Ioo 0 1) : (∀ z : ℤ, |(firstDifference ^ s * biasedSeries g p).coeff z| ≤ (2 * biasedBinomialBound (g / (s + 1)) p) ^ s * biasedBinomialBound (g / (s + 1)) p) ∧ (seriesL2Sq (firstDifference ^ s * biasedSeries g p) ≤ ((2 * biasedBinomialBound (g / (s + 1)) p) ^ s) ^ 2 * biasedBinomialBound (g / (s + 1)) p) := by …Mentions: OAI.TraceReconstruction.firstDifference, OAI.TraceReconstruction.biasedSeries, OAI.TraceReconstruction.biasedBinomialBound, OAI.TraceReconstruction.seriesL2Sq
- theorem
OAI.TraceReconstruction.biasedBinomialBound_quotient_leline 1260 - theorem
OAI.TraceReconstruction.binomialMass_tiltline 1282 - theorem
OAI.TraceReconstruction.binomialMass_tilt_productline 1299 - theorem
OAI.TraceReconstruction.binomial_overlap_tilt_boundline 1316Source documentation
Tilting on opposite sides retains an anti-concentration factor as well as the Gaussian penalty for different numbers of trials.
theorem binomial_overlap_tilt_bound (g h : ℕ) {p a : ℝ} (hp : p ∈ Set.Ioo 0 1) (ha : 0 < a) : (∑ k ∈ Finset.range (h + 1), binomialMass g p k * binomialMass h p k) ≤ ((1 - p + p * a) ^ g * (1 - p + p / a) ^ h) * biasedBinomialBound g (p * a / (1 - p + p * a)) := by …Mentions: OAI.TraceReconstruction.binomialMass, OAI.TraceReconstruction.biasedBinomialBound
- theorem
OAI.TraceReconstruction.binomial_tilt_varianceline 1346 - theorem
OAI.TraceReconstruction.binomial_tilt_normalizerline 1366 - theorem
OAI.TraceReconstruction.binomial_gaussian_overlapline 1424Source documentation
The Gaussian cross-overlap estimate used by the conditional rank-kernel square-sum argument. The constant is absolute, also as p tends to one.
theorem binomial_gaussian_overlap (g h : ℕ) {p : ℝ} (hp : p ∈ Set.Ico (1 / 2 : ℝ) 1) (hhg : h ≤ g) (hS : 0 < g + h) : (∑ k ∈ Finset.range (h + 1), binomialMass g p k * binomialMass h p k) ≤ Real.sqrt (2 / (((g : ℝ) + 1) * p * (1 - p))) * Real.exp (-((g : ℝ) - h) ^ 2 / (16 * ((g : ℝ) + h))) := by …Mentions: OAI.TraceReconstruction.binomialMass
- theorem
OAI.TraceReconstruction.sqrt_times_gaussian_leline 1460 - theorem
OAI.TraceReconstruction.sqrt_recip_product_leline 1472 - theorem
OAI.TraceReconstruction.binomialMass_le_boundline 1481 - theorem
OAI.TraceReconstruction.binomial_product_supline 1489Source documentation
A uniform product-supremum estimate, including very unequal trial counts. This justifies eliminating a largest gap in the rank kernel.
theorem binomial_product_sup (g h k : ℕ) {p : ℝ} (hp : p ∈ Set.Ico (1 / 2 : ℝ) 1) : binomialMass g p k * binomialMass h p k ≤ 32 / (((g : ℝ) + 1) * p * (1 - p)) := by …Mentions: OAI.TraceReconstruction.binomialMass
- theorem
OAI.TraceReconstruction.binomialMass_mgfline 1553Source documentation
Exact moment generating function, including both endpoint channels.
theorem binomialMass_mgf (n : ℕ) (p t : ℝ) : (∑ k ∈ Finset.range (n + 1), binomialMass n p k * Real.exp (t * k)) = (1 - p + p * Real.exp t) ^ n := by …Mentions: OAI.TraceReconstruction.binomialMass
- theorem
OAI.TraceReconstruction.binomialMass_mgf_leline 1563 - theorem
OAI.TraceReconstruction.finite_exp_markovline 1575Source documentation
Exponential Markov bound for a finite nonnegative measure.
theorem finite_exp_markov {α : Type*} (S : Finset α) (w X : α → ℝ) (hw : ∀ a ∈ S, 0 ≤ w a) (a t : ℝ) (ht : 0 ≤ t) : (∑ z ∈ S with a ≤ X z, w z) ≤ Real.exp (-t * a) * ∑ z ∈ S, w z * Real.exp (t * X z) := by … - theorem
OAI.TraceReconstruction.binomialMass_lower_halfline 1600Source documentation
A uniform multiplicative lower tail, sufficient for hidden-flag counts.
theorem binomialMass_lower_half (n : ℕ) {p : ℝ} (hp : p ∈ Set.Icc 0 1) : (∑ k ∈ (Finset.range (n + 1)).filter (fun k : ℕ => (k : ℝ) ≤ n * p / 2), binomialMass n p k) ≤ Real.exp (-(n : ℝ) * p / 12) := by …Mentions: OAI.TraceReconstruction.binomialMass
- theorem
OAI.TraceReconstruction.fairBinomial_centered_mgfline 1639 - theorem
OAI.TraceReconstruction.fairBinomial_upper_tailline 1666 - def
OAI.TraceReconstruction.hypergeomMassline 1688 - theorem
OAI.TraceReconstruction.hypergeomMass_nonnegline 1691 - theorem
OAI.TraceReconstruction.hypergeomMass_eq_binomialline 1695 - theorem
OAI.TraceReconstruction.binomialMass_sq_upperline 1722 - theorem
OAI.TraceReconstruction.hypergeomMass_sq_upperline 1732 - theorem
OAI.TraceReconstruction.sum_hypergeomMassline 1756 - theorem
OAI.TraceReconstruction.hypergeomMass_highline 1774 - theorem
OAI.TraceReconstruction.hypergeom_hidden_adjacentline 1781Source documentation
Adjacent-mass identity for the hidden count. The central regime has full support on 0,...,M; this is exactly the regime used in adjacent-power lifting.
theorem hypergeom_hidden_adjacent (V M m k : ℕ) (hM : M ≤ m) (hV : m ≤ V) (hk : k < M) : (((k:ℝ)+1)*((V:ℝ)-m+k+1)) * hypergeomMass M V m (k+1) = (((M:ℝ)-k)*((m:ℝ)-k)) * hypergeomMass M V m k := by …Mentions: OAI.TraceReconstruction.hypergeomMass
- def
OAI.TraceReconstruction.hypergeomHiddenModeline 1808 - theorem
OAI.TraceReconstruction.hypergeomHiddenMode_leline 1810 - theorem
OAI.TraceReconstruction.hypergeom_hidden_unimodal_leftline 1819 - theorem
OAI.TraceReconstruction.hypergeom_hidden_unimodal_rightline 1835 - theorem
OAI.TraceReconstruction.unimodal_variationline 1853Source documentation
Exact total variation of a zero-extended unimodal sequence.
theorem unimodal_variation (f : ℕ → ℝ) (n l : ℕ) (hl : l ≤ n+1) (hleft : ∀ k < l, f k ≤ f (k+1)) (hright : ∀ k, l ≤ k → f (k+1) ≤ f k) (hz : f (n+1)=0) : f 0 + ∑ k ∈ Finset.range (n+1), |f (k+1)-f k| = 2*f l := by … - theorem
OAI.TraceReconstruction.hypergeom_hidden_variationline 1873 - theorem
OAI.TraceReconstruction.choose_pred_weightline 1882 - theorem
OAI.TraceReconstruction.choose_pred_weight_succline 1890 - def
OAI.TraceReconstruction.hypergeomHiddenFluxline 1896 - theorem
OAI.TraceReconstruction.hypergeomHiddenFlux_formulaline 1899 - theorem
OAI.TraceReconstruction.hypergeomHiddenFlux_highline 1927 - theorem
OAI.TraceReconstruction.hypergeomHiddenFlux_boundaryline 1931 - theorem
OAI.TraceReconstruction.hypergeom_adjacent_hidden_differenceline 1940 - theorem
OAI.TraceReconstruction.hypergeom_next_zeroline 1995 - def
OAI.TraceReconstruction.adjacentHypergeomTVline 2015Source documentation
Exact adjacent visible-count TV, expressed with complementary hidden counts. The shift by one is essential: the two totals are different.
def adjacentHypergeomTV (V M m : ℕ) : ℝ := …
- theorem
OAI.TraceReconstruction.adjacentHypergeomTV_eq_fluxline 2019 - theorem
OAI.TraceReconstruction.adjacentHypergeomTV_le_massline 2036 - def
OAI.TraceReconstruction.bernoulliRelativeEntropyline 2051 - theorem
OAI.TraceReconstruction.bernoulliRelativeEntropy_upperline 2054 - theorem
OAI.TraceReconstruction.binomialMass_change_probabilityline 2066 - theorem
OAI.TraceReconstruction.binomialMass_mean_change_probabilityline 2077 - theorem
OAI.TraceReconstruction.binomialMass_local_lowerline 2091Source documentation
Uniform local binomial lower bound without Stirling. It applies at a count
kby changing to the channel with mean exactlyk.theorem binomialMass_local_lower (n k : ℕ) {θ p : ℝ} (hθ : θ ∈ Set.Ioo 0 1) (hp : p ∈ Set.Ioo 0 1) (hk : k ≤ n) (hmean : (n:ℝ)*θ = k) (hv : 1 ≤ (n:ℝ)*θ*(1-θ)) : Real.exp (-(n:ℝ)*(θ-p)^2/(p*(1-p))) / (12*Real.sqrt ((n:ℝ)*θ*(1-θ))) ≤ binomialMass n p k := by …Mentions: OAI.TraceReconstruction.binomialMass