Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Failure probability of the block scheme.

Proved
AlmostLossless.blockScheme_failure_bound

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

aether-catalogbridges

Failure probability of the block scheme. It is at most the sum of the per-block failure probabilities: the union bound over blocks, with no exponential blow-up.

theorem AlmostLossless.blockScheme_failure_bound(μ : FinProbDist β) (l : Fin b → List β)
    (h : Fin b → β → Fin m) (e : ℝ)
    (hblock : ∀ j, setMass μ (Finset.univ.filter
        (fun y => ¬ (hashScheme (l j) (h j)).Succeeds y)) ≤ e) :
    setMass (powDist μ b) (Finset.univ.filter
        (fun x : Fin b → β => ¬ (blockScheme l h).Succeeds x)) ≤ b * e := by sorry

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

Preamble
-- Thm stub generated from Bridges/AlmostLosslessBlockDecoding.lean
import Mathlib
import Definitions.Def_Bridges_AlmostLosslessBlockDecoding
import Definitions.Def_Bridges_AlmostLosslessCompression
import Definitions.Def_Bridges_AlmostLosslessRandomCoding
import Definitions.Def_Bridges_MinEntropy
/-
Copyright (c) 2025 Non-Archimedean Information Theory Project. All rights reserved.

# Almost-Lossless Compression III: Beating the Exponential Decoder

## Bridge: Product measures (probability) ↔ Verified algorithm cost (computation)

The naive random-coding decoder of `AlmostLosslessRandomCoding` scans the whole
codebook.  On a block source `β^b` with a typical set `T^b` the codebook has
`|T|^b` entries, so decoding is *exponential in the block length*.

This file removes that obstacle.  We decode **coordinatewise**: each of the `b`
blocks gets its own unique-match scan over the size-`|T|` codebook, and the
answers are assembled.  The results:

* `powDist_marginal` — exact marginalization for the `b`-fold product source;
* `setMass_powDist_exists_le` — a union bound over blocks for the product source;
* `blockDec_eq_some_iff` — the block decoder is *exactly* the coordinatewise
  decoder, so it never corrupts silently on the product codebook;
* `blockScheme_failure_bound` — failure probability `≤ b · (per-block failure)`;
* `blockScanCost_eq_sum` / `blockScanCost_const` — cost is exactly `b·|T|`
  hash evaluations, versus `|T|^b` for the naive scan
  (`naive_codebook_card`), and `linear_lt_pow` shows the gap is genuine.

## Impact: polynomial_time_random_coding, certified_decoder_cost
-/


open Finset BigOperators NonArchInfoTheory

open AlmostLossless

/-! ## Section 1: The `b`-fold product source -/


variable {β : Type*} [Fintype β] [DecidableEq β]





/-! ## Section 2: The coordinatewise (block) decoder -/


variable {β : Type*} [Fintype β] [DecidableEq β] {b m : ℕ}







/-! ## Section 3: Failure probability of the block scheme -/
Formal statement
theorem AlmostLossless.blockScheme_failure_bound(μ : FinProbDist β) (l : Fin b → List β)
    (h : Fin b → β → Fin m) (e : ℝ)
    (hblock : ∀ j, setMass μ (Finset.univ.filter
        (fun y => ¬ (hashScheme (l j) (h j)).Succeeds y)) ≤ e) :
    setMass (powDist μ b) (Finset.univ.filter
        (fun x : Fin b → β => ¬ (blockScheme l h).Succeeds x)) ≤ b * e := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/Bridges/AlmostLosslessBlockDecoding.lean#L176

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