Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.2: by Occam's Razor the elimination algorithm needs only m ≥ (1/ε)(ln(3ⁿ + 1) + ln(1/δ)) examples

Proved
ComputationalLearning.conjunctions_occam_bound

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

boolean-conjunctionsoccam-learningsample-complexity

§2.2 (p. 38). The elimination algorithm always outputs a conjunction consistent with its sample, so it is an Occam algorithm; the number of conjunctions over x1,…,xnx_1, \dots, x_nx1​,…,xn​ is bounded by 3n3^n3n (each variable occurs positively or negatively or is absent), so applying Theorem 2.2, O((1/ϵ)log⁡(1/δ)+n/ϵ)O((1/\epsilon)\log(1/\delta) + n/\epsilon)O((1/ϵ)log(1/δ)+n/ϵ) examples are sufficient to guarantee that the hypothesis has error less than ϵ\epsilonϵ with confidence at least 1−δ1 - \delta1−δ, an improvement by a logarithmic factor over Chapter 1.

Formally: for every target conjunction TTT, every distribution DDD on {0,1}n\{0,1\}^n{0,1}n, 0<ϵ≤10 < \epsilon \le 10<ϵ≤1, δ>0\delta > 0δ>0 and m≥(1/ϵ)(ln⁡(3n+1)+ln⁡(1/δ))m \ge (1/\epsilon)(\ln(3^n + 1) + \ln(1/\delta))m≥(1/ϵ)(ln(3n+1)+ln(1/δ)), the probability that the elimination hypothesis has error greater than ϵ\epsilonϵ is at most δ\deltaδ. The count 3n+13^n + 13n+1 includes the empty concept, which the elimination algorithm outputs (as a contradictory conjunction) on a sample without positive examples.

Preamble
import Definitions.Def_ComputationalLearning_Occam

open MeasureTheory
Formal statement
namespace ComputationalLearning

/-- **§2.2, the improved sample size for conjunctions** (pp. 37–38). The elimination algorithm is
an Occam algorithm for conjunctions, and the hypothesis class it uses has at most `3ⁿ + 1`
concepts (each variable positive, negated or absent, plus the empty concept of a contradictory
conjunction); by Theorem 2.2, `m ≥ (1/ε)(ln(3ⁿ + 1) + ln(1/δ))`, i.e.
`O((1/ε) log(1/δ) + n/ε)`, examples suffice for error at most `ε` with confidence `1 − δ`, a
logarithmic improvement over the bound of Chapter 1. -/
theorem conjunctions_occam_bound {n : ℕ} (T : Conjunction (Fin n)) (D : Measure (Cube (Fin n)))
    [IsProbabilityMeasure D] {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1) (hδ : 0 < δ) (m : ℕ)
    (hm : 1 / ε * (Real.log (3 ^ n + 1) + Real.log (1 / δ)) ≤ m) :
    sampleLaw D (evalConj T) m {S | ε < errorOf D (evalConj T) (evalConj (eliminate S))} ≤
      ENNReal.ofReal δ := by sorry

end ComputationalLearning
Source
Kearns and Vazirani, An Introduction to Computational Learning Theory, MIT Press 1994, doi:10.7551/mitpress/3897.001.0001, §2.2 pp. 37-38, the improved sample size for learning conjunctions
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me