Provedsampleabilitycertificateheadline-theoremreview-response
Sharper finite-sample self-certificate: mean(w²)/mean(w)² lies within [(1−δ)C/(1+δ)², (1+δ)C/(1−δ)²] except w.p. ≤ (K²−1)/(Nδ²)
For all , , and , if , , , , , , and (given and ), then
What the notation means · or point at any symbol
- Type
- Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Type) - Fintype
- Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fintype) - f(x)Function application
- Fintype applied to J. Lean writes f x; papers write f(x). (
Fintype J) - Nonempty
- Nonempty: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Nonempty) - NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - ⟹Implies
- If J, then ℝ. (Between types, A → B is the type of functions from A to B.) (
J → ℝ) - x : TVariables
- s, r range over J → ℝ: the statement must hold for every choice. (
(s r : J → ℝ)) - x ∈ TVariables
- Z, C, K, δ range over real numbers: the statement must hold for every choice. (
(Z C K δ : ℝ)) - ∀For all
- The statement after the comma holds for every j. (
∀ j, 0 < r j) - ∑Summation
- Add up r(j) for every j. (
∑ j, r j) - =Equality
- ∑ j, r(j) and 1 are the same. (
∑ j, r j = 1) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - <Less than
- 0 is strictly smaller than r(j). (
0 < r j) - ≤At most
- exp(s(j))/Z is less than or equal to K · r(j). (
Real.exp (s j) / Z ≤ K * r j) - eˣExponential function
- e raised to the power s(j), where e ≈ 2.718. (
Real.exp (s j)) - aᵇPower
- exp(s(j))/Z raised to the power 2. (
(Real.exp (s j) / Z) ^ 2) - a/bDivision
- exp(s(j)) divided by Z. In Lean, dividing by 0 gives 0. (
Real.exp (s j) / Z) - filter
- Finset.univ.filter: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset.univ.filter) - ·Multiplication
- K times r(j). (
K * r j) - x ↦ f(x)Function (λ-abstraction)
- The function sending f to ¬((1 − δ) · C/(1 + δ)^2 < (∑ i, (exp(s(f(i)))/r(f(i)))^2)/…. Lean writes fun x => …; papers write x ↦ …. (
fun f : Fin N → J => ¬ ((1 - δ) * C / (…) - Fin
- Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fin) - ¬Not
- It is not the case that (1 − δ) · C/(1 + δ)^2 < (∑ i, (exp(s(f(i)))/r(f(i)))^2)/N/…. (
¬ ((1 - δ) * C / (1 + δ) ^ 2 < ((∑ i, (…) - ∧And
- Both hold: (1 − δ) · C/(1 + δ)^2 < (∑ i, (exp(s(f(i)))/r(f(i)))^2)/N/…, and (∑ i, (exp(s(f(i)))/r(f(i)))^2)/N/((∑ i, exp(s(f(i)))/r(f(…. (
(1 - δ) * C / (1 + δ) ^ 2 < ((∑ i, (Rea…) - -Subtraction
- 1 minus δ. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
1 - δ) - +Addition
- 1 plus δ. (
1 + δ) - ∏Product
- Multiply together r(f(i)) for every i. (
∏ i, r (f i))
theorem sc-certificate-quadratic-failure {J : Type} [Fintype J] [Nonempty J] {N : ℕ} (s r : J → ℝ) (Z C K δ : ℝ) (hr : ∀ j, 0 < r j) (hrs : ∑ j, r j = 1) (hZ : Z = ∑ j, Real.exp (s j)) (hC : C = ∑ j, (Real.exp (s j) / Z) ^ 2 / r j) (hK : ∀ j, Real.exp (s j) / Z ≤ K * r j) (hN : 0 < N) (hδ : 0 < δ) (hδ1 : δ < 1) :
1 ≤ C ∧ C ≤ K ∧ ∑ f ∈ Finset.univ.filter (fun f : Fin N → J => ¬ ((1 - δ) * C / (1 + δ) ^ 2 < ((∑ i, (Real.exp (s (f i)) / r (f i)) ^ 2) / N) / ((∑ i, Real.exp (s (f i)) / r (f i)) / N) ^ 2 ∧ ((∑ i, (Real.exp (s (f i)) / r (f i)) ^ 2) / N) / ((∑ i, Real.exp (s (f i)) / r (f i)) / N) ^ 2 < (1 + δ) * C / (1 - δ) ^ 2)), ∏ i, r (f i) ≤ (K ^ 2 - 1) / (N * δ ^ 2)Improves sc-finite-sample-certificate from (K + K³)/(Nδ²) to (K² − 1)/(Nδ²) under the same envelope π ≤ K r. Uses the exact variances Var W = C − 1 and Var W² ≤ K²C − C² of the normalised weight, Chebyshev twice and a union bound, then C + K²/C − 2 ≤ K² − 1 on 1 ≤ C ≤ K. Suggested by an external review (2026-10-05). The envelope K is essential: without it a missed region can make the empirical certificate read 1 while C is arbitrarily large.
How it was proved
- Proved
- 5 October 2026
- By
- Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 226 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.