Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Reverse extraction reproduces the source distribution and cq correlations

Open
QAlgorithms.Papers.Independent.Intakenext100.P30.reverse_extraction_shaper

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

prove2quantum

Let PXP_XPX​ be a law on XXX and f:X→Uf:X\to Uf:X→U a deterministic extractor with induced law q(u)=∑x:f(x)=uPX(x)q(u)=\sum_{x:f(x)=u}P_X(x)q(u)=∑x:f(x)=u​PX​(x). Assume ε≥0\varepsilon\ge0ε≥0 and 12∑u∣q(u)−∣U∣−1∣≤ε\tfrac12\sum_u|q(u)-|U|^{-1}|\le\varepsilon21​∑u​∣q(u)−∣U∣−1∣≤ε. There is a stochastic shaper S(x∣u)S(x|u)S(x∣u), using private randomness, with S(x∣u)=PX(x)/q(u)S(x|u)=P_X(x)/q(u)S(x∣u)=PX​(x)/q(u) when f(x)=uf(x)=uf(x)=u and q(u)>0q(u)>0q(u)>0, zero for other xxx at such uuu, and an arbitrary normalized conditional law at zero-mass uuu, such that

∑uq(u)S(x∣u)=PX(x),12∑x∣∑uS(x∣u)∣U∣−PX(x)∣≤ε.\sum_u q(u)S(x|u)=P_X(x),\qquad \frac12\sum_x\left|\sum_u\frac{S(x|u)}{|U|}-P_X(x)\right|\le\varepsilon.u∑​q(u)S(x∣u)=PX​(x),21​x∑​​u∑​∣U∣S(x∣u)​−PX​(x)​≤ε.

For every cq eavesdropper channel x↦ρZxx\mapsto\rho_Z^xx↦ρZx​, the complete joint state of the actual input U′U'U′ with law qqq and the shaper's output through that channel equals the extractor-output/eavesdropper state before reversal. Consequently every trace-distance privacy-amplification bound relative to a uniform UUU and a fixed normalized reference σZ\sigma_ZσZ​ holds unchanged for that actual-input joint state. This identity explains how reverse extraction preserves secrecy while reproducing the desired source law.

All alphabets are finite and nonempty, and output Hilbert spaces are finite dimensional and nonzero. A classical–quantum channel assigns a positive semidefinite, trace-one matrix to each input. Encoders may use private randomness; decoders are normalized POVMs. Codes are fixed independently of the message, with no supplied shared key or entanglement. Logarithms and entropies are in bits.

For uniform shaper input, the joint input/eavesdropper trace distance to the same uniform-product reference is at most δ+ε\delta+\varepsilonδ+ε whenever the original extracted state has distance at most δ\deltaδ. In particular an ε\varepsilonε-private extractor yields uniform-input secrecy error at most 2ε2\varepsilon2ε, as used in section II.D.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P30
Formal statement
noncomputable section

open scoped BigOperators ComplexConjugate Matrix ComplexOrder

open Filter

namespace QAlgorithms.Papers.Independent.Intakenext100.P30

variable {X Y Z M U V A B C : Type*}

variable [Fintype X] [DecidableEq X] [Fintype Y] [DecidableEq Y]

variable [Fintype Z] [DecidableEq Z] [Fintype M] [DecidableEq M]

variable [Fintype U] [DecidableEq U] [Fintype V] [DecidableEq V]

variable [Fintype A] [DecidableEq A] [Fintype B] [DecidableEq B]

variable [Fintype C] [DecidableEq C]

attribute [local instance] Classical.propDecidable

/-- Section II.C, PDF p.4: reverse extraction samples P(X|U'=u) with private
randomness. At zero-mass u the normalized law can be arbitrary. Exact reproduction
uses the actual extracted law U'; uniform input is epsilon-close. The complete
cq identity preserves the actual-law privacy guarantee. With uniform input,
the secrecy error is at most delta + epsilon, hence 2 epsilon when delta=epsilon. -/
theorem reverse_extraction_shaper [Nonempty X] [Nonempty U] [Nonempty Z]
    (p : RRDistribution X) (extract : X → U) (epsilon : ℝ) (he : 0 ≤ epsilon)
    (hnear : tvDist (rrExtractedLaw p.prob extract) (rrUniform U) ≤ epsilon) :
    ∃ shape : U → RRDistribution X,
      (∀ u, rrExtractedLaw p.prob extract u ≠ 0 → ∀ x,
        (shape u).prob x =
          if extract x = u then p.prob x / rrExtractedLaw p.prob extract u else 0) ∧
      rrShapedLaw (rrExtractedLaw p.prob extract) shape = p.prob ∧
      tvDist (rrShapedLaw (rrUniform U) shape) p.prob ≤ epsilon ∧
      (∀ thetaZ : X → Matrix Z Z ℂ, RRIsCq thetaZ →
        rrCqState (rrExtractedLaw p.prob extract) (rrPreprocess thetaZ shape) =
          rrExtractedState p.prob extract thetaZ) ∧
      (∀ (thetaZ : X → Matrix Z Z ℂ) (reference : Matrix Z Z ℂ) (delta : ℝ),
        RRIsCq thetaZ → IsDensityMatrix reference → 0 ≤ delta →
        traceNorm (rrExtractedState p.prob extract thetaZ -
          rrUniformReference (U := U) reference) / 2 ≤ delta →
        (traceNorm (rrCqState (rrExtractedLaw p.prob extract) (rrPreprocess thetaZ shape) -
          rrUniformReference (U := U) reference) / 2 ≤ delta ∧
        traceNorm (rrCqState (rrUniform U) (rrPreprocess thetaZ shape) -
          rrUniformReference (U := U) reference) / 2 ≤ delta + epsilon)) := by sorry

end QAlgorithms.Papers.Independent.Intakenext100.P30

end
Source
Noisy channel coding via privacy amplification and information reconciliation, arXiv:1012.4814v2, PDF p. 4, §II.C: reverse extraction constructs a distribution shaper
Read-back

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

Let X,U,ZX,U,ZX,U,Z be nonempty finite types with decidable equality, let p:X→Rp:X\to\mathbb Rp:X→R satisfy p(x)≥0p(x)\ge0p(x)≥0 and ∑xp(x)=1\sum_xp(x)=1∑x​p(x)=1, let e:X→Ue:X\to Ue:X→U be any function, and let ϵ≥0\epsilon\ge0ϵ≥0. Put q(u)=∑x:e(x)=up(x)q(u)=\sum_{x:e(x)=u}p(x)q(u)=∑x:e(x)=u​p(x) and uU(u)=1/∣U∣u_U(u)=1/|U|uU​(u)=1/∣U∣, and suppose 12∑u∣q(u)−uU(u)∣≤ϵ\frac12\sum_u|q(u)-u_U(u)|\le\epsilon21​∑u​∣q(u)−uU​(u)∣≤ϵ. Then there exist probability distributions sus_usu​ on XXX, one for every u∈Uu\in Uu∈U, such that, whenever q(u)≠0q(u)\ne0q(u)=0, su(x)=p(x)/q(u)s_u(x)=p(x)/q(u)su​(x)=p(x)/q(u) if e(x)=ue(x)=ue(x)=u, and su(x)=0s_u(x)=0su​(x)=0 otherwise; no such conditional formula is required when q(u)=0q(u)=0q(u)=0. They satisfy

∑uq(u)su(x)=p(x)for every x,12∑x∣∑usu(x)∣U∣−p(x)∣≤ϵ.\sum_u q(u)s_u(x)=p(x)\quad\text{for every }x,\qquad \frac12\sum_x\left|\sum_u\frac{s_u(x)}{|U|}-p(x)\right|\le\epsilon.u∑​q(u)su​(x)=p(x)for every x,21​x∑​​u∑​∣U∣su​(x)​−p(x)​≤ϵ.

For matrices, write T(A)=Re⁡tr⁡A†AT(A)=\operatorname{Re}\operatorname{tr}\sqrt{A^\dagger A}T(A)=RetrA†A​, with the square root defined by continuous functional calculus. For every family (θx)x∈X(\theta_x)_{x\in X}(θx​)x∈X​ of positive semidefinite matrices on ZZZ with trace 111, put θˉu=∑xsu(x)θx\bar\theta_u=\sum_xs_u(x)\theta_xθˉu​=∑x​su​(x)θx​, define C(a,θˉ)(u,z),(v,z′)=1u=va(u)(θˉu)z,z′C(a,\bar\theta)_{(u,z),(v,z')}=\mathbf1_{u=v}a(u)(\bar\theta_u)_{z,z'}C(a,θˉ)(u,z),(v,z′)​=1u=v​a(u)(θˉu​)z,z′​, and define E(u,z),(v,z′)=1u=v∑x:e(x)=up(x)(θx)z,z′E_{(u,z),(v,z')}=\mathbf1_{u=v}\sum_{x:e(x)=u}p(x)(\theta_x)_{z,z'}E(u,z),(v,z′)​=1u=v​∑x:e(x)=u​p(x)(θx​)z,z′​. The same distributions sus_usu​ satisfy C(q,θˉ)=EC(q,\bar\theta)=EC(q,θˉ)=E. Moreover, for every such family θ\thetaθ, every positive semidefinite reference matrix σ\sigmaσ on ZZZ with trace 111, and every δ≥0\delta\ge0δ≥0, writing R(u,z),(v,z′)=1u=vσz,z′/∣U∣R_{(u,z),(v,z')}=\mathbf1_{u=v}\sigma_{z,z'}/|U|R(u,z),(v,z′)​=1u=v​σz,z′​/∣U∣, the hypothesis T(E−R)/2≤δT(E-R)/2\le\deltaT(E−R)/2≤δ implies both

12T ⁣(C(q,θˉ)−R)≤δ,12T ⁣(C(uU,θˉ)−R)≤δ+ϵ.\frac12T\!\left(C(q,\bar\theta)-R\right)\le\delta, \qquad \frac12T\!\left(C(u_U,\bar\theta)-R\right)\le\delta+\epsilon.21​T(C(q,θˉ)−R)≤δ,21​T(C(uU​,θˉ)−R)≤δ+ϵ.

There is no upper bound imposed on ϵ\epsilonϵ or δ\deltaδ, and the fibres of eee may be empty.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 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