Manuscript Offprint
arXiv:2610.22404Aligning Information Theory and Formal Verification: A Lean Formalization of Rate-Distortion Theory
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Fubin Yan, Ruxuan Dong, Ruoxuan Shi, Duolei Wang, and Kenneth W. Shum
School of Science and Engineering
The Chinese University of Hong Kong, Shenzhen
Shenzhen, China.
Abstract—Large language models have recently demonstrated an ability to generate substantial mathematical proofs and formalizations, including machine-checked arguments for major open problems and classical theorems. These developments highlight a growing workflow in which AI systems search for proofs while proof assistants certify their correctness. Within information theory, however, formalized libraries remain limited, and existing formalized theorems focus almost exclusively on Shannon's foundational lossless theorems. This paper presents the first Lean formalization of core components of rate–distortion theory, a central framework for lossy compression and modern machine-learning analysis. We identify the alignment challenges that arise when translating information-theoretic definitions, such as distortion measures, typicality and achievability, into a proof-assistant setting, and we develop a reusable library of definitions and lemmas faithful to textbook conventions. Our formalization provides a foundation for future AI-assisted proofs in information theory and enables subsequent mechanized developments to build on a coherent, verified infrastructure rather than generating long proofs from scratch.
Keywords: Rate-distortion theory, computer proof assistant, vibe proving, AI for math, Lean.
I. INTRODUCTION
Recent breakthroughs in AI-assisted mathematics have demonstrated that large language models can now produce substantial, technically sophisticated proofs, either with human guidance or even from a single prompt. Two landmark examples are a solution attempt for the Navier–Stokes equation and a complete computer formalization of Fermat's Last Theorem. In September 2026, an internal OpenAI model generated a 166-page proof of Statements C and D from the Clay Mathematics Institute's millennium prize announcement [1], and verified its correctness in Lean. In the same month, Anthropic's Claude produced a full formalization of Fermat's Last Theorem, comprising 13.4 million lines of Lean code and 29,500 intermediate lemmas [2].
These developments illustrate an emerging workflow for AI-assisted mathematics. Before an AI system can effectively search for a proof, the relevant definitions, hypotheses, and target statements must be expressed with complete precision. After a proof is found – especially one that is long or LLM generated – formal verification provides a mechanism to certify that no hidden gaps remain in the formal proof relative
TABLE I RECENT AI-ASSISTED WORKS IN INFORMATION THEORY
| Topic | Lean formalized | Reference |
|---|---|---|
| Cyclic Hadamard matrix and Barker sequence conjecture | no | [3] |
| Three conjectures about doubly symmetric binary source | yes | [4] |
| Weak Hellinger inequality for noisy Boolean channels | yes | [5] |
| Upper bound on binary deletion channel capacity | yes | [6] |
| Sub-optimality of Marton inner bound | no | [7] |
| Classification of (n, 4)cdoe for binary symmetric channel | yes | [8] |
| Improvement of MRRW bound | yes | [9] |
| Improved lower bound on zero-error capacity of | yes | [10]-[12] |
to the stated definitions and hypotheses. Table I summarizes several recent results in information theory obtained with assistance from AI systems.
For elementary combinatorial or algebraic problems, the computer formalization step is often straightforward. In contrast, many problems in information theory require a substantial layer of background definitions and customary conventions before the statement itself becomes mathematically meaningful. Concepts such as entropy, mutual information, KL divergence, typicality, and asymptotic achievability form a specialized language for reasoning about communication systems and statistical learning. Ensuring that formal definitions and theorem statements faithfully capture the intended mathematics is known as the alignment problem. Lean verifies proofs against the formal definitions and statements, but their correspondence with the intended mathematics requires separate checking. Bastounis, Circelli, and Hansen [13] discuss mismatches between natural-language arguments and their Lean formalizations.
In our development, we checked the formal definitions and theorem statements against the intended mathematics before using AI assistance to complete the proofs. This method allows us to benefit from the speed of AI-assisted code generation while reducing the risk of mismatches with the intended mathematics.
Despite recent advances in auto-formalization, the Lean proofs produced in the works listed in Table I are not easily reusable in other projects. For example, the proof of the improved MRRW bound in [9] is so long that reading it line by line is infeasible for humans. If a new AI-generated proof is produced and one wishes to verify it in Lean, current AI models typically start from scratch and generate yet another lengthy proof. A well-designed library of definitions and theorems in Lean, that is aligned with textbook conventions and standard information-theoretic practice, is therefore essential for simplifying future formalization efforts and enabling reuse across projects.
Currently, the mathematical library of Lean contains some basic results in information theory, such as KL divergence and Hamming distance. However, the library is not complete and the development is on-going. In a companion of the proof of polynomial Freiman–Ruzsa conjecture [14], Tao and his collaborators need the Ruzsa distance in their project, and for this purpose, they implemented Shannon entropy and mutual information for up to three random variables [15]. Luccioli in his master's thesis formalized f-divergences, and the associated data processing inequality in Lean [16]. Concentration inequalities, Rademacher complexity and Dudley's entropy integral theorem for sub-Gaussian processes are implemented in [17], [18], providing a formal foundation for statistical learning theory. A more comprehensive project on building a Lean library for machine learning research was initiated by Degenne and Rauber [19], with the aim of analyzing machine learning algorithms in Lean.
Rate–distortion theory is a central branch of classical information theory, characterizing the minimum communication rate required to represent a source subject to a prescribed distortion constraint. In recent years, it has also become an important tool in the analysis and design of neural networks and machine-learning systems. Since Shannon’s foundational work and its systematic development in standard texts such as Berger [20], Viterbi and Omura [21], Cover and Thomas [22], McEliece [23], and Yeung [24], rate–distortion arguments have become indispensable in lossy compression, quantization, statistics, learning theory, and network information theory.
Although rate–distortion theory plays a central role in information theory, it has not yet been formalized in mainstream proof assistants. Existing computer formalization in information theory have focused primarily on Shannon’s foundational lossless results, and have been carried out mainly in Isabelle/HOL or the Rocq proof assistant. Mhamdi, Hasan, and Tahar formalized entropy measures in HOL [25]. In parallel, Affeldt, Hagiwara, and Senizergues developed a substantial formalization of core Shannon theory—including coding theorems and typical-sequence arguments—first reported in [26] and later expanded in [27]. This line of work was consolidated into the infotheo library, which provides a Rocq infrastructure for classical coding theorems [28], and has supported further case studies such as the formalization of the binary symmetric erasure channel [29]. In another direction, a Lean formalization of quantum information theory has recently been developed in [30].
This paper fill this gap by initiating a Lean formalization of the core of rate–distortion theory for finite alphabets. We introduce the information measures, including entropy, KL divergence, and mutual information, using Mathlib's existing infrastructure. We then establish the supporting inequalities and probabilistic estimates, and use them to prove the direct and converse results of the rate–distortion theorem. The direct result establishes achievability for , with every code satisfying the prescribed rate bound, while the converse holds for all distortion thresholds. Under an asymptotic rate constraint, we also prove achievability at whenever is finite. We also establish the existence of optimal test channels and the right continuity of the information rate–distortion function. This work also provides some reusable definitions and lemmas in information theory built on Mathlib. The long-term objective is to build a library for reusable formalization that can be extended toward more advanced topics, such as multi-terminal problems, information geometry, and statistical learning theory.
The remainder of this paper is organized as follows. We review the problem formulation of rate-distortion problem for finite alphabet in Section II, and define the basic information measures, such as entropy, KL divergence and mutual information in Section III. In Section IV, we define the information rate-distortion function as the optimal value of an optimization problem with mutual information as the objective function. After setting up these prerequisites, we formulate the operational rate-distortion problem in Section V and state the direct and converse parts of the rate-distortion theorem in Lean. Section VI presents the formal proofs and discusses the reusable components developed along the way. Finally, Section VII concludes the paper.
We consider lossy compression with a fixed block length n and finite alphabet. The source data is encoded to an element in , which is sent to the decoder with no error. The decoder then computes the estimate . We assume that random variables and , for , take value in and . In general, may not be the different from
Definition 2.1: An rate distortion code consists of an encoder
and a decoder
A sequence in the image of the decoder function dec is called a codeword. The rate of an code is defined as . (see Fig. 1)

Fig. 1. Rate distortion code.
We aim at minimizing a per-letter distortion function
A distortion function d is said to be bounded if
We extend the distortion function to vector input:
for and in .
Example 2.1: (Mean-squared error) The distortion measure
defined for is called the mean-squared distortion. The corresponding distortion between two real vectors and is the squared Euclidean distance between and .
The k-means clustering is an example of rate distortion code with mean-squared error. The source distribution is the empirical distribution of the data set.
When and are finite, we can represent the distortion function by an matrix
This matrix is called the distortion matrix.
Example 2.2: Suppose the alphabet is , and the output of decoder can take values in . We define a distortion function by matrix
This distortion between and is the absolute value .
In the general formulation of rate distortion, the components of input sequence X may not be independent. We can assume that X follows a general joint distribution on . The average distortion of an code is
Definition 2.2: A rate distortion-pair is called achievable if there exists a sequence of rate distortion codes with increasing length, such that the rates are all less than or equal to , and
The random vector is the estimate of . The rate-distortion region is the closure of the set of all achievable rate-distortion pairs.
Cover and Thomas in their textbook [22], define achievability by
This definition is simpler, but requires that the limit exists. In contraast, the limsup of a sequence of numbers always exists, and hence (2) is more flexible. Intuitively speaking, achievability means that we can get arbitrarily close to the point by designing rate distortion codes of long block lengths.
Remark 2.1: In the literature, there is an alternate criterion for achievability, obtained by replacing (2) by
for and . That is, if we generate input sequence randomly according to distribution , then the distortion measure is less than with probability at least . Lossy compression with this objective function is sometime called “source coding with a fidelity criterion,” and it is treated in [24].
A. Information rate-distortion function
We consider the simplest probability model and suppose that the source symbols are generated independently from a known distribution . We use the notation to denote a generic random variable that has the same distribution as .
Every conditional distribution induces a joint distribution of X and ,
Using the joint distribution we can compute the expected distortion and mutual information .
Definition 2.3 (Information rate distortion function): For , define
The minimum is taken over all conditional distribution function such that .
Alternately, we may write (3) as
with the minimum over all random variables that are jointly distributed with X, such that the expected distortion is less than or equal to D. Since is fixed, we need to consider all conditional distribution function that satisfy the average distortion constraint. The conditional distribution function is sometime called the test channel.
When and are finite, the test channel is specified by variables. Since is convex as a function of , and is a convex constraint, the minimum in (3) is well-defined, and is achieved by at least one choice of .
Definition 2.4: Let
denote the least average distortion over all , and
be the smallest attainable average distortion.
We can achieve distortion with zero rate. The decoder always outputs the symbol that minimizes the average distortion . By letting to be a constant random variable that equals with probability 1 in (3), we see that for all (because ).
On the other extreme, suppose the encoder sends all the symbols to the decoder. In this scenario, the decoder can minimize the distortion by returning the symbol
The output of the decoder is a deterministic function of X. The mutual information equals
Since is distributed according to , we can achieve average distortion with rate . Furthermore, since , we get
Since this is the smallest possible distortion, we have if .
Example 2.3: Consider a binary source with distribution
and distortion matrix
If the decoder returns the constant 1, the average distortion is . If the decoder returns the constant 0, the average distortion is . Hence, the least average distortion is .
If we increase distortion , the feasible set corresponding to becomes larger, and the minimum value either becomes smaller or does not change. Therefore, the information distortion function is non-increasing. In fact, one can prove that is strictly decreasing for .
Theorem 2.5: Suppose alphabet is finite. For , the information rate distortion function is strictly decreasing.
Theorem 2.6: The function is convex for .
The rate distortion theorem states that the information distortion function is the solution to the rate distortion problem, providing the fundamental tradeoff between rate and distortion. The rate-distortion region is precisely the points above the curve .
Theorem 2.7: Suppose alphabet and are finite and the distortion function is upper bounded by a constant . For any probability distribution defined on , we have
-
If , the rate distortion pair is achievable;
-
If , the rate distortion pair is not achievable.
III. LEAN FORMALIZATION OF INFORMATION MEASURES
We work with finite source and reproduction alphabets X and Y, which are expressed in Lean by the type class Fintype. For simplicity, we will treat finite types as finite sets. We impose that equality is decidable by DecidableEq.
-- finite alphabets variable {X Y : Type*} [Fintype X] [Fintype Y] [DecidableEq X] [DecidableEq Y]
Lean’s Mathlib represents a probability mass function on a finite type X as PMF X. A value P : PMF X is a function assigning to each x of type X a nonnegative real number summing to 1. Internally, probabilities are stored as ENNReal (the extended nonnegative reals ). When calculating entropy, we typically work in the real number system because we need logarithms; thus we often convert probabilities to reals using toReal.
A. Entropy
The Shannon entropy is defined in the standard way:
Here and throughout the paper, log denotes the natural logarithm. In Lean, the sum over a finite type is written using the summation notation , . The implementation below follows the formula directly. Here, Real.negMulLog p denotes .
A technical point is the convention at . Mathlib defines Real.log 0 = 0, which makes the term evaluate to 0, matching the standard information-theoretic convention.
-- Entropy function noncomputable def shannonEntropy (P : PMF X) : R := , Real.negMulLog (P x).toReal
-- We use the convention that in entropy calculations example : Real.log 0 = 0 := by exact Real.log_zero
-- convention that example : - (0 : R) * Real.log 0 = 0 := by simp [Real.log_zero]
Remark: Some definitions in Mathlib (in particular those involving real logarithms, infima, and limit operations) are marked noncomputable: they are mathematically well-defined but not intended to be executed as programs. This is standard for developments that focus on theorem proving rather than computation. The code excerpts below are taken from a noncomputable section.
B. Joint entropy
A joint distribution on is represented as PMF . The joint entropy is just entropy on the product alphabet; it can be expressed by the following wrapper.
-- Joint entropy function noncomputable def jointEntropy (P_XY : PMF (X × Y)) : R := shannonEntropy P_XY
C. KL divergence and mutual information
Given distributions P and Q on the same alphabet, the Kullback–Leibler divergence is
where represents the support of distribution . This formula applies when ; otherwise, the divergence is . In formalization, we need to handle both the case , where the summand is taken to be 0, and the case but , where the divergence is . The following code uses Mathlib's definition of KL divergence for the measures associated with and .
/-- Definition of KL divergence -/ noncomputable def kl_divergence (P Q : PMF X) : ENNReal := let I : MeasurableSpace X := T InformationTheory.klDiv P.toMeasure Q.toMeasure
To define mutual information from a joint distribution , we use the identity
where and are the marginals of and is the product distribution.
In Lean, the marginals are obtained via map applied to Prod.fst and Prod.snd. The product distribution is built using the PMF monadic operations: bind corresponds to sampling and then sampling independently, and map packages the pair .
/-- definition of product distribution Q_XY = P_X ⊗ P_Y -/ def product_pmf (P_X : PMF X) (P_Y : PMF Y) : PMF (X × Y) := P_X.bind (fun x => P_Y.map (fun y => (x, y)))
/-- Mutual information based on KL divergence -/ noncomputable def mutual_information (P_XY : PMF (X × Y)) : ENNReal := let P_X := P_XY.map Prod.fst -- marginal p x let P_Y := P_XY.map Prod.snd -- marginal p y
-- Mutual information is given by D(P_XY // Q_XY). kl_divergence P_XY (product_pmf P_X P_Y)
The above Lean program is a compact and faithful encoding of the textbook definitions: entropy is a finite sum over the alphabet, KL divergence uses Mathlib's measure-theoretic definition, and mutual information is defined as KL divergence to the product of marginals.
IV. DEFINING THE RATE–DISTORTION FUNCTION
In this section we explain how to define the rate–distortion function using the standard “test channel” (conditional distribution) formulation. Fix a source distribution P on X and a distortion function . A test channel is a conditional distribution on Y for each element x in X. In Lean, we represent such a conditional distribution as a function W : X → PMF Y.
A. Distortion function and single-letter expected distortion
We model the distortion measure as an NNReal-valued function, so that each distortion value is finite and nonnegative. Since the alphabets are finite, the distortion measure is bounded. The expected single-letter distortion under P and W is
This becomes a nested finite sum in Lean.
-- Distortion function def Distortion := X → Y → NNReal -- Single-letter expected distortion noncomputable def expected_distortion_single (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) : ENNReal := ∑ x, P x * (∑ y, (W x) y * (d x y : ENNReal))
The distortion values are embedded into ENNReal when computing the expectation.
B. Induced joint distribution
From P and a test channel W, we build the induced joint distribution
The code again uses bind and map: “sample ; then sample ; return ”.
-- Induced joint distribution def induced_joint (P : PMF X) (W : X → PMF Y) : PMF (X × Y) := P.bind (fun x => (W x).map (fun y => (x, y)))
C. Information rate-distortion function
In Lean, we implement the infimum using sInf, which here takes the infimum of a set of extended nonnegative real numbers. The set we take the infimum over is the collection of all extended nonnegative real numbers r such that there exists a test channel W with distortion at most D and mutual information exactly r.
-- Information rate-distortion function noncomputable def RateDistortionFunction (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) : ENNReal := sInf { r : ENNReal | ∃ (W : X → PMF Y), expected_distortion_single P W d ≤ D ∧ mutual_information (induced_joint P W) = r }
If no test channel satisfies the distortion constraint, the set is empty and its infimum in ENNReal is +∞.
This completes the formal definition of the rate–distortion function in the “test channel” form. The key point is that the Lean code mirrors the textbook definition closely: (i) test channels are functions X → PMF Y, (ii) the induced joint distribution is built by composition of sampling steps (bind/map), (iii) the distortion constraint is expressed as an inequality in ENNReal, and (iv) the rate–distortion function is an infimum of mutual informations over all channels satisfying the constraint.
V. FORMALIZATION OF THE RATE DISTORTION PROBLEM
This section explains how we encode the formulation of the classical rate–distortion problem. The goal is not to assume prior familiarity with Lean, but to show that the definitions closely mirror the standard mathematical ones: finite alphabets, block codes, (average) distortion, expected distortion under an i.i.d. source, sequences of codes, and the usual asymptotic achievability notion.
A. Distortion measures
We also parameterize the development by a block length n and a codebook size M, together with positivity assumptions (used later to avoid degenerate divisions and empty codebooks).
-- blocklength and codebook size are positive variable (n M : N) (hM : 0 < M) (hn : 0 < n)
A (single-letter) distortion measure is a function
We represent this as a function , where NNReal denotes the nonnegative real numbers. Since the alphabets are finite, the distortion measure is bounded.
In the snippet below we introduce the type of codes at block length n and size M:
-- The type of codes with blocklength n and codebook size M def MyCode := RateDistortionCode X Y n M
Blocks and are represented as functions on Fin n, and codeword indices are represented by Fin M, which is a type representing integers in .
-- Distortion function def Distortion := X → Y → NNReal
-- Blocks of length n abbrev Xblock (n : N) (X : Type*) := Fin n → X abbrev Yblock (n : N) (Y : Type*) := Fin n → Y abbrev Index (M : N) := Fin M
B. Rate-distortion codes
A rate–distortion code consists of an encoder and a decoder . We use structure in Lean to pack the encoder and decoder together.
-- A rate-distortion code consists of an encoder and a decoder. structure RateDistortionCode (X Y : Type*) [Fintype X] [Fintype Y] (n M : N) where encoder : Xblock n X → Index M decoder : Index M → Yblock n Y
C. Block distortion and code rate
Given a single-letter distortion function , we define the block distortion as the average per-letter distortion:
We implement this by summing the distortion over the coordinates indexed by Fin n and dividing by n.
-- Block distortion def blockDistortion (hn : 0 < n) (d : Distortion (X := X) (Y := Y)) (x : Xblock n X) (y : Yblock n Y) : ENNReal := let sum_dist := ∑ i : Fin n, (d (x i) (y i) : ENNReal) sum_dist / n
The coding rate R is defined as .
-- Code rate of a rate-distortion code def codeRate (hn : 0 < n) : ℝ := (Real.log M) / n
D. Discrete memoryless source model and expected distortion
The single-letter source distribution on X is represented by PMF X. For a block , the i.i.d. probability is the product ; this is expressed as a finite product over Fin n.
-- Probability of a source block under the i.i.d. model noncomputable def probBlock (P : PMF X) (x : Xblock n X) : ENNReal := ∏ i : Fin n, P (x i)
We package these block probabilities into a probability mass function iidBlockPMF, together with a proof that they sum to 1.
noncomputable def iidBlockPMF (P : PMF X) : PMF (Xblock n X) := PMF.ofFintype (probBlock n P) (by classical simp only [probBlock] rw [← Fintype.piFinset_univ] rw [Finset.sum_prod_piFinset] simp [sum_pmf])
Given a code , the reproduction block is . The expected distortion is then
where denotes the joint probability on the -fold cartesian product of . We write this as a (possibly infinite) sum . Since and are finite, this coincides with an ordinary finite sum; using is convenient because it matches the measure-theoretic style used elsewhere in Mathlib.
-- Expected distortion of a code of length def expectedDistortion (hn : 0 < n) (code : RateDistortionCode X Y n M) (P : PMF X) (d : Distortion (X := X) (Y := Y)) : ENNReal := (blockDistortion n hn d x (code.decoder (code.encoder x)))
E. Sequences of codes and asymptotic distortion
A sequence of codes is indexed by . At index , we have an rate–distortion code satisfying the requirements specified in RateDistortionCode. Here we blocklength , which ensures that every blocklength is positive.
-- A sequence of codes with positive blocklengths structure CodeSequence (X Y : Type*) [Fintype X] [Fintype Y] where M : N → N hM : ∀ n, 0 < M n code : ∀ n, RateDistortionCode X Y (n + 1) (M n)
For a code sequence, we define the asymptotic expected distortion using a limit superior:
Since Mathlib uses filters to describe limits, we follow its method and use Filter.limsup along atTop to express the limit superior as .
-- Asymptotic expected distortion def asymptoticDistortion (seq : CodeSequence X Y) (P : PMF X) (d : Distortion (X := X) (Y := Y)) : ENNReal := Filter.limsup (fun n → expectedDistortion (n + 1) (seq.M n) (Nat.succ_pos n) (seq.code n) P d) atTop
F. Achievability of rate–distortion pairs
A pair is declared achievable under a pointwise rate constraint if there exists a code sequence whose rates are all at most and whose asymptotic expected distortion is at most . The pointwise rate condition is
Here we have two constraints: achievesDistortion expresses that asymptoticDistortion does not exceed and hasPointwiseRateBound expresses that the rate of every code is bounded by .
-- The asymptotic distortion constraint. def achievesDistortion (seq : CodeSequence X Y) (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) : Prop := asymptoticDistortion seq P d ≤ D
-- Every code satisfies the prescribed rate bound. def hasPointwiseRateBound (seq : CodeSequence X Y) (R : ℝ) : Prop := ∀ n, codeRate (n + 1) (seq.M n) (Nat.succ_pos n) ≤ R
Then, we combine the two constraints in isAchievablePointwise, which means is achievable under the pointwise rate constraint if and only if there exists a code sequence satisfying both constraints.
-- Achievability with a pointwise rate constraint. def isAchievablePointwise (P : PMF X) (d : Distortion (X := X) (Y := Y)) (R : ℝ) (D : ENNReal) : Prop := ∃ seq : CodeSequence X Y, hasPointwiseRateBound seq R ∧ achievesDistortion seq P d D
G. Statements of the direct and converse theorems
Finally, we state the rate–distortion theorem. Here achievability refers to the pointwise rate constraint defined above.
Theorem 5.1: Suppose the alphabets X and Y are finite and the distortion function is nonnegative and finite-valued. For any source distribution , rate , and distortion threshold , we have:
-
If , the rate–distortion pair is achievable.
-
If is achievable, then . Consequently, if , the pair is not achievable.
We can now state the direct and converse parts of the rate–distortion theorem as follows.
-- Direct theorem theorem rate_distortion_achievability (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hRD : RateDistortionFunction P d D < ENNReal.ofReal R) : isAchievablePointwise P d R D := by exact isAchievablePointwise_of_rateDistortionFunction_lt P d D R hRD
-- Converse theorem theorem rate_distortion_converse (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hA : isAchievablePointwise P d R D) : RateDistortionFunction P d D ≤ ENNReal.ofReal R := by exact rate_distortion_converse_pointwise_of_rightContinuousAt P d D R (rateDistortionRightContinuousAt_all P d D) hA
The distortion function is bounded because it is finite-valued and the alphabets are finite, so a separate hypothesis is no longer required. The first part of the theorem says that if is strictly larger than the information rate distortion function, then the pair is achievable. The second part is the converse: if is achievable, then . Consequently, if is strictly less than the information rate distortion function, then is not achievable.
The rate distortion theorem is now proved in Lean without sorry placeholders, and all the terms are well defined. Proofs of the rate distortion theorem can be found in standard textbooks in information theory, e.g. [22]–[24]. The main steps of the formal proof are presented in Section VI.
VI. PROOF OF THE RATE–DISTORTION THEOREM
In this section, we explain the main steps of the formal proof. We begin with the converse, as its proof involves fewer steps. We then prove achievability for with every code satisfying the prescribed rate bound. As an additional result, we prove achievability at when the rate bound is required only in the limit superior. Finally, we discuss the verification and reusable components of the development.
A. Converse
In this part, we start with the finite-block inequality
This follows from the feasibility of , convexity of mutual information under mixtures with a fixed source marginal, independence of the source coordinates, and the entropy bound imposed by the codebook size. Specifically,
where and is the joint distribution of the source symbol and its reconstruction .
Let be the rate of the code at index , and let be its expected average distortion. Under the pointwise achievability condition, we have for every and . For finite , the latter condition implies that, for any , there exists such that for every . Thus, fixing any , we obtain the following inequality chain for all sufficiently large :
Using right continuity, we obtain
For , we have , so the conclusion follows from .
Next, we explain in detail how the Lean code corresponds to the proof above.
For brevity, we replace the full proof code with ...; the full proofs are available in the source code [31].
Firstly, the finite-block inequality is stated in Lean as follows.
theorem RateDistortionFunction_expectedDistortion_le_codeRate (hn : 0 < n) (code : RateDistortionCode X Y n M) (P : PMF X) (d : Distortion (X := X) (Y := Y)) : RateDistortionFunction P d (expectedDistortion n M hn code P d) ≤ ENNReal.ofReal (codeRate n M hn) := by ...
Here expectedDistortion represents , and codeRate represents . Thus, the theorem states . The proof uses the feasibility of the average joint distribution and the mutual-information bound established above.
We then apply this result to a code sequence seq. At index , the expected average distortion and rate are represented by the following expressions, respectively.
-- Expected average distortion at index expectedDistortion (n + 1) (seq.M n) (Nat.succ_pos n) (seq.code n) P d -- Rate at index codeRate (n + 1) (seq.M n) (Nat.succ_pos n)
These are the expressions used in
asymptoticDistortion
and
hasPointwiseRateBound,
defined in Section V. The implementation also uses asymptoticRate, which takes the limit superior of the code rates after conversion to ENNReal.
We now use the distortion constraint in the achievability condition. For any positive distortion slack , this constraint and the finite-block inequality give
This result is formalized as follows.
theorem rate_distortion_sequence_converse_add (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D ε : ENNReal) (seq : CodeSequence X Y) (hD : achievesDistortion seq P d D) (hε : 0 < ε) : RateDistortionFunction P d (D + ε) ≤ asymptoticRate seq := by ...
Here asymptoticRate represents the limit superior of the code rates and takes values in ENNReal.
The proof uses the distortion limsup bound to obtain an eventual bound by . Monotonicity and the finite-block converse then give an eventual lower bound on the code rates. Mathlib's le_limsup_of_frequently_le passes this bound to their limit superior.
A pointwise rate bound implies the corresponding limsup rate bound, which means
This implication is formalized as follows.
theorem asymptoticRate_le_of_hasPointwiseRateBound (seq : CodeSequence X Y) (R : R) (hR : hasPointwiseRateBound seq R) : asymptoticRate seq ≤ ENNReal.ofReal R := by ...
Thus, pointwise achievability implies achievability under the asymptotic rate constraint.
Combining the result for with the asymptotic rate bound gives , formalized as follows.
theorem rate_distortion_converse_add (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D ε : ENNReal) (R : R) (hε : 0 < ε) (hA : isAchievable P d R D) : RateDistortionFunction P d (D + ε) ≤ ENNReal.ofReal R := by ...
For finite alphabets, the test-channel space is compact. Both expected distortion and mutual information are continuous. These properties imply lower semicontinuity of . Together with monotonicity, this yields right continuity at every distortion threshold.
def rateDistortionRightContinuousAt (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) : Prop := Tendsto (fun ε : ENNReal → RateDistortionFunction P d (D + ε)) (nhdsWithin (0 : ENNReal) (Set.Ioi 0)) (nhds (RateDistortionFunction P d D))
theorem rateDistortionRightContinuousAt_all (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) : rateDistortionRightContinuousAt P d D := by ...
Filter nhdsWithin 0 (Set.Ioi 0) here represents approaching zero through positive values using Mathlib's method to express limits as mentioned in Section V.
Finally, we use right continuity to remove the positive slack, giving .
theorem rate_distortion_converse_of_rightContinuousAt (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hcont : rateDistortionRightContinuousAt P d D) (hA : isAchievable P d R D) : RateDistortionFunction P d D ≤ ENNReal.ofReal R := by ...
For the pointwise converse, the implementation uses isAchievablePointwise_imp_isAchievable to convert pointwise achievability to asymptotic achievability and then applies the theorem above. Since right continuity is proved within the development, the final theorem requires no separate continuity hypothesis.
B. Random-coding achievability
We now prove achievability for . For finite , the proof proceeds in the following steps.
-
Choose a test channel satisfying the distortion constraint and having mutual information strictly below R.
-
Construct a random codebook and an encoder that searches for a codeword satisfying the distortion and information-density conditions.
-
Use probability estimates to bound the average miss probability of the random codebook.
-
Obtain deterministic codes by averaging over the random-codebook distribution.
-
Use a diagonal selection to remove the distortion slacks and construct a code sequence satisfying
We next explain these steps and their formalization. First, we choose a test channel W satisfying
where is the mutual information of the joint distribution induced by P and W. Such a channel exists because is the infimum over channels satisfying the distortion constraint and . This step is formalized as follows.
theorem exists_testChannel_of_RateDistortionFunction_lt_ofReal (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hR : RateDistortionFunction P d D < ENNReal.ofReal R) : ∃ W : X → PMF Y, expected_distortion_single P W d ≤ D ∧ mutualInformationEntropy (induced_joint P W) < R := by ...
Here mutualInformationEntropy is the real-valued expression for mutual information introduced earlier.
Secondly, we construct a random codebook and its encoder. Let be the output marginal induced by and . For blocklength , we independently sample codewords, each with distribution . A codebook is represented as a function Index M → Yblock n Y. The corresponding probability distribution is defined as follows.
-- Independently sampled block codewords noncomputable def randomCodebookPMF (M n : N) (Q : PMF (Yblock n Y)) : PMF (Index M → Yblock n Y) := iidBlockPMF M Q
-- Codewords drawn from the output marginal noncomputable def memorylessCodebookPMF (M n : N) (P : PMF X) (W : X → PMF Y) : PMF (Index M → Yblock n Y) := randomCodebookPMF M n (iidBlockPMF n (P.bind W))
Here P.bind W represents output marginal
which is . The inner iidBlockPMF n (P.bind W) defines the distribution of one block codeword, while randomCodebookPMF defines the distribution of independent codewords.
We then specify the condition used by the encoder. Choose a distortion slack and an information threshold satisfying . A pair is good when
where is the block information density. On the support of the joint test-channel distribution,
These two conditions are expressed in goodBlockPair.
noncomputable def goodBlockPair (hn : 0 < n) (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) (distortionThreshold : ENNReal) (informationThreshold : R) (x : Xblock n X) (y : Yblock n Y) : Prop := blockDistortion n hn d x y ≤ distortionThreshold ∧ memorylessInformationDensity n P W (x, y) ≤ informationThreshold
In this proof, distortionThreshold is , and informationThreshold is .
For a fixed codebook, the encoder selects the first index whose codeword forms a good pair with the source block. If no such index exists, it returns index 0. The decoder returns the selected codeword. We construct this encoder using a general predicate good, so that the same construction can be reused with other conditions.
noncomputable def codebookEncoder (hM : 0 < M) (codebook : Index M → Yblock n Y) (good : Xblock n X → Yblock n Y → Prop) : Xblock n X → Index M := by classical intro x exact if h : ∃ j, good x (codebook j) then Fin.find (fun j → good x (codebook j)) h else ⟨0, hM⟩
noncomputable def codebookCode (hM : 0 < M) (codebook : Index M → Yblock n Y) (good : Xblock n X → Yblock n Y → Prop) : RateDistortionCode X Y n M where encoder := codebookEncoder n M hM codebook good decoder := codebook
The assumption hM ensures that the fallback index 0 is valid.
Thirdly, we bound the average miss probability of the random codebook. The estimate has three parts: the good-pair probability estimate, the covering bound, and the average miss probability bound.
For the first part, we estimate the good-pair probability under the joint test-channel distribution. Chebyshev bounds control deviations of the average distortion and information density. For the thresholds and , where and , these estimates give
for every fixed and all sufficiently large . The corresponding theorem allows general distortion and information thresholds.
theorem exists_nat_one_sub_le_goodBlockPairProbability (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) (distortionThreshold : ENNReal) (informationThreshold : N → R) (ed ei : R) (hed : 0 < ed) (hei : 0 < ei) (h : 0 < ) (hdistortionThreshold : distortionThreshold T) (hdistortionSlack : (expected_distortion_single P W d).toReal + ed ≤ distortionThreshold.toReal) (hinformationSlack : ∀ n : N, (n : R) * (mutualInformationEntropy (induced_joint P W) + ei) ≤ informationThreshold n) : ∃ N : N, 0 < N ∧ ∀ n : N, N ≤ n → ∀ hn : 0 < n, 1 - ENNReal.ofReal ≤ goodBlockPairProbability n hn P W d distortionThreshold (informationThreshold n) := by ...
Here goodBlockPairProbability is the joint good-pair probability.
Let be the conditional good-pair probability under . Since the joint good-pair probability is the average of , the preceding estimate implies
This identifies the source blocks on which we can apply the covering estimate.
For the second part, we derive a covering bound. Let be the probability that a codeword drawn from forms a good pair with . For source blocks with positive probability, a change-of-measure argument using the information-density condition gives
When , independence of the codewords therefore gives
Choose . For sufficiently large , , so
The following theorem combines the change-of-measure, independence, and codebook-size estimates.
theorem codebookMissProbability_le_exp_neg_quarter_exp_rateGap_of_conditionalGood (n : N) (rate threshold : R) (hlarge : 2 ≤ Real.exp ((n : R) * rate)) (hn : 0 < n) (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) (distortionThreshold : ENNReal) (x : Xblock n X) (hx : iidBlockPMF n P x ≠ 0) (hhalf : 1 / 2 ≤ conditionalGoodBlockPairProbability n hn P W d distortionThreshold ((n : R) * threshold) x) [DecidablePred (goodBlockPair n hn P W d distortionThreshold ((n : R) * threshold) x)] : codebookMissProbability (exponentialCodebookSize n rate) (iidBlockPMF n (P.bind W)) (goodBlockPair n hn P W d distortionThreshold ((n : R) * threshold) x) ≤ ENNReal.ofReal (Real.exp (-1 / 4 * Real.exp ((n : R) * (rate - threshold)))) := by ...
Here rate and threshold represent R and a. The assumptions hx and hhalf require a positive-probability source block with conditional good-pair probability at least 1/2. The assumption hlarge provides the lower bound on the rounded codebook size.
For the third part, we average over the source blocks. Those with have probability at most , and their miss probability is at most 1. On the remaining positive-probability source blocks, the preceding exponential bound applies. Thus,
where is the source probability of finding no good codeword in codebook . The final average bound is formalized as follows.
theorem averageCodebookMissProbability_le_two_mul_add_exp_neg_quarter_exp_rateGap (n : N) (rate threshold : R) (hlarge : 2 ≤ Real.exp ((n : R) * rate)) (hn : 0 < n) (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) (distortionThreshold δ : ENNReal) [V x : Xblock n X, DecidablePred (goodBlockPair n hn P W d distortionThreshold ((n : R) * threshold) x)] [DecidablePred (fun x : Xblock n X => 1 / 2 ≤ conditionalGoodBlockPairProbability n hn P W d distortionThreshold ((n : R) * threshold) x)] (hsource : 1 - 2 * δ ≤ codewordHitProbability (iidBlockPMF n P) (fun x => 1 / 2 ≤ conditionalGoodBlockPairProbability n hn P W d distortionThreshold ((n : R) * threshold) x)) : averageCodebookMissProbability (exponentialCodebookSize n rate) (iidBlockPMF n P) (iidBlockPMF n (P.bind W))
(goodBlockPair n hn P W d distortionThreshold ((n : R) * threshold)) ≤ 2 * δ + ENNReal.ofReal (Real.exp (-1 / 4 * Real.exp ((n : R) * (rate - threshold)))) := by
...
The assumption hsource expresses that source blocks with conditional good-pair probability at least 1/2 have probability at least 1 - 2δ. The parameter δ uses ENNReal to match the probability values and is finite here, as it comes from the real tolerance chosen earlier. And since a < R, the exponential term tends to zero. This completes the probability estimate used to obtain deterministic codes in the next step.
Fourthly, we obtain deterministic codes from these probability estimates.
Let be an upper bound on the single-letter distortion. If a good codeword is found, the average distortion is at most ; otherwise, it is at most . Hence, for a fixed codebook C, its expected average distortion satisfies
Averaging over the random-codebook distribution gives a bound on the average expected distortion. At least one deterministic codebook has expected distortion no greater than this average.
For every and , the exponential term above is at most for all sufficiently large . We therefore obtain deterministic codes satisfying
where and are the rate and expected average distortion of the selected length-n code. This result is formalized as follows.
theorem exists_nat_forall_exists_testChannelCode_bound (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hDtop : D ≠ T) (hW : expected_distortion_single P W d ≤ D) (hI : mutualInformationEntropy (induced_joint P W) < R) (η δ : R) (hη : 0 < η) (hδ : 0 < δ) (hδle : δ ≤ 1) : ∃ N : N, ∀ n : N, N ≤ n → ∃ hn : 0 < n, ∃ code : RateDistortionCode X Y n (exponentialCodebookSize n R), codeRate n (exponentialCodebookSize n R) hn ≤ R ∧ expectedDistortion n (exponentialCodebookSize n R) hn code P d ≤ D + ENNReal.ofReal η + (distortionBound d : ENNReal) * (3 * ENNReal.ofReal δ) := by ...
Here exponentialCodebookSize n R represents , and distortionBound d provides . The conclusion supplies a code at every blocklength for each fixed choice of and .
Finally, we construct a code sequence and remove the distortion slacks. Choose and such that . For each precision level , the finite-block result supplies codes beyond a blocklength threshold . A diagonal selection lets the precision level increase with the blocklength, so that
Constant-reconstruction codes fill the finitely many initial blocklengths. The resulting sequence satisfies
The corresponding code-sequence theorem is:
theorem exists_codeSequence_testChannel_achieves (P : PMF X) (W : X → PMF Y) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hDtop : D ≠ T) (hW : expected_distortion_single P W d ≤ D) (hI : mutualInformationEntropy (induced_joint P W) < R) : ∃ seq : CodeSequence X Y, hasPointwiseRateBound seq R ∧ asymptoticDistortion seq P d ≤ D := by ...
The proof uses exists_diagonalCodeSequence_of_eventually_codes to construct the sequence and asymptoticDistortion_le_of_diagonal_error to establish its distortion bound. The conclusion is the pointwise achievability condition introduced in Section V.
When , there is no distortion restriction. The chosen test channel supplies a nonempty reproduction alphabet, and . A constant-reconstruction code with a single codeword therefore satisfies the rate bound at every blocklength. This completes the direct theorem.
C. Achievability at the equality rate
We now consider when is finite. We use the same pointwise rate constraint as in the strict-rate theorem. The proof proceeds as follows.
-
For , mix an optimal test channel with an independent reproduction channel to obtain mutual information strictly below R, allowing a small increase in distortion.
-
Apply the random-coding estimates at the fixed rate R, and use the diagonal selection from the preceding subsection to remove the distortion errors.
-
For R = 0, use a constant reconstruction obtained from an optimal test channel with zero mutual information.
First, suppose that and is finite. Since the infimum defining is attained, we can choose an optimal test channel satisfying
Let be its output marginal, and define an independent reproduction channel by . For , consider the mixture
Convexity of mutual information with a fixed source distribution gives
If is an upper bound on the distortion, linearity of expected distortion gives
Thus, for any , choosing sufficiently small provides a test channel with distortion at most and mutual information strictly below . This construction is formalized in the following theorem, which also applies when .
theorem exists_testChannel_strict_rate_with_distortion_slack (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (R : R) (hR : 0 < R) (hRD : RateDistortionFunction P d D ≤ ENNReal.ofReal R) (η : R) (hη : 0 < η) : ∃ W : X → PMF Y, expected_distortion_single P W d ≤ D + ENNReal.ofReal η ∧ mutualInformationEntropy (induced_joint P W) < R := by ...
The proof uses channelMix to construct the mixture and P.bind W to obtain the output marginal. The parameter controls the additional distortion.
Next, we apply the random-coding estimates from the preceding subsection at the fixed rate . Set . For each , the mixed channel has distortion at most and mutual information strictly below . Using for both error parameters in the random-coding estimates gives codes at all sufficiently large blocklengths satisfying
The additional comes from the channel mixture. Since the total distortion error tends to zero, the same diagonal selection produces a code sequence with
For the zero-rate case, an optimal test channel has zero mutual information, so its induced joint distribution is the product of its marginals. Averaging over the reproduction marginal then gives a symbol such that
Using at every coordinate gives codes with , rate zero, and expected average distortion at most D. This case is formalized as follows.
theorem rate_distortion_zero_rate_achievable_pointwise (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (hzero : RateDistortionFunction P d D = 0) : isAchievablePointwise P d 0 D := by ...
The case is also handled by constant reconstruction codes. Combining these cases gives the equality-rate theorem.
theorem rate_distortion_achievability_at_boundary (P : PMF X) (d : Distortion (X := X) (Y := Y)) (D : ENNReal) (hfinite : RateDistortionFunction P d D ≠ T) : isAchievablePointwise P d (RateDistortionFunction P d D).toReal D := by exact rate_distortion_achievability_at_boundary_pointwise P d D hfinite
The assumption hfinite ensures that toReal represents as a finite real rate. Both the strict-rate and equality-rate results now use isAchievablePointwise.
D. Verification and reusable components
The complete Lean formalization, including all definitions, proofs, and verification scripts, is available in the GitHub repository [31].
To make effective use of AI assistance and reduce the risk of mismatches with the intended mathematics, we first wrote the definitions needed by the main theorem and its statement, using sorry as a temporary placeholder for the proof. We carefully checked the definitions, hypotheses, quantifiers, and conclusion against their mathematical counterparts before using AI assistance to complete the proof. Lean then checked the resulting proof.
When formalizing the main theorem at , we found that AI used the weaker notion of achievability isAchievable rather than isAchievablePointwise, which is used for . After carefully checking the statement, we revised it and completed the proof under the pointwise rate constraint. This example shows that Lean verification alone does not ensure alignment with the intended mathematics [13], and that theorem statements still require careful review.
The Lean module compiles without sorry placeholders. We also inspect the axioms used by the main results with #print axioms.
#print axioms rate_distortion_achievability #print axioms rate_distortion_converse #print axioms rate_distortion_achievability_at_boundary
These checks report only propext, Classical.choice, and Quot.sound, with no dependency on sorryAx.
For the purpose of building formal infrastructure for information theory in Lean, the development reuses Mathlib's existing definitions and results wherever possible, including probability mass functions, finite sums and products, filters, and topological results.
We provide reusable definitions and lemmas for finite-alphabet information measures, optimization over test channels, and coding arguments. These include information inequalities and continuity results for shannonEntropy and mutual_information, compactness of PMF on finite alphabets, and the existence of optimal test channels under feasible distortion constraints in RateDistortionFunction_attained. We also establish lower semicontinuity and right continuity of .
For coding arguments, randomCodebookPMF constructs random codebooks with independently sampled codewords, and codebookEncoder uses a general good predicate. The diagonal construction produces a CodeSequence from finite-block estimates to obtain asymptotic guarantees. These components allow later developments to reuse the probability and limit arguments established here. The aim is to expand the formal foundations available for information theory and support the formalization of further results.
VII. CONCLUDING REMARKS
Terence Tao in his ICM2026 lecture [32] outlined a prospective workflow for future mathematics: human researchers specify problems in a formal language, AI systems solve them and produce machine-certified proofs, and mathematicians subsequently interpret these proofs and extract their conceptual content. Formalization thus plays a pivotal role in this process. In order to apply AI-assisted methodology in information theory, we need to first formalize the basic results before proceeding to open conjectures.
Our infrastructure for rate–distortion theory makes the objects, assumptions, and conventions explicit, including the treatment of zero-probability events, extended nonnegative real values, and feasibility constraints. We prove the direct and converse parts of the finite-alphabet rate–distortion theorem in Lean and provide reusable definitions and lemmas built on Mathlib. Future work may extend these foundations to rate–distortion–perception tradeoffs and their applications in machine learning and communication. This paper contributes to the construction of formal foundations on which AI systems can generate machine-checkable proofs while preserving the conceptual clarity valued by human researchers.
REFERENCES
[1] OpenAI, “On the Navier–Stokes millennium prize problem,” Link to webpage, Sep. 2026.
[2] Anthropic, “Formalizing Fermat’s last theorem,” Link to webpage, Sep. 2026.
[3] OpenAI, “The circulant Hadamard conjecture,” OpenAI Math Release preprint OAI:The-circulant-Hadamard-conjecture-September-23-2026, 2026.
[4] G. Pichler, “Three conjectures on binary channels for the doubly symmetric binary source,” arXiv:2609.27991 [cs.IT], Sep. 2026.
[5] P. Durcik, M. Fraccaroli, and J. Roos, “A weak Hellinger inequality for noisy Boolean channels,” arXiv:2609.28534 [cs.IT], Sep. 2026.
[6] Ö. Soysal, “A new upper bound on the binary deletion channel capacity,” arXiv:2609.13351 [cs.IT], Sep. 2026.
[7] M. Huang, Y. Liu, and Y. Liu, “Sub-optimality of Marton’s inner bound for the two-receiver broadcast channel,” arXiv:2608.19869 [cs.IT], Aug. 2026.
[8] S. Yang and Y. Dong, “A machine-checked proof of the Dong-Yang classification of optimal binary codes for BSCs,” arXiv:2609.10579v1 [math.HO], Sep. 2026.
[9] OpenAI, “Ten advances in mathematics and theoretical computer science,” Link to pdf, Aug. 2026.
[10] N. Itty, C. D. Rosin, C. Carstensen, and D. Reichman, “Improved lower bounds for the Shannon capacity of odd cycles,” arXiv:2607.21517 [cs.IT], Jul. 2026.
[11] R. Tandon, “Strengthening recursive constructions for zero-error Shannon capacity,” arXiv:2608.30273 [cs.IT], Aug. 2026.
[12] M. Protti, “An improved lower bound for the Shannon capacity of ,” link to github, Sep. 2026.
[13] A. Bastounis, F. Circelli, and A. C. Hansen, “Navier-Stokes lost in translation: Why Lean verification of AI autoformalisation does not guarantee correct natural language proofs,” 2026. [Online]. Available: https://arxiv.org/abs/2610.08144
[14] W. T. Gowers, B. Green, F. Manners, and T. Tao, “On a conjecture of Marton,” Annals of Mathematics, vol. 201, no. 2, pp. 515–549, 2025.
[15] T. Tao, “The polynomial Freiman-Ruzsa conjecture,” https://teorth.github.io/pfr/, 2025.
[16] L. Luccioli, “Formalizing information theory in Lean 4: f-divergences, hypothesis testing and the data processing inequality,” Master thesis, University di Bologna, 2024.
[17] S. Sonoda, K. Kasaura, Y. Mizuno, K. Tsukamoto, and N. Onda, “Lean formalization of generalization error bound by Rademacher complexity and Dudley’s entropy integral,” https://arxiv.org/abs/2503.19605, May 2026, accepted by ITP2026.
[18] Y. Zhang, J. D. Lee, and F. Liu, “AI4SLT: Empirical processes in lean 4 for formal statistical learning theory,” arXiv:2602.02285v2 [cs.LG], Jun. 2026, accepted by ICML2026.
[19] R. Degenne and P. Rauber, “Lean machine learning – the Lean library for machine learning research,” Link to github, 2026.
[20] T. Berger, Rate distortion theory. Englewood Cliff: Prentice-Hall, 1971.
[21] A. J. Viterbi and J. K. Omura, Principles of Digital Communication and Coding. Dover Publications, 2009.
[22] T. M. Cover and J. A. Thomas, Elements of information theory, 2nd ed. John Wiley & Sons, 2006.
[23] R. J. McEliece, The theory of Information and Coding, 2nd ed. Cambridge University Press, 2002.
[24] R. W. Yeung, Information theory and network coding. Springer, 2008.
[25] T. Mhamdi, O. Hasan, and S. Tahar, “Formalization of entropy measures in HOL,” in Int. Conf. on Interactive Theorem Proving (ITP), ser. Lecture notes in computer science, vol. 6869, Nov. 2011, pp. 233–248.
[26] R. Affeldt, M. Hagiwara, and J. Senizergues, “Formalization of Shannon’s theorems in SSReflect-Coq,” in Interactive Theorem Proving (ITP), ser. Lecture Notes in Computer Science. Princeton, NJ: Springer, Aug. 2012.
[27] ___,“Formalization of Shannon’s theorems,” Journal of Automated Reasoning, vol. 53, pp. 63–103, 2014.
[28] R. Affeldt et al., “Infotheo: A Coq library for information theory,” https://github.com/affeldt-aist/infotheo.
[29] K. Nakano and M. Hagiwara, “Formalization of binary symmetric erasure channel based on infotheo,” in IEEE Int. Symp. Information Theory and Its Applications, Monterey, CA, Nov. 2016.
[30] K. Kasaura, K. Tsukamoto, K. Mori, R. Mizuno, T. Namatame, Y. Oriike, M. Taniguchi, S. Sonoda, and H. Yamasaki, “Lean-Quantum: Toward AI-assisted formalization of quantum information,” https://arxiv.org/abs/2607.05492, Jul. 2026.
[31] F. Yan, R. Dong, R. Shi, D. Wang, and K. W. Shum, “Rate distortion theory in lean 4,” https://github.com/fubinyan/rate_distortion_lean4, 2026.
[32] T. Tao, “Mathematics in the age of AI,” https://teorth.github.io/tao-web/slides/age-of-ai-icm-2026.pdf, Jul. 2026.