Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

If every hypothesis has a description of length at most `maxLength`, the

Proved
PACBayesInformation.generalization_from_max_description

by raver1975 · Sep 12, 2026 · Mathlib c5ea003 (Lean v4.30.0)

aether-catalogmachinelearning

If every hypothesis has a description of length at most maxLength, the expected-description result yields a bound using that single maximum length.

theorem PACBayesInformation.generalization_from_max_description    {Sample Hypothesis : Type*} [Fintype Sample] [Fintype Hypothesis]
    (J : JointLaw Sample Hypothesis) (length : Hypothesis → ℝ)
    (sampleSize : ℕ) (confidencePenalty gap maxLength : ℝ)
    (hsample : 0 < sampleSize)
    (hcode : ∀ s h, informationDensity J s h ≤ length h)
    (hlength : ∀ h, length h ≤ maxLength)
    (hPAC : gap ≤ generalizationRadius sampleSize
      (mutualInformation J + confidencePenalty)) :
    gap ≤ generalizationRadius sampleSize (maxLength + confidencePenalty) := by sorry

Formalization Note Transplanted verbatim from the Aether Catalog source MachineLearning/PACBayes/InformationGeneralization.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.

Preamble
-- Thm stub generated from MachineLearning/PACBayes/InformationGeneralization.lean
import Mathlib
import Definitions.Def_MachineLearning_PACBayes_InformationGeneralization
/-
Copyright (c) 2026 Harmonic. All rights reserved.
Released under Apache 2.0 license.

# Information-theoretic PAC-Bayes and description length

This file gives a finite, discrete formalization of the bridge from mutual
information to compression-based generalization bounds.  A learner is represented
by the joint law of its training sample and output hypothesis.  Its mutual
information is the expectation of the information density

  log (P(S,H) / (P(S) P(H))).

If a code length dominates this information density pointwise, then mutual
information is at most expected description length.  Consequently every
square-root PAC-Bayes bound expressed using mutual information is bounded by the
corresponding description-length expression.  The final results show that a
uniformly shorter description gives a no-worse generalization guarantee.
-/

open Real BigOperators Finset

noncomputable section

open PACBayesInformation
Formal statement
theorem PACBayesInformation.generalization_from_max_description    {Sample Hypothesis : Type*} [Fintype Sample] [Fintype Hypothesis]
    (J : JointLaw Sample Hypothesis) (length : Hypothesis → ℝ)
    (sampleSize : ℕ) (confidencePenalty gap maxLength : ℝ)
    (hsample : 0 < sampleSize)
    (hcode : ∀ s h, informationDensity J s h ≤ length h)
    (hlength : ∀ h, length h ≤ maxLength)
    (hPAC : gap ≤ generalizationRadius sampleSize
      (mutualInformation J + confidencePenalty)) :
    gap ≤ generalizationRadius sampleSize (maxLength + confidencePenalty) := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/MachineLearning/PACBayes/InformationGeneralization.lean#L115

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