Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Simultaneous row and aggregate sampling on a type class

Open
QAlgorithms.Papers.Independent.Support50.P38.lemma8

by Goku · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let X,YX,YX,Y be finite nonempty alphabets, n≥1n\ge1n≥1, and TTT a joint exact nnn-type with marginal types R,SR,SR,S. Let uR,uSu_R,u_SuR​,uS​ be the uniform type-class laws and VTV_TVT​ the uniform reverse conditional-type channel. Fix 0<ϵ<1/20<\epsilon<1/20<ϵ<1/2 and positive integers M,NM,NM,N satisfying

M>2ln⁡2ϵ2∣TR∣∣TS∣∣TT∣log⁡2(4N∣TR∣),NM>2ln⁡2ϵ2∣TS∣log⁡2(4∣TS∣).M>\frac{2\ln2}{\epsilon^2}\frac{|\mathcal T_R||\mathcal T_S|}{|\mathcal T_T|}\log_2(4N|\mathcal T_R|),\qquad NM>\frac{2\ln2}{\epsilon^2}|\mathcal T_S|\log_2(4|\mathcal T_S|).M>ϵ22ln2​∣TT​∣∣TR​∣∣TS​∣​log2​(4N∣TR​∣),NM>ϵ22ln2​∣TS​∣log2​(4∣TS​∣).

There is one array Yj(s)∈TSY_j^{(s)}\in\mathcal T_SYj(s)​∈TS​, s∈[N],j∈[M]s\in[N],j\in[M]s∈[N],j∈[M], for which, pointwise as functions,

(1−ϵ)uR≤1M∑jVT(⋅∣Yj(s))≤(1+ϵ)uRfor every s,(1-\epsilon)u_R\le\frac1M\sum_j V_T(\cdot|Y_j^{(s)})\le(1+\epsilon)u_R\quad\text{for every }s,(1−ϵ)uR​≤M1​j∑​VT​(⋅∣Yj(s)​)≤(1+ϵ)uR​for every s, (1−ϵ)uS≤1NM∑s,jδYj(s)≤(1+ϵ)uS.(1-\epsilon)u_S\le\frac1{NM}\sum_{s,j}\delta_{Y_j^{(s)}}\le(1+\epsilon)u_S.(1−ϵ)uS​≤NM1​s,j∑​δYj(s)​​≤(1+ϵ)uS​.

Repeated samples are allowed. The simultaneous array is the combinatorial interface for channel compression.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P38
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Support50.P38

open scoped BigOperators Matrix ComplexConjugate

open Filter

open QAlgorithms.Papers.Independent.Information100.P56 (IsLaw)

open QAlgorithms.Papers.Independent.Frontier30.P12 (IsStochastic)

open QAlgorithms.Papers.Independent.Information100.P27 (shannon labelInformation)

attribute [local instance] Classical.propDecidable

/-- Lemma 8, PDF p.4: one sampling array simultaneously satisfies every row bound and
the aggregate empirical-law bound. Sampling is with replacement. The small relative-error
range 0 < epsilon < 1/2 is inherited from Lemma 5, used in the proof. -/
theorem lemma8 {A B : Type} [Fintype A] [Fintype B] [DecidableEq A] [DecidableEq B]
    [Nonempty A] [Nonempty B] {n : ℕ} (hn : 0 < n) (t : ExactType (A × B) n)
    (epsilon : ℝ) (he : 0 < epsilon) (he1 : epsilon < 1 / 2)
    (m seeds : ℕ) (hm : 0 < m) (hs : 0 < seeds)
    (hrow : (2 * Real.log 2 / epsilon ^ 2) *
      (((typeWords t.left).card : ℝ) * (typeWords t.right).card / (typeWords t).card) *
      Real.logb 2 (4 * seeds * (typeWords t.left).card : ℝ) < m)
    (hall : (2 * Real.log 2 / epsilon ^ 2) * (typeWords t.right).card *
      Real.logb 2 (4 * (typeWords t.right).card : ℝ) < (seeds : ℝ) * m) :
    ∃ ys : Fin seeds → Fin m → SourceWord B n,
      (∀ s j, ys s j ∈ typeWords t.right) ∧
      (∀ s x,
        (1 - epsilon) * typeUniform t.left x ≤ (∑ j, typeReverse t (ys s j) x) / m ∧
        (∑ j, typeReverse t (ys s j) x) / m ≤ (1 + epsilon) * typeUniform t.left x) ∧
      (∀ y,
        (1 - epsilon) * typeUniform t.right y ≤
          (∑ s, ∑ j, if ys s j = y then (1 : ℝ) else 0) / ((seeds : ℝ) * m) ∧
        (∑ s, ∑ j, if ys s j = y then (1 : ℝ) else 0) / ((seeds : ℝ) * m) ≤
          (1 + epsilon) * typeUniform t.right y) := by sorry

end QAlgorithms.Papers.Independent.Support50.P38

end
Source
Compression of sources of probability distributions and density operators, arXiv:quant-ph/0208131v1, PDF p. 4, Lemma 8
Read-back

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

Let A,BA,BA,B be finite nonempty types with decidable equality, let n>0n>0n>0, and let t:A×B→Nt:A\times B\to\mathbb Nt:A×B→N have total count nnn. Let TTT be the length-nnn words over A×BA\times BA×B with counts ttt, and let TA⊆An,TB⊆BnT_A\subseteq A^n,T_B\subseteq B^nTA​⊆An,TB​⊆Bn have the marginal counts ∑bt(a,b)\sum_bt(a,b)∑b​t(a,b) and ∑at(a,b)\sum_at(a,b)∑a​t(a,b). Write L=∣TA∣L=|T_A|L=∣TA​∣, R=∣TB∣R=|T_B|R=∣TB​∣, J=∣T∣J=|T|J=∣T∣, and define UA,UBU_A,U_BUA​,UB​ to be 1/L,1/R1/L,1/R1/L,1/R on their respective type classes and zero elsewhere. For y∈Bny\in B^ny∈Bn, let RyR_yRy​ be the set of x∈Anx\in A^nx∈An whose pairing with yyy has counts ttt, and define K(x∣y)=1/∣Ry∣K(x\mid y)=1/|R_y|K(x∣y)=1/∣Ry​∣ when x∈Ryx\in R_yx∈Ry​, and 000 otherwise. Given a real 0<ε<1/20<\varepsilon<1/20<ε<1/2 and positive integers m,Sm,Sm,S satisfying

2ln⁡2ε2LRJlog⁡2(4SL)<m,2ln⁡2ε2Rlog⁡2(4R)<Sm,\frac{2\ln2}{\varepsilon^2}\frac{LR}{J}\log_2(4SL)<m, \qquad \frac{2\ln2}{\varepsilon^2}R\log_2(4R)<Sm,ε22ln2​JLR​log2​(4SL)<m,ε22ln2​Rlog2​(4R)<Sm,

there exists an array ys,j∈Bny_{s,j}\in B^nys,j​∈Bn, indexed by 0≤s<S0\le s<S0≤s<S, 0≤j<m0\le j<m0≤j<m, such that every ys,jy_{s,j}ys,j​ belongs to TBT_BTB​, and for every sss and every x∈Anx\in A^nx∈An,

(1−ε)UA(x)≤1m∑jK(x∣ys,j)≤(1+ε)UA(x),(1-\varepsilon)U_A(x)\le\frac1m\sum_jK(x\mid y_{s,j}) \le(1+\varepsilon)U_A(x),(1−ε)UA​(x)≤m1​j∑​K(x∣ys,j​)≤(1+ε)UA​(x),

while for every y∈Bny\in B^ny∈Bn,

(1−ε)UB(y)≤∑s∑j1{ys,j=y}Sm≤(1+ε)UB(y).(1-\varepsilon)U_B(y) \le\frac{\sum_s\sum_j\mathbf1_{\{y_{s,j}=y\}}}{Sm} \le(1+\varepsilon)U_B(y).(1−ε)UB​(y)≤Sm∑s​∑j​1{ys,j​=y}​​≤(1+ε)UB​(y).

The array entries need not be distinct. Both bounds quantify over all words, including words outside the respective type classes, where the uniform type-class functions are zero.

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

    Confirmed by the moderator at approval.

  • Endorsed by Goku · Oct 24, 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