Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

II B: code equivalence preserves updated states and thresholds, (7)

Open
QAlgorithms.Papers.Independent.Intakethird100.P30.equivalentCodes

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let CCC and DDD be nonempty codes of distinct nnn-bit words, n≥1n\ge1n≥1. Suppose a permutation of coordinates followed by XOR with one fixed binary word maps their underlying code sets onto one another; word enumeration is immaterial. Let PC(Q)P_C(Q)PC​(Q) and PD(Q)P_D(Q)PD​(Q) denote their Bob-only filtered six-state operators. There are local permutation unitaries UUU on Alice and VVV between the code-label registers, chosen independently of QQQ, such that

PC(Q)=(U⊗V)PD(Q)(U⊗V)†for every 0≤Q≤12.P_C(Q)=(U\otimes V)P_D(Q)(U\otimes V)^\dagger \quad\text{for every }0\le Q\le\tfrac12.PC​(Q)=(U⊗V)PD​(Q)(U⊗V)†for every 0≤Q≤21​.

Consequently the two operators are symmetrically extendable for exactly the same QBERs, and

QC∗=QD∗.Q_C^*=Q_D^*.QC∗​=QD∗​.

This is the fixed-basis interpretation of the source's equality: changing word order or coordinate labels changes matrix coefficients by local unitaries.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P30
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Intakethird100.P30

open scoped BigOperators Matrix ComplexConjugate ComplexOrder

attribute [local instance] Classical.propDecidable Classical.decEq

variable {I J K L A B : Type}

variable [Fintype I] [Fintype J] [Fintype K] [Fintype L]

variable [Fintype A] [Fintype B]

/-- PDF pp.3–4, (7): equality means local permutation conjugacy, independently
of Q. Printed raw matrix equality is corrected using p.3's ordering convention. -/
theorem equivalentCodes {n : ℕ} (hn : 1 ≤ n) [Nonempty K] [Nonempty L]
    (C : K → Qubits n) (D : L → Qubits n)
    (hC : Function.Injective C) (hD : Function.Injective D)
    (hCD : CodeEquivalent C D) :
    (∃ (u : Equiv.Perm (Qubits n)) (v : L ≃ K),
      let U : Matrix (Qubits n) (Qubits n) ℂ := fun a b => if a = u b then 1 else 0
      let V : Matrix K L ℂ := fun k l => if k = v l then 1 else 0
      Uᴴ * U = 1 ∧ U * Uᴴ = 1 ∧ Vᴴ * V = 1 ∧ V * Vᴴ = 1 ∧
      ∀ Q : ℝ, 0 ≤ Q → Q ≤ 1 / 2 →
        bobState C Q = Matrix.kronecker U V * bobState D Q * (Matrix.kronecker U V)ᴴ) ∧
    (∀ Q : ℝ, 0 ≤ Q → Q ≤ 1 / 2 →
      (BobExtendible (bobState C Q) ↔ BobExtendible (bobState D Q))) ∧
    bobThreshold C = bobThreshold D := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P30

end
Source
Numerical evidence for bound secrecy from two-way post-processing in quantum key distribution, arXiv:1612.07734v2, PDF p. 4, II B: code equivalence preserves updated states and thresholds, (7)
Read-back

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

Let n≥1n\ge1n≥1, let K,LK,LK,L be finite nonempty label types with the required decidable equality, and let C:K→{0,1}nC:K\to\{0,1\}^{n}C:K→{0,1}n and D:L→{0,1}nD:L\to\{0,1\}^{n}D:L→{0,1}n be injective. Assume there exist a coordinate permutation ppp, a Boolean mask ttt, and a bijection e:K→Le:K\to Le:K→L such that C(k)i=D(e(k))p(i)⊕tiC(k)_i=D(e(k))_{p(i)}\oplus t_iC(k)i​=D(e(k))p(i)​⊕ti​ for every k,ik,ik,i. For either code EEE, define

BE,Q((a,k),(a′,l))=∏i=0n−1(1−2Q21ai=E(k)i1ai′=E(l)i+Q21ai=ai′1E(k)i=E(l)i).B_{E,Q}((a,k),(a',l)) =\prod_{i=0}^{n-1} \left( \frac{1-2Q}{2}\mathbf1_{a_i=E(k)_i}\mathbf1_{a'_i=E(l)_i} +\frac Q2\mathbf1_{a_i=a'_i}\mathbf1_{E(k)_i=E(l)_i} \right).BE,Q​((a,k),(a′,l))=i=0∏n−1​(21−2Q​1ai​=E(k)i​​1ai′​=E(l)i​​+2Q​1ai​=ai′​​1E(k)i​=E(l)i​​).

The theorem asserts the existence of a permutation uuu of all nnn-bit strings and a bijection v:L→Kv:L\to Kv:L→K such that the matrices Ua,b=1a=u(b)U_{a,b}=\mathbf1_{a=u(b)}Ua,b​=1a=u(b)​ and Vk,l=1k=v(l)V_{k,l}=\mathbf1_{k=v(l)}Vk,l​=1k=v(l)​ satisfy

U†U=UU†=I,V†V=VV†=I,U^\dagger U=UU^\dagger=I,\qquad V^\dagger V=VV^\dagger=I,U†U=UU†=I,V†V=VV†=I,

and, for every Q∈[0,1/2]Q\in[0,1/2]Q∈[0,1/2],

BC,Q=(U⊗V)BD,Q(U⊗V)†.B_{C,Q}=(U\otimes V)B_{D,Q}(U\otimes V)^\dagger.BC,Q​=(U⊗V)BD,Q​(U⊗V)†.

For every such QQQ, it also asserts that BC,QB_{C,Q}BC,Q​ admits a Bob-copy extension if and only if BD,QB_{D,Q}BD,Q​ does, where such an extension is a positive semidefinite matrix on an additional copy of the label subsystem with both label-copy partial traces equal to the original matrix, without a trace-one requirement. Finally, it asserts b(C)=b(D)b(C)=b(D)b(C)=b(D), where

b(E)=sup⁡ ⁣({0}∪{q∈[0,1/2]:BE,q admits no Bob-copy extension}).b(E)=\sup\!\left(\{0\}\cup \{q\in[0,1/2]:B_{E,q}\text{ admits no Bob-copy extension}\}\right).b(E)=sup({0}∪{q∈[0,1/2]:BE,q​ admits no Bob-copy extension}).

The same u,vu,vu,v work for every QQQ in the stated interval.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me