Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The streaming counting floor.

Proved
CompressionDelta.stream_counting_bound

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

aether-catalogtropical

The streaming counting floor. For a stream of n messages drawn from an alphabet of 2 ^ s symbols, every lossless transmission scheme — shared pretrained decompressor plus transmitted model delta plus arithmetic-coded residuals, all of it — must use at least n * s bits on some stream. This is the floor that the amortized protocol of CompressionDelta.Amortization meets up to the one-off delta.

theorem CompressionDelta.stream_counting_bound(n s : ℕ) (hs : 1 ≤ s)
    (enc : (Fin n → Fin (2 ^ s)) → List Bool) (hinj : Function.Injective enc) :
    ∃ x : Fin n → Fin (2 ^ s), n * s ≤ (enc x).length := by sorry

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

Preamble
-- Thm stub generated from Tropical/CompressionDelta/Pigeonhole.lean
import Mathlib
import Definitions.Def_Tropical_CompressionDelta_Pigeonhole

/-!
# Amortized model-delta compression, III: the counting (pigeonhole) floor

The falsifiability gate of this research thread demands *lossless* compression with the
delta counted as part of the transmitted message.  This file supplies the hard information
theoretic floor that no such scheme can cross, in a form that is agnostic about *what* the
decompressor is: the decoder may be a gzip table, a context mixer or a 16 GB pretrained
language model — only injectivity of the encoder is used.

## Main results

* `CompressionDelta.card_shortStrings` — there are exactly `2 ^ (t + 1) - 1` bitstrings of
  length at most `t` (stated without truncated subtraction).
* `CompressionDelta.card_compressible_le` — for an injective encoder, the number of
  sources whose *entire* transmission (model delta included) is at most `t` bits is at
  most `2 ^ (t + 1) - 1`; so compressible objects are exponentially rare.
* `CompressionDelta.exists_long_codeword` — the pigeonhole bound: some source must be
  transmitted in more than `t` bits as soon as there are `2 ^ (t + 1)` sources.
* `CompressionDelta.stream_counting_bound` — the streaming form: a stream of `n` messages
  from a `2 ^ s`-symbol source needs `n * s` bits for some stream, however clever the
  shared decompressor and its transmitted delta are.
-/

open CompressionDelta

open Finset

/-! ## Counting bitstrings of bounded length -/




/-! ## The counting floor for lossless codes -/
Formal statement
theorem CompressionDelta.stream_counting_bound(n s : ℕ) (hs : 1 ≤ s)
    (enc : (Fin n → Fin (2 ^ s)) → List Bool) (hinj : Function.Injective enc) :
    ∃ x : Fin n → Fin (2 ^ s), n * s ≤ (enc x).length := by sorry
Source
https://github.com/paulklemstine/Lean/blob/53c2925a02/Catalog/Tropical/CompressionDelta/Pigeonhole.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