Formal statistical learning · Lean 4

Proof infrastructure for statistical guarantees.

FormalSLT develops reusable Lean foundations for the mathematics behind data and ML systems: VC and Rademacher theory, metric entropy and chaining, PAC-Bayes bounds, anytime-valid e-processes, and learning from dependent data.

A theorem chain from exponential processes through PAC-Bayes and adaptive trajectories to stationary and unknown-kernel certificates.
Probability mechanisms are composed into learning statements with explicit selection costs and scope.

Interactive proof map

Follow a guarantee from data to risk.

Select a regime. The mechanism changes, but the library keeps the same question in view: what may be chosen from the observed data without invalidating the conclusion?

  1. 01 · DataBinary classfinite trace
  2. 02 · ControlSauer–Shelahgrowth bound
  3. 03 · ComplexityRademacheruniform deviation
  4. 04 · ResultERM riskfinite sample
Classical learning proof route A binary hypothesis class passes through Sauer–Shelah growth control and Rademacher complexity to reach a finite-sample ERM excess-risk bound. 01 · DATA Binary class finite trace 02 · CONTROL Sauer–Shelah growth bound 03 · SELECT Rademacher uniform deviation 04 · RESULT ERM risk finite sample

Classical learning theory

Capacity control becomes a finite-sample learning guarantee.

Sauer–Shelah bounds the realized label patterns; Rademacher complexity turns that growth control into uniform deviation and ERM excess risk.

Starts with
A finite binary hypothesis class and a trace VC-dimension bound
Returns
A finite-sample uniform-deviation and ERM excess-risk bound
Open the checked theorem family

Overview film

Keep checking. Keep the guarantee.

Fixed-time guarantees can fail under repeated monitoring; one checked event can cover repeated looks. This repo-wide film starts there, then maps reusable interfaces from VC and Rademacher theory through chaining, PAC-Bayes, and dependent trajectories. It establishes a broader proof stack; the controlled queue appears only as one worked application.

Inspect the Manim source and fact receipt
Fact-bound 1080p Manim render with an original sparse score. The exact source revision, score plan, audio measurements, and asset hashes are recorded with the film.

How claims are labeled

Proved
A Lean theorem in this build, with the public axiom audit limited to propext, Classical.choice, and Quot.sound.
Proved composition
A proved public endpoint assembled from checked mechanism lemmas. This describes proof structure, not its relationship to prior literature.
Conditional
A public application claim that materially relies on a supplied certificate or explicitly unproved proposition, not merely an ordinary theorem hypothesis.
Open
A target or generalization that is not represented as a completed theorem.
Literature fidelity
REPRODUCTION, SPECIALIZATION, and DERIVED VARIANT are an independent axis recorded in the literature ledger.

A connected research program

From classical generalization to dependent data

The project develops reusable foundations first, then composes them into sequential and dependent-data results.

Checked foundations · classical learning theory

VC, Rademacher complexity, and chaining

The library includes Sauer–Shelah growth bounds, VC-based uniform-deviation and ERM excess-risk bounds, symmetrization, contraction, linear-predictor bounds, and finite and total-bounded chaining interfaces.

Browse the theorem index

Proved composition · IID endpoint

All-sample-size empirical-Bernstein PAC-Bayes

The IID endpoint gives one all-sample-size event for continuous posterior measures. The forward route supports post-data finite model and predictable-strategy posteriors with separate KL costs, and a countable fixed scalar-tilt master over arbitrary measurable hypotheses and eligible continuous posteriors. Exact finite and countable sleeping-expert masters provide executable wealth competition over declared strategies.

Read for statistics and ML

Proved compositions · two state-space regimes

Adaptive trajectory inference

The growing-prefix oracle supports continuous posterior measures on arbitrary measurable state and hypothesis spaces. It selects the exact observable boundary over the reporting-time geometric prefix, retains ordinary monitored conditional-risk semantics, and proves vanishing width under an explicit pathwise posterior-KL rate.

Read for probability

Proved compositions · finite-state stationary layer

Stationary Poisson and unknown-kernel certification

Finite-depth Poisson corrections connect trajectory risk to stationary risk. A selected empirical catalog adds transition confidence, contraction transfer, and the exact branch under which the invariant law is unique.

Inspect the verification boundary

Six highlighted endpoints

Start from the data regime.

Each row gives the usable theorem and the nearest boundary it does not cross.

  1. A

    Proved composition · IID · continuous posterior measures

    exists_continuousInfiniteEmpiricalBernstein_event

    One prior-dependent event works for every n ≥ 2 and every admissible posterior measure on an arbitrary measurable hypothesis space, for bounded losses over a finite IID observation type.

    Boundary. This is an offline simultaneous event built by reverse stitching. It is not itself a forward e-process, an optional-stopping result, or an all-real-tilt optimization.

  2. B

    Proved composition · adaptive finite-state dynamics

    exists_trajectoryCountableEmpiricalBernsteinPACBayes_allTime_vanishing_event

    For finite states, arbitrary prefix-dependent kernels, and bounded predeclared trajectory scores, the common event covers every declared tilt atom and path- and time-dependent posterior PMFs. The capstone substitutes the explicit n-dependent geometric atom and proves that selected width vanishes.

    Boundary. The endpoint starts from a fixed state and does not allow new score-catalog members learned after observing outcomes. Countable confidence allocation is not itself a master e-process.

  3. C

    Proved composition · arbitrary measurable spaces

    exists_continuousMeasurableTrajectoryGrowingPrefixForwardBesselPACBayesOracle_event

    One outer event supports every reporting time, an eligible continuous posterior selected from the path, and exact minimization over the growing geometric tilt prefix for prefix-dependent kernels on arbitrary measurable state and hypothesis spaces.

    Boundary. The endpoint starts from a fixed state and requires a jointly strongly measurable bounded score family. The exact argmin is noncomputable, and vanishing width requires the displayed pathwise posterior-KL rate.

  4. D

    Proved composition · conditional inputs · known finite-state kernel

    exists_stationaryPoissonDepthSelection_allTime_vanishing_event

    Given an invariant PMF, a nonnegative D bounding each centered row-risk oscillation, and explicit oscillation contraction, logarithmic finite-depth Poisson potentials and geometric tilt selection yield an all-time stationary boundary that tends to zero.

    Boundary. The theorem is finite-state and assumes the kernel, invariant PMF, contraction, and oscillation bound are supplied. It is not a continuous-state mixing-time result or a learned-nuisance guarantee.

  5. E

    Proved composition · empirical transitions · finite catalog

    exists_selectedCanonicalEmpiricalStationaryCatalog_event

    A finite predeclared candidate and depth catalog combines same-path risk and transition confidence, post-path selection, contraction transfer, a canonical invariant PMF, and a conditional uniqueness conclusion.

    Boundary. Every state row must be visited, candidates must be predeclared, and uniqueness only follows on the selected strict-contraction branch. Arbitrary path-fitted candidates are outside the theorem.

  6. F

    Proved composition · current main · observable adaptive oracle

    exists_trajectoryGrowingPrefixForwardBesselPACBayesOracle_event

    For finite hypotheses and finite-state prefix-dependent trajectories, one event permits path- and time-selected posteriors and exact minimization over the reporting-time prefix of a geometric tilt catalog. It controls posterior-averaged monitored conditional loss by empirical prequential loss plus an observable boundary, bounds that boundary by an explicit LIL-order envelope, and proves the width tends to zero.

    Underlying generic result: exists_growingPrefixForwardBesselPACBayesOracle_event.

    Boundary. Scores and the countable tilt catalog are fixed before the path. The minimizer is over a finite declared prefix, not all real tilts; the selected boundary is not itself an e-process. This endpoint is on current main and is not part of the tagged v0.2 compatibility allowlist.

Four ways in

Start from the language you use

Inspect the artifact

Every public route ends at declarations or source.