Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Averaging the withheld CSS phase gives a uniform coset mixture

Proved
QAlgorithms.Papers.Independent.Intakenext100.P17.css_phase_average

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

prove2quantum

Let C2≤C1≤F2nC_2\le C_1\le\mathbb F_2^nC2​≤C1​≤F2n​ be binary linear codes. Fix a representative v∈C1v\in C_1v∈C1​ and a shift x∈F2nx\in\mathbb F_2^nx∈F2n​. For each z∈F2nz\in\mathbb F_2^nz∈F2n​, define the normalized CSS vector

∣ψv,x,z⟩=∣C2∣−1/2∑w∈C2(−1)z⋅w∣x+v+w⟩,|\psi_{v,x,z}\rangle=|C_2|^{-1/2}\sum_{w\in C_2}(-1)^{z\cdot w}|x+v+w\rangle,∣ψv,x,z​⟩=∣C2​∣−1/2w∈C2​∑​(−1)z⋅w∣x+v+w⟩,

where the dot product and addition are over F2\mathbb F_2F2​. If zzz is uniform and its value is withheld, its average density operator is

2−n∑z∈F2n∣ψv,x,z⟩⟨ψv,x,z∣=1∣C2∣∑w∈C2∣v+w+x⟩⟨v+w+x∣.2^{-n}\sum_{z\in\mathbb F_2^n}|\psi_{v,x,z}\rangle\langle\psi_{v,x,z}|= \frac1{|C_2|}\sum_{w\in C_2}|v+w+x\rangle\langle v+w+x|.2−nz∈F2n​∑​∣ψv,x,z​⟩⟨ψv,x,z​∣=∣C2​∣1​w∈C2​∑​∣v+w+x⟩⟨v+w+x∣.

This is the mixture of computational words obtained by selecting www uniformly from C2C_2C2​. It removes the unused phase label from the preparation without equating protocols that publicly retain that label.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P17
Formal statement
namespace QAlgorithms.Papers.Independent.Intakenext100.P17

noncomputable section

open scoped ComplexConjugate

open Classical

open QAlgorithms.DopedTomography (bellVector)

open QAlgorithms.Papers.Independent.Support50.P04 (BinaryWord)

/-- PDF p.4, Eq.(4): averaging the independent, uniform and undisclosed phase
label z removes all cross terms and gives the uniform computational coset mixture.
The key label is a fixed representative v in C1, not an assumed literal
coset-invariant vector for nonzero z. The equation is an equality of density
operators; no claim about a public register retaining z is made. -/
theorem css_phase_average {n : ℕ}
    (C1 C2 : Submodule (ZMod 2) (BinaryWord n)) (h21 : C2 ≤ C1)
    (v : C1) (x : BinaryWord n) :
    ((2 : ℂ) ^ n)⁻¹ •
        (∑ z : BinaryWord n, pureDensity (cssPhaseWord C2 (v : BinaryWord n) x z)) =
      (Fintype.card C2 : ℂ)⁻¹ •
        (∑ w : C2, pureDensity
          (ket (bitsOfZMod ((v : BinaryWord n) + (w : BinaryWord n) + x)))) := by sorry

end

end QAlgorithms.Papers.Independent.Intakenext100.P17
Source
Simple Proof of Security of the BB84 Quantum Key Distribution Protocol, arXiv:quant-ph/0003004v2, PDF p. 4, Equation (4): averaging the unused CSS phase label
Read-back

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

For every natural number nnn, linear subspaces C1,C2⊆F2nC_1,C_2\subseteq\mathbb F_2^nC1​,C2​⊆F2n​ satisfying C2⊆C1C_2\subseteq C_1C2​⊆C1​, vector v∈C1v\in C_1v∈C1​, and arbitrary x∈F2nx\in\mathbb F_2^nx∈F2n​, define

ψz=1∣C2∣∑w∈C2(−1)[∑iziwi]∣bits⁡(x+v+w)⟩(z∈F2n),\psi_z=\frac1{\sqrt{|C_2|}}\sum_{w\in C_2} (-1)^{[\sum_i z_iw_i]}|\operatorname{bits}(x+v+w)\rangle \quad(z\in\mathbb F_2^n),ψz​=∣C2​∣​1​w∈C2​∑​(−1)[∑i​zi​wi​]∣bits(x+v+w)⟩(z∈F2n​),

where additions and the exponent sum are over F2\mathbb F_2F2​, brackets take the representative 000 or 111, bits⁡\operatorname{bits}bits converts each coordinate 111 to true and 000 to false, and ∣b⟩|b\rangle∣b⟩ is the coordinate basis vector at bbb. Writing Π(ψ)s,t=ψ(s)ψ(t)‾\Pi(\psi)_{s,t}=\psi(s)\overline{\psi(t)}Π(ψ)s,t​=ψ(s)ψ(t)​, the theorem asserts

12n∑z∈F2nΠ(ψz)=1∣C2∣∑w∈C2Π(∣bits⁡(v+w+x)⟩).\frac1{2^n}\sum_{z\in\mathbb F_2^n}\Pi(\psi_z) =\frac1{|C_2|}\sum_{w\in C_2} \Pi\bigl(|\operatorname{bits}(v+w+x)\rangle\bigr).2n1​z∈F2n​∑​Π(ψz​)=∣C2​∣1​w∈C2​∑​Π(∣bits(v+w+x)⟩).

The statement includes n=0n=0n=0; ∣C2∣|C_2|∣C2​∣ is always positive because C2C_2C2​ is a subspace.

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