Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.7.

Open
QAlgorithms.Papers.Independent.Gap48.P23.fidelity_linear_program

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

prove2quantum

Work in finite-dimensional complex Hilbert spaces with the indicated computational bases. A channel is a fixed completely positive trace-preserving map, independent of the unknown word xxx and common basis UUU. Write ρxU=U⊗n∣x⟩⟨x∣U†⊗n\rho_x^U=U^{\otimes n}|x\rangle\langle x|U^{\dagger\otimes n}ρxU​=U⊗n∣x⟩⟨x∣U†⊗n. For an input promise PPP, let Ff,P(Φ)F_{f,P}(\Phi)Ff,P​(Φ) be the minimum of ⟨f(x)∣U†Φ(ρxU)U∣f(x)⟩\langle f(x)|U^\dagger\Phi(\rho_x^U)U|f(x)\rangle⟨f(x)∣U†Φ(ρxU​)U∣f(x)⟩ over every allowed xxx and U∈U(d)U\in U(d)U∈U(d), and let Ff,PF_{f,P}Ff,P​ be its supremum over channels. An omitted PPP means all words. Boolean functions use d=2d=2d=2; positive odd nnn is imposed whenever symmetry and equivariance of a Boolean function are required.

For positive odd nnn and symmetric equivariant Boolean fff, put fˉ(h)=f(0n−h1h)\bar f(h)=f(0^{n-h}1^h)fˉ​(h)=f(0n−h1h) and

pk(h)=(nk)−(nk−1)(nh),ak(h)=n−h−k−fˉ(h)(n−2h)n−2k,bk(h)=h−k+1+fˉ(h)(n−2h)n−2k+2.p_k(h)=\frac{\binom nk-\binom n{k-1}}{\binom nh},\quad a_k(h)=\frac{n-h-k-\bar f(h)(n-2h)}{n-2k},\quad b_k(h)=\frac{h-k+1+\bar f(h)(n-2h)}{n-2k+2}.pk​(h)=(hn​)(kn​)−(k−1n​)​,ak​(h)=n−2kn−h−k−fˉ​(h)(n−2h)​,bk​(h)=n−2k+2h−k+1+fˉ​(h)(n−2h)​.

The maximum of ccc under 0≤tk≤10\le t_k\le10≤tk​≤1 and c≤∑k=0hpk(h)[tkak(h)+(1−tk)bk(h)]c\le\sum_{k=0}^h p_k(h)[t_ka_k(h)+(1-t_k)b_k(h)]c≤∑k=0h​pk​(h)[tk​ak​(h)+(1−tk​)bk​(h)] for each 0≤h≤⌊n/2⌋0\le h\le\lfloor n/2\rfloor0≤h≤⌊n/2⌋ is attained and equals FfF_fFf​. Every maximizing parameter vector gives an optimal AtA_tAt​. There are ⌊n/2⌋+2\lfloor n/2\rfloor+2⌊n/2⌋+2 real variables and 3⌊n/2⌋+33\lfloor n/2\rfloor+33⌊n/2⌋+3 inequalities.

This is the stated interface for the corresponding result of the paper.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Gap48_P23
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Gap48.P23

open MeasureTheory

open scoped ComplexConjugate Matrix ComplexOrder

attribute [local instance] Classical.propDecidable

attribute [local instance] Classical.decEq

-- Exact frozen coordinate helpers; no paper-local redeclarations.

open QAlgorithms.Papers.Independent.Information100.P58 (Word)

open QAlgorithms.Papers.Independent.Information100.P21 (Op)

open QAlgorithms.Papers.Independent.Information100.P63 (tensorPower)

/-- PDF pp.31-32, Theorem 4.7: the explicit LP has an attained optimum equal
to channel optimal fidelity; EVERY optimizer transfers to Algorithm 2. The
variable and inequality counts are built into FunctionLPFeasible. -/
theorem fidelity_linear_program (n : ℕ) (hn : 1 ≤ n) (hodd : Odd n)
    (alpha : RealSchurCoefficients n) (ha : LawfulCoefficients alpha)
    (f : Word n 2 → Fin 2) (hf : WordSymmetric f) (he : Equivariant f) :
    (∃ t : TwoRowShape n → ℝ, FunctionLPFeasible f (optimalFunctionFidelity (fun _ => True) f) t) ∧
    (∀ c t, FunctionLPFeasible f c t → c ≤ optimalFunctionFidelity (fun _ => True) f) ∧
    (∀ c t, FunctionLPFeasible f c t → c = optimalFunctionFidelity (fun _ => True) f →
      IsFunctionOptimal (fun _ => True) f (template alpha t)) := by sorry

end QAlgorithms.Papers.Independent.Gap48.P23

end
Source
Quantum majority vote, arXiv:2211.11729v1, PDF p. 31, Theorem 4.7.
Read-back

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

Let n≥1n\ge1n≥1 be odd, let Wn={0,1}n\mathcal W_n=\{0,1\}^nWn​={0,1}n, and let f:Wn→{0,1}f:\mathcal W_n\to\{0,1\}f:Wn​→{0,1} be invariant under coordinate permutations and satisfy f(π∘x)=π(f(x))f(\pi\circ x)=\pi(f(x))f(π∘x)=π(f(x)) for every permutation π\piπ of the two symbols. For 0≤k≤⌊n/2⌋0\le k\le\lfloor n/2\rfloor0≤k≤⌊n/2⌋, put ℓk=n−2k\ell_k=n-2kℓk​=n−2k and mk=(nk)−(nk−1)m_k=\binom nk-\binom n{k-1}mk​=(kn​)−(k−1n​), interpreting the second term as 000 at k=0k=0k=0 and using natural-number subtraction. Let αk,i,p∈R\alpha_{k,i,p}\in\mathbb Rαk,i,p​∈R, where i<mki<m_ki<mk​ and ppp is a coordinate permutation. With Pp∣x⟩=∣x∘p−1⟩P_p|x\rangle=|x\circ p^{-1}\ranglePp​∣x⟩=∣x∘p−1⟩, define

sk,w(x)=(ℓkw)−1/21{∑a<ℓkxa=w}∏j<kϵ(xℓk+2j,xℓk+2j+1)2,s_{k,w}(x)=\binom{\ell_k}{w}^{-1/2} \mathbf1_{\{\sum_{a<\ell_k}x_a=w\}} \prod_{j<k}\frac{\epsilon(x_{\ell_k+2j},x_{\ell_k+2j+1})}{\sqrt2},sk,w​(x)=(wℓk​​)−1/21{∑a<ℓk​​xa​=w}​j<k∏​2​ϵ(xℓk​+2j​,xℓk​+2j+1​)​,

where ϵ(0,1)=1\epsilon(0,1)=1ϵ(0,1)=1, ϵ(1,0)=−1\epsilon(1,0)=-1ϵ(1,0)=−1, and the other two values are 000; empty products are 111. Define vk,w,0=sk,wv_{k,w,0}=s_{k,w}vk,w,0​=sk,w​ and vk,w,i=∑pαk,i,pPpsk,wv_{k,w,i}=\sum_p\alpha_{k,i,p}P_ps_{k,w}vk,w,i​=∑p​αk,i,p​Pp​sk,w​ when i≠0i\ne0i=0. Assume that, for every kkk, the vectors vk,0,iv_{k,0,i}vk,0,i​ are orthonormal and span the same space as the vectors Ppsk,0P_ps_{k,0}Pp​sk,0​. For a word xxx, let ∣x∣|x|∣x∣ count its 111's, and let x(h)x^{(h)}x(h) have n−hn-hn−h initial zeros followed by hhh ones. Define feasibility of a real number ccc and real parameters tkt_ktk​ to mean 0≤tk≤10\le t_k\le10≤tk​≤1 for all kkk and, for every 0≤h≤⌊n/2⌋0\le h\le\lfloor n/2\rfloor0≤h≤⌊n/2⌋,

c≤∑k=0h(nk)−1{k≠0}(nk−1)(nh)[tkn−h−k−f(x(h))(n−2h)n−2k+(1−tk)h−k+1+f(x(h))(n−2h)n−2k+2],c\le \sum_{k=0}^{h} \frac{\binom nk-\mathbf1_{\{k\ne0\}}\binom n{k-1}}{\binom nh} \left[ t_k\frac{n-h-k-f(x^{(h)})(n-2h)}{n-2k} +(1-t_k)\frac{h-k+1+f(x^{(h)})(n-2h)}{n-2k+2} \right],c≤k=0∑h​(hn​)(kn​)−1{k=0}​(k−1n​)​[tk​n−2kn−h−k−f(x(h))(n−2h)​+(1−tk​)n−2k+2h−k+1+f(x(h))(n−2h)​],

where the numerators and denominators in this display are real arithmetic. Let F∗F^*F∗ be the supremum, over channels Φ\PhiΦ, of

inf⁡x∈WnU∈U(2)Re⁡Tr⁡ ⁣[U∣f(x)⟩⟨f(x)∣U† Φ ⁣(U⊗n∣x⟩⟨x∣(U†)⊗n)],\inf_{\substack{x\in\mathcal W_n\\U\in U(2)}} \operatorname{Re}\operatorname{Tr}\!\left[ U|f(x)\rangle\langle f(x)|U^\dagger\, \Phi\!\left(U^{\otimes n}|x\rangle\langle x|(U^\dagger)^{\otimes n}\right)\right],x∈Wn​U∈U(2)​inf​ReTr[U∣f(x)⟩⟨f(x)∣U†Φ(U⊗n∣x⟩⟨x∣(U†)⊗n)],

where channels are exactly finite Kraus maps with ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I. Then some ttt is feasible with c=F∗c=F^*c=F∗; every feasible pair (c,t)(c,t)(c,t) satisfies c≤F∗c\le F^*c≤F∗; and every feasible pair with c=F∗c=F^*c=F∗ yields a channel achieving F∗F^*F∗ through the following construction. Put Bk(ρ)wv=∑i<mk⟨vk,w,i,ρvk,v,i⟩B_k(\rho)_{wv}=\sum_{i<m_k}\langle v_{k,w,i},\rho v_{k,v,i}\rangleBk​(ρ)wv​=∑i<mk​​⟨vk,w,i​,ρvk,v,i​⟩, Jℓ(x,w)=(ℓw)−1/21{∣x∣=w}J_\ell(x,w)=\binom\ell w^{-1/2}\mathbf1_{\{|x|=w\}}Jℓ​(x,w)=(wℓ​)−1/21{∣x∣=w}​, and let Tℓ(B)\mathcal T_\ell(B)Tℓ​(B) be the first-qubit reduction of JℓBJℓ†J_\ell BJ_\ell^\daggerJℓ​BJℓ†​, whose (a,b)(a,b)(a,b) entry for ℓ>0\ell>0ℓ>0 is ∑x:x0=a(JℓBJℓ†)x,x[0←b]\sum_{x:x_0=a}(J_\ell BJ_\ell^\dagger)_{x,x[0\leftarrow b]}∑x:x0​=a​(Jℓ​BJℓ†​)x,x[0←b]​, with T0=0\mathcal T_0=0T0​=0. Also put

Nℓ(B)=∫(ℓ+1)⟨sℓ(ϕ),Bsℓ(ϕ)⟩(I2−∣ϕ⟩⟨ϕ∣) dμ(ϕ),sℓ(ϕ)w=(ℓw)ϕ0ℓ−wϕ1w,\mathcal N_\ell(B)=\int(\ell+1)\langle s_\ell(\phi),B s_\ell(\phi)\rangle (I_2-|\phi\rangle\langle\phi|)\,d\mu(\phi), \qquad s_\ell(\phi)_w=\sqrt{\binom\ell w}\phi_0^{\ell-w}\phi_1^w,Nℓ​(B)=∫(ℓ+1)⟨sℓ​(ϕ),Bsℓ​(ϕ)⟩(I2​−∣ϕ⟩⟨ϕ∣)dμ(ϕ),sℓ​(ϕ)w​=(wℓ​)​ϕ0ℓ−w​ϕ1w​,

where μ\muμ is the first-column distribution of normalized Haar measure on U(2)U(2)U(2). The asserted optimal channel is

Φt(ρ)=∑k[tkTℓk(Bk(ρ))+(1−tk)Nℓk(Bk(ρ))].\Phi_t(\rho)=\sum_k\bigl[t_k\mathcal T_{\ell_k}(B_k(\rho)) +(1-t_k)\mathcal N_{\ell_k}(B_k(\rho))\bigr].Φt​(ρ)=k∑​[tk​Tℓk​​(Bk​(ρ))+(1−tk​)Nℓk​​(Bk​(ρ))].
Human review
  • Endorsed by Shuze Chen · Oct 22, 2026

    Confirmed by the moderator at approval.

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