Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1.2: conjunctions of boolean literals are PAC learnable by the elimination algorithm with m ≥ (2n/ε)(ln 2n + ln(1/δ)) examples

Proved
ComputationalLearning.conjunctions_pac_learnable

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

boolean-conjunctionspac-learningsample-complexityunion-bound

Theorem 1.2. The representation class of conjunctions of boolean literals is efficiently PAC learnable.

Formally (sample-complexity sense, with the book's algorithm and bound, p. 17): for every target conjunction TTT over x1,…,xnx_1, \dots, x_nx1​,…,xn​, every distribution DDD on {0,1}n\{0,1\}^n{0,1}n, ϵ>0\epsilon > 0ϵ>0, 0<δ<10 < \delta < 10<δ<1 and

m≥2nϵ(ln⁡2n+ln⁡1δ):m \ge \frac{2n}{\epsilon}\Big(\ln 2n + \ln \frac{1}{\delta}\Big):m≥ϵ2n​(ln2n+lnδ1​):

the elimination hypothesis (all literals not contradicted by a positive example of the sample) is consistent with every sample labeled by TTT; the probability, under the law of mmm independent labeled examples from (T,D)(T, D)(T,D), that the elimination hypothesis has error greater than ϵ\epsilonϵ is at most δ\deltaδ; and the class of conjunctions is PAC learnable using conjunctions. The proof of p. 17: the hypothesis contains the literals of TTT so never errs on negatives; its error is at most ∑z∈hp(z)\sum_{z \in h} p(z)∑z∈h​p(z) with p(z)=Pr⁡[c(a)=1∧z=0 in a]p(z) = \Pr[c(a) = 1 \wedge z = 0 \text{ in } a]p(z)=Pr[c(a)=1∧z=0 in a]; a bad literal (p(z)≥ϵ/2np(z) \ge \epsilon/2np(z)≥ϵ/2n) survives with probability at most (1−ϵ/2n)m≤e−ϵm/2n(1 - \epsilon/2n)^m \le e^{-\epsilon m/2n}(1−ϵ/2n)m≤e−ϵm/2n, and the union bound over 2n2n2n literals gives 2n e−ϵm/2n≤δ2n\,e^{-\epsilon m/2n} \le \delta2ne−ϵm/2n≤δ.

Preamble
import Definitions.Def_ComputationalLearning_PAC

open MeasureTheory
Formal statement
namespace ComputationalLearning

/-- **Theorem 1.2** (p. 16). The representation class of conjunctions of boolean literals is
(efficiently) PAC learnable, by the elimination algorithm: for every target conjunction `T` over
`x₁, …, xₙ`, every distribution `D` on `{0,1}ⁿ` and `ε, δ > 0`, the elimination hypothesis is
consistent with every sample labeled by `T`, and with `m ≥ (2n/ε)(ln(2n) + ln(1/δ))` examples it
has error greater than `ε` with probability at most `δ` (the bound of p. 17); hence conjunctions
are PAC learnable using conjunctions in the sample-complexity sense. -/
theorem conjunctions_pac_learnable {n : ℕ} (T : Conjunction (Fin n)) (D : Measure (Cube (Fin n)))
    [IsProbabilityMeasure D] {ε δ : ℝ} (hε : 0 < ε) (hδ : 0 < δ) (hδ1 : δ < 1) (m : ℕ)
    (hm : 2 * n / ε * (Real.log (2 * n) + Real.log (1 / δ)) ≤ m) :
    (∀ S : Fin m → Cube (Fin n) × Bool, IsLabeledBy (evalConj T) S →
      IsConsistent (evalConj (eliminate S)) S) ∧
    sampleLaw D (evalConj T) m {S | ε < errorOf D (evalConj T) (evalConj (eliminate S))} ≤
      ENNReal.ofReal δ ∧
    PACLearnable (conjunctionClass (Fin n)) (conjunctionClass (Fin n)) := by sorry

end ComputationalLearning
Source
Kearns and Vazirani, An Introduction to Computational Learning Theory, MIT Press 1994, doi:10.7551/mitpress/3897.001.0001, §1.3 pp. 16-18, Theorem 1.2 with its proof (the elimination algorithm, bad literals and the union bound)
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