Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.3: k-decision lists are PAC learnable by the greedy decision-list algorithm, which never fails and whose outputs are consistent

Proved
ComputationalLearning.decision_lists_pac_learnable

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

decision-listsoccam-learningpac-learningsample-complexity

Theorem 2.3. For any fixed k≥1k \ge 1k≥1, the representation class of kkk-decision lists is efficiently PAC learnable.

Formally, for the greedy decision-list algorithm of p. 44 (repeatedly append a useful condition with its label and remove the examples it satisfies, until none is left), with conditions the conjunctions of kkk literals (M=(2n)kM = (2n)^kM=(2n)k of them): (i) on every sample labeled by a kkk-decision list, every partial run with examples remaining can be extended by a useful condition (the algorithm always succeeds); (ii) every complete output is consistent with its sample; (iii) for every target kkk-decision list, distribution DDD on {0,1}n\{0,1\}^n{0,1}n, 0<ϵ≤10 < \epsilon \le 10<ϵ≤1, 0<δ<10 < \delta < 10<δ<1 and m≥(1/ϵ)(ln⁡N+ln⁡(1/δ))m \ge (1/\epsilon)(\ln N + \ln(1/\delta))m≥(1/ϵ)(lnN+ln(1/δ)) with N=2(2M+1)MN = 2(2M+1)^MN=2(2M+1)M, the probability that some output of the algorithm has error greater than ϵ\epsilonϵ is at most δ\deltaδ (an output uses each condition at most once, so the hypothesis class has at most NNN members and Theorem 2.2 applies); (iv) kkk-decision lists are PAC learnable using kkk-decision lists. The book proves k=1k = 1k=1 and reduces general kkk to it by expansion; here the conditions are the kkk-conjunctions directly, so the hypothesis is a kkk-decision list.

n ≥ 1. The conditions are conjunctions of exactly kkk literals, fewer by repetition, so for k≥1k \ge 1k≥1 there is no empty (always true) condition. When no condition of the target is satisfied by a remaining example, every remaining example carries the target's default bit, and then any condition satisfied by a remaining example is useful; such a condition exists as soon as there is a variable. With n=0n = 0n=0 and k≥1k \ge 1k≥1 there are no conditions at all, and the greedy algorithm would fail on every nonempty sample, so the statement takes the book's n≥1n \ge 1n≥1 (variables x1,…,xnx_1, \dots, x_nx1​,…,xn​). The book's own proof, "the first condition zzz in the target decision list such that SzS_zSz​ is non-empty is a useful literal", has the same gap when every remaining example falls through to the default; the argument above closes it.

Preamble
import Definitions.Def_ComputationalLearning_Occam

open MeasureTheory
Formal statement
namespace ComputationalLearning

/-- **Theorem 2.3** (p. 43). For any fixed `k ≥ 1`, the representation class of `k`-decision lists
over `n ≥ 1` variables is (efficiently) PAC learnable, by the greedy decision-list algorithm: on a sample labeled by a
`k`-decision list the algorithm always finds a useful condition while examples remain (so it
never fails), every output is consistent with the sample, and with
`m ≥ (1/ε)(ln N + ln(1/δ))` examples, `N = 2(2M + 1)^M` for `M = (2n)^k` the number of
conditions (an output uses each condition at most once, so it is one of at most `N` lists), the
probability that some output has error greater than `ε` is at most `δ`; hence `k`-decision
lists are PAC learnable using `k`-decision lists. -/
theorem decision_lists_pac_learnable {n k : ℕ} (hn : 0 < n) (L₀ : DecisionList n k)
    (D : Measure (Cube (Fin n))) [IsProbabilityMeasure D] {ε δ : ℝ} (hε : 0 < ε) (hε1 : ε ≤ 1)
    (hδ : 0 < δ) (hδ1 : δ < 1) (m : ℕ)
    (hm : 1 / ε * (Real.log (2 * (2 * (Fintype.card (Condition n k) : ℝ) + 1) ^
      Fintype.card (Condition n k)) + Real.log (1 / δ)) ≤ m) :
    (∀ S : Fin m → Cube (Fin n) × Bool, IsLabeledBy (evalDL L₀) S →
      ∀ (steps : List (Condition n k × Bool)) (R : Finset (Fin m)),
        IsGreedyPrefix S steps R → R.Nonempty → ∃ (c : Condition n k) (b : Bool), IsUseful S R c b) ∧
    (∀ (S : Fin m → Cube (Fin n) × Bool) (L : DecisionList n k),
      IsGreedyOutput S L → IsConsistent (evalDL L) S) ∧
    sampleLaw D (evalDL L₀) m
      {S | ∃ L : DecisionList n k, IsGreedyOutput S L ∧ ε < errorOf D (evalDL L₀) (evalDL L)} ≤
      ENNReal.ofReal δ ∧
    PACLearnable (decisionListClass n k) (decisionListClass n k) := 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.4 pp. 42-44, Theorem 2.3 with its proof (the greedy algorithm, useful literals, the O(n log n)-bit encoding)
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