Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Gallager: expected maximum-likelihood random-code error

Open
QAlgorithms.Papers.Independent.Intake100.P73.gallager_iid_expected_error

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

For every normalized discrete channel W, input law p, and positive integer N, draw N codewords independently from p and decode by maximum likelihood, using a fixed tie convention. The expected uniform-message error is at most inf over 0<=s<=1 of N^s times sum_y (sum_x p(x) W_x(y)^(1/(1+s)))^(1+s). This is the Gallager [7] ingredient explicitly quoted in the proof of Theorem 3, with N=ML.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P73
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P73

open Filter

open scoped BigOperators ENNReal Topology

attribute [local instance] Classical.propDecidable Classical.decEq

universe u

/-- Hayashi PDF p.6, proof of Theorem 3, explicitly attributed to Gallager [7].
For N iid codewords, the actual maximum-likelihood decoder's expected average
error has the stated optimized moment bound. Take N=ML in that proof. -/
theorem gallager_iid_expected_error {X Y : Type*}
    (W : X → Y → ℝ≥0∞) (hW : IsDiscreteStochastic W) (p : PMF X)
    (N : ℕ) (hN : 0 < N) :
    iidExpectation p N (fun a => iidMaximumLikelihoodError W a hN) ≤
      sInf ((fun s : ℝ => (N : ℝ≥0∞) ^ s * phiMoment W p s) '' Set.Icc 0 1) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P73

end
Source
General non-asymptotic and asymptotic formulas in channel resolvability and identification capacity and their application to wire-tap channel, arXiv:cs/0503088v2, PDF p. 6, Gallager [7] random-coding reliability bound used in Theorem 3
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

For arbitrary types X,YX,YX,Y, let W:X×Y→[0,∞]W:X\times Y\to[0,\infty]W:X×Y→[0,∞] satisfy ∑y∈YW(x,y)=1\sum_{y\in Y}W(x,y)=1∑y∈Y​W(x,y)=1 for every xxx, let ppp be a probability mass function on XXX, and let NNN be a positive natural number. For each tuple a=(a0,…,aN−1)∈XNa=(a_0,\ldots,a_{N-1})\in X^Na=(a0​,…,aN−1​)∈XN, let da(y)d_a(y)da​(y) be a classically chosen index maximizing W(ai,y)W(a_i,y)W(ai​,y), with unspecified tie-breaking, and put E(a)=N−1∑i=0N−1∑y∈Y1{da(y)≠i}W(ai,y)E(a)=N^{-1}\sum_{i=0}^{N-1}\sum_{y\in Y}\mathbf1_{\{d_a(y)\ne i\}}W(a_i,y)E(a)=N−1∑i=0N−1​∑y∈Y​1{da​(y)=i}​W(ai​,y), where the summand is defined to be 000 when da(y)=id_a(y)=ida​(y)=i. Then, in the extended nonnegative reals,

∑a∈XN(∏i=0N−1p(ai))E(a) ≤ inf⁡s∈[0,1][Ns∑y∈Y(∑x∈Xp(x) W(x,y)1/(1+s))1+s].\sum_{a\in X^N}\left(\prod_{i=0}^{N-1}p(a_i)\right)E(a) \ \le\ \inf_{s\in[0,1]} \left[ N^s\sum_{y\in Y} \left(\sum_{x\in X}p(x)\,W(x,y)^{1/(1+s)}\right)^{1+s} \right].a∈XN∑​(i=0∏N−1​p(ai​))E(a) ≤ s∈[0,1]inf​​Nsy∈Y∑​(x∈X∑​p(x)W(x,y)1/(1+s))1+s​.

All sums extend over the indicated full types, with no finiteness assumption on XXX or YYY. Tuples may have repeated entries; N=1N=1N=1 and the parameter endpoints s=0,1s=0,1s=0,1 are included, while N=0N=0N=0 is excluded. The existence of ppp forces XXX to be nonempty, and stochasticity then forces YYY to be nonempty.

Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 2026

    Confirmed by the mission captain (proposal self-audit).

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