Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 5: general wiretap secrecy capacity formula

Open
QAlgorithms.Papers.Independent.Intake100.P73.general_wiretap_capacity

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

prove2quantum

Let B=(Bn)\mathbf B=(B^n)B=(Bn) and E=(En)\mathbf E=(E^n)E=(En) be arbitrary sequences of classical discrete channels with common input alphabet XnX_nXn​ and output alphabets Yn,ZnY_n,Z_nYn​,Zn​. A wiretap code has a positive finite message count, stochastic encoders and pairwise disjoint Bob decoding regions; messages are uniform. Let ϵB\epsilon_BϵB​ be its average Bob error, IE=M−1∑iD(EQi∥M−1∑jEQj)I_E=M^{-1}\sum_iD(E_{Q_i}\|M^{-1}\sum_jE_{Q_j})IE​=M−1∑i​D(EQi​​∥M−1∑j​EQj​​), and dE=[M(M−1)]−1∑i≠jd(EQi,EQj)d_E=[M(M-1)]^{-1}\sum_{i\ne j}d(E_{Q_i},E_{Q_j})dE​=[M(M−1)]−1∑i=j​d(EQi​​,EQj​​), with dE=0d_E=0dE​=0 when M=1M=1M=1. The capacities Cd,CIC_d,C_ICd​,CI​ are the suprema of the liminf ordinary log message rates of code sequences with ϵB→0\epsilon_B\to0ϵB​→0 and, respectively, dE→0d_E\to0dE​→0 or IE/n→0I_E/n\to0IE​/n→0. They include the operational zero-rate baseline. All distances are full L1 and all rates are in nats.

For an input-law sequence p=(pn)\mathbf p=(p_n)p=(pn​) and channel sequence W\mathbf WW, put Tn(a)=Ppn(x)Wxn(y){n−1log⁡[Wxn(y)/Wpnn(y)]>a}T_n(a)=\mathbb P_{p_n(x)W_x^n(y)}\{n^{-1}\log[W_x^n(y)/W_{p_n}^n(y)]>a\}Tn​(a)=Ppn​(x)Wxn​(y)​{n−1log[Wxn​(y)/Wpn​n​(y)]>a}. Define I‾(ϵ∣p,W)=inf⁡{a:lim inf⁡nTn(a)≤ϵ}\underline I(\epsilon\mid\mathbf p,\mathbf W)=\inf\{a:\liminf_nT_n(a)\le\epsilon\}I​(ϵ∣p,W)=inf{a:liminfn​Tn​(a)≤ϵ} and I‾(ϵ∣p,W)=inf⁡{a:lim sup⁡nTn(a)≤ϵ}\overline I(\epsilon\mid\mathbf p,\mathbf W)=\inf\{a:\limsup_nT_n(a)\le\epsilon\}I(ϵ∣p,W)=inf{a:limsupn​Tn​(a)≤ϵ}. At ϵ=1\epsilon=1ϵ=1 use the strict tail bound <1<1<1. Spectra and numerical extrema are extended-valued.

For possibly infinite spectra, interpret L−UL-UL−U by the finite-threshold cut

D(L,U)=sup⁡{a−b:a,b∈R, a<L, U<b}.\mathcal D(L,U)=\sup\{a-b:a,b\in\mathbb R,\ a<L,\ U<b\}.D(L,U)=sup{a−b:a,b∈R, a<L, U<b}.

Let AnA_nAn​ range over all auxiliary alphabet sequences, let Qn:An→P(Xn)Q^n:A_n\to\mathcal P(X_n)Qn:An​→P(Xn​) range over all stochastic preprocessors, and let pn∈P(An)p_n\in\mathcal P(A_n)pn​∈P(An​) be arbitrary. Use the same QnQ^nQn before both channels, so (BnQn)a(y)=∑xQan(x)Bxn(y)(B^nQ^n)_a(y)=\sum_x Q_a^n(x)B_x^n(y)(BnQn)a​(y)=∑x​Qan​(x)Bxn​(y) and similarly for Eve. Let

Γ=max⁡{0,sup⁡(An),p,QD(I‾(1∣p,BQ),I‾(0∣p,EQ))}.\Gamma=\max\left\{0,\sup_{(A_n),\mathbf p,\mathbf Q}\mathcal D\bigl(\underline I(1\mid\mathbf p,\mathbf B\mathbf Q),\overline I(0\mid\mathbf p,\mathbf E\mathbf Q)\bigr)\right\}.Γ=max{0,(An​),p,Qsup​D(I​(1∣p,BQ),I(0∣p,EQ))}.

The full general-channel formula is

Cd(B,E)=CI(B,E)=Γ.C_d(\mathbf B,\mathbf E)=C_I(\mathbf B,\mathbf E)=\Gamma.Cd​(B,E)=CI​(B,E)=Γ.

No bound on Eve's alphabet is part of this printed theorem. It identifies full-L1 secrecy capacity with normalized-KL secrecy capacity and a general information-spectrum expression; it is not a single-letter or exponent formula.

Formalization Note. The direct argument immediately before the theorem proves its normalized-KL part under exponential Eve-alphabet growth. The theorem itself prints no such assumption. This proof gap is retained for independent moderation, without adding the earlier hypothesis.

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.9, Theorem 5: full-L1 and NORMALIZED-KL capacities equal
the arbitrary-preprocessing formula. No Eve alphabet bound is printed here or
added. The preceding direct proof's finite-alphabet step is a source proof gap
left explicitly for independent moderation. -/
theorem general_wiretap_capacity {X Y Z : ℕ → Type u} [∀ k, Nonempty (X k)]
    (B : (k : ℕ) → X k → Y k → ℝ≥0∞) (E : (k : ℕ) → X k → Z k → ℝ≥0∞)
    (hB : ∀ k, IsDiscreteStochastic (B k)) (hE : ∀ k, IsDiscreteStochastic (E k)) :
    generalSecrecyCapacity false B E = generalSecrecyCapacity true B E ∧
    generalSecrecyCapacity false B E = preprocessedBound B E := 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. 9, Theorem 5: general wiretap capacity formula
Read-back

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

For every three families of types (Xk),(Yk),(Zk)(X_k),(Y_k),(Z_k)(Xk​),(Yk​),(Zk​) in the same universe, with each XkX_kXk​ nonempty, and every pair of kernel families Bk:Xk×Yk→[0,∞]B_k:X_k\times Y_k\to[0,\infty]Bk​:Xk​×Yk​→[0,∞] and Ek:Xk×Zk→[0,∞]E_k:X_k\times Z_k\to[0,\infty]Ek​:Xk​×Zk​→[0,∞] satisfying ∑yBk(x,y)=1\sum_yB_k(x,y)=1∑y​Bk​(x,y)=1 and ∑zEk(x,z)=1\sum_zE_k(x,z)=1∑z​Ek​(x,z)=1 for every k,xk,xk,x, the equalities Cdist=CKLC_{\mathrm{dist}}=C_{\mathrm{KL}}Cdist​=CKL​ and Cdist=PC_{\mathrm{dist}}=PCdist​=P hold, where all three quantities are defined as follows. Put nk=k+1n_k=k+1nk​=k+1. For each code sequence, the code at kkk has a positive integer mkm_kmk​, probability mass functions uk,iu_{k,i}uk,i​ on XkX_kXk​, and pairwise disjoint sets Dk,i⊆YkD_{k,i}\subseteq Y_kDk,i​⊆Yk​, indexed by 1≤i≤mk1\le i\le m_k1≤i≤mk​. Write

bk,i(y)=∑xuk,i(x)Bk(x,y),ek,i(z)=∑xuk,i(x)Ek(x,z),eˉk(z)=1mk∑iek,i(z),βk=1mk∑i∑y∉Dk,ibk,i(y).b_{k,i}(y)=\sum_xu_{k,i}(x)B_k(x,y),\qquad e_{k,i}(z)=\sum_xu_{k,i}(x)E_k(x,z),\qquad \bar e_k(z)=\frac1{m_k}\sum_i e_{k,i}(z),\qquad \beta_k=\frac1{m_k}\sum_i\sum_{y\notin D_{k,i}}b_{k,i}(y).bk,i​(y)=x∑​uk,i​(x)Bk​(x,y),ek,i​(z)=x∑​uk,i​(x)Ek​(x,z),eˉk​(z)=mk​1​i∑​ek,i​(z),βk​=mk​1​i∑​y∈/Dk,i​∑​bk,i​(y).

For finite nonnegative point masses, set

K(a,b)={b,a=0,+∞,a>0, b=0,bmax⁡{0,(a/b)log⁡(a/b)−a/b+1},a>0, b>0,D(f,g)=∑vK(f(v),g(v)),L1(f,g)=∑v((f(v)−g(v))++(g(v)−f(v))+),K(a,b)= \begin{cases} b,&a=0,\\ +\infty,&a>0,\ b=0,\\ b\max\{0,(a/b)\log(a/b)-a/b+1\},&a>0,\ b>0, \end{cases} \quad D(f,g)=\sum_vK(f(v),g(v)), \quad L_1(f,g)=\sum_v\bigl((f(v)-g(v))_++(g(v)-f(v))_+\bigr),K(a,b)=⎩⎨⎧​b,+∞,bmax{0,(a/b)log(a/b)−a/b+1},​a=0,a>0, b=0,a>0, b>0,​D(f,g)=v∑​K(f(v),g(v)),L1​(f,g)=v∑​((f(v)−g(v))+​+(g(v)−f(v))+​),

where (t)+=max⁡{t,0}(t)_+=\max\{t,0\}(t)+​=max{t,0}; probability distributions have finite point masses, and the sums take values in [0,∞][0,\infty][0,∞]. Put

δk=1mk∑iD(ek,i,eˉk),λk={0,mk=1,1mk(mk−1)∑i∑j≠iL1(ek,i,ek,j),mk>1.\delta_k=\frac1{m_k}\sum_iD(e_{k,i},\bar e_k), \qquad \lambda_k= \begin{cases} 0,&m_k=1,\\ \displaystyle\frac1{m_k(m_k-1)}\sum_i\sum_{j\ne i}L_1(e_{k,i},e_{k,j}),&m_k>1. \end{cases}δk​=mk​1​i∑​D(ek,i​,eˉk​),λk​=⎩⎨⎧​0,mk​(mk​−1)1​i∑​j=i∑​L1​(ek,i​,ek,j​),​mk​=1,mk​>1.​

Then CdistC_{\mathrm{dist}}Cdist​ is the maximum of 000 and the supremum of the extended real rates lim inf⁡k(log⁡mk)/nk\liminf_k(\log m_k)/n_kliminfk​(logmk​)/nk​ of all code sequences for which βk→0\beta_k\to0βk​→0 and λk→0\lambda_k\to0λk​→0. The definition of CKLC_{\mathrm{KL}}CKL​ replaces the latter convergence by δk/nk→0\delta_k/n_k\to0δk​/nk​→0. These convergences take place in [0,∞][0,\infty][0,∞]. For PPP, range over every family of auxiliary types AkA_kAk​ in the same universe, every family of probability mass functions pkp_kpk​ on AkA_kAk​, and every family of assignments Qk(a)Q_k(a)Qk​(a) of probability mass functions on XkX_kXk​. Define

B~k(a,y)=∑xQk(a)(x)Bk(x,y),E~k(a,z)=∑xQk(a)(x)Ek(x,z).\widetilde B_k(a,y)=\sum_xQ_k(a)(x)B_k(x,y), \qquad \widetilde E_k(a,z)=\sum_xQ_k(a)(x)E_k(x,z).Bk​(a,y)=x∑​Qk​(a)(x)Bk​(x,y),Ek​(a,z)=x∑​Qk​(a)(x)Ek​(x,z).

For either resulting kernel family VVV, set qkV(v)=∑apk(a)Vk(a,v)q^V_k(v)=\sum_ap_k(a)V_k(a,v)qkV​(v)=∑a​pk​(a)Vk​(a,v), and let ℓkV(a,v)\ell^V_k(a,v)ℓkV​(a,v) equal −∞-\infty−∞ when Vk(a,v)=0V_k(a,v)=0Vk​(a,v)=0, equal +∞+\infty+∞ when Vk(a,v)>0V_k(a,v)>0Vk​(a,v)>0 and qkV(v)=0q^V_k(v)=0qkV​(v)=0, and equal log⁡(Vk(a,v)/qkV(v))\log(V_k(a,v)/q^V_k(v))log(Vk​(a,v)/qkV​(v)) otherwise, with the zero-numerator branch taking precedence. Define the real tail masses and extended real thresholds

TkV(t)=∑a,v: t<ℓkV(a,v)/nkpk(a)Vk(a,v),LA,Q,p=inf⁡{t∈R:lim inf⁡kTkB~(t)<1},HA,Q,p=inf⁡{t∈R:lim sup⁡kTkE~(t)≤0}.T^V_k(t)=\sum_{a,v:\ t<\ell^V_k(a,v)/n_k}p_k(a)V_k(a,v),\qquad L_{A,Q,p}=\inf\{t\in\mathbb R:\liminf_kT^{\widetilde B}_k(t)<1\},\qquad H_{A,Q,p}=\inf\{t\in\mathbb R:\limsup_kT^{\widetilde E}_k(t)\le0\}.TkV​(t)=a,v: t<ℓkV​(a,v)/nk​∑​pk​(a)Vk​(a,v),LA,Q,p​=inf{t∈R:kliminf​TkB​(t)<1},HA,Q,p​=inf{t∈R:klimsup​TkE​(t)≤0}.

The third quantity is

P=max⁡{0, sup⁡A,Q,p sup⁡{a−b: a,b∈R, a<LA,Q,p, HA,Q,p<b}}.P=\max\left\{0,\ \sup_{A,Q,p}\ \sup\{a-b:\ a,b\in\mathbb R,\ a<L_{A,Q,p},\ H_{A,Q,p}<b\}\right\}.P=max{0, A,Q,psup​ sup{a−b: a,b∈R, a<LA,Q,p​, HA,Q,p​<b}}.

All limits are as k→∞k\to\inftyk→∞, and all rate and threshold infima and suprema are in the extended real line, with empty infimum +∞+\infty+∞ and empty supremum −∞-\infty−∞. The strict real bounds in the last display are part of the definition, including for infinite threshold values. No finiteness assumptions are made on Xk,Yk,ZkX_k,Y_k,Z_kXk​,Yk​,Zk​ or on the auxiliary types. Positive code size includes size 111, for which the distance is explicitly 000; block lengths are always k+1≥1k+1\ge1k+1≥1.

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