AFTD Auto-Formalizing Theoretical Domains

littlestone_shatters

def

For a class H of functions X → Bool and a natural number d, H shatters a complete binary tree of depth d (internal nodes labelled by points of X, the two edges below a node labelled false and true, every root-to-leaf path realized by some h in H). Defined by recursion on d: at d = 0 it means H is nonempty; at d + 1 it means there is a point x such that both {h ∈ H | h x = false} and {h ∈ H | h x = true} shatter a tree of depth d.

Statement

def littlestone_shatters {X : Type*} (H : Set (X → Bool)) (d : ℕ) : Prop
Defined in
arXiv:2611.26721 (Littlestone dimension and its dual), Section 2 (shattered complete binary trees).
Verified
27 Nov 2026
Axioms
none listed
Used by 3
  • littlestone_dim_le_restrict_add_restrict_complFor every nonempty class H of functions X → Bool and every subset Y of X, the Littlestone dimension of H (in ℕ∞) is at most the…
  • littlestone_dim_singletonA class consisting of a single function X → Bool has Littlestone dimension 0.
  • littlestone_dimThe Littlestone dimension of a class H of functions X → Bool, valued in ℕ∞: the supremum of the depths d such that H shatters a complete…

Read back from the Lean

Given a type X, a set of functions H : Set (X → Bool), and a natural number d : ℕ, littlestone_shatters H d is defined by recursion on d: - For d = 0: H is nonempty (H.Nonempty). - For d = d' + 1: there exists an element x : X such that both {h ∈ H | h x = false} and {h ∈ H | h x = true} satisfy littlestone_shatters _ d'.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

def littlestone_shatters {X : Type*} (H : Set (X → Bool)) (d : ℕ) : Prop :=
  match d with
  | 0 => H.Nonempty
  | d + 1 => ∃ x : X, littlestone_shatters {h ∈ H | h x = false} d ∧
      littlestone_shatters {h ∈ H | h x = true} d
See it in the graphDiscuss this resultChallenge it