Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§5.2: all-partial-trace optimality

Open
QAlgorithms.Papers.Independent.Gap48.P23.majority_weight_optimality

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, define

Fn(h)=∑k=0h(nk)−(nk−1)(nh)n−h−kn−2k.F_n(h)=\sum_{k=0}^h\frac{\binom nk-\binom n{k-1}}{\binom nh}\frac{n-h-k}{n-2k}.Fn​(h)=k=0∑h​(hn​)(kn​)−(k−1n​)​n−2kn−h−k​.

For every nonempty set H⊆{0,…,⌊n/2⌋}H\subseteq\{0,\ldots,\lfloor n/2\rfloor\}H⊆{0,…,⌊n/2⌋} of allowed minority weights, the all-partial-trace template is optimal and its optimal fidelity is the attained minimum min⁡h∈HFn(h)\min_{h\in H}F_n(h)minh∈H​Fn​(h). Taking all weights gives unrestricted majority.

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 p.37, (5.5)-(5.6): all-partial-trace optimality for every nonempty
allowed set of minority weights; includes unrestricted majority by taking all
weights. The optimum is a minimum, with attainment. -/
theorem majority_weight_optimality (n : ℕ) (hn : 1 ≤ n) (hodd : Odd n)
    (alpha : RealSchurCoefficients n) (ha : LawfulCoefficients alpha)
    (H : Finset ℕ) (hH : H.Nonempty) (hbound : ∀ h ∈ H, h ≤ n/2) :
    IsFunctionOptimal (fun x => min (booleanWordWeight x) (n-booleanWordWeight x) ∈ H) (majority n)
      (template alpha (fun _ => 1)) ∧
    IsLeast {r | ∃ h ∈ H, r = majorityWeightFidelity n h}
      (optimalFunctionFidelity (fun x => min (booleanWordWeight x) (n-booleanWordWeight x) ∈ H) (majority n)) := by sorry

end QAlgorithms.Papers.Independent.Gap48.P23

end
Source
Quantum majority vote, arXiv:2211.11729v1, PDF p. 37, §5.2: all-partial-trace optimality
Read-back

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

Let n≥1n\ge1n≥1 be odd and let HHH be a nonempty finite set of natural numbers, each at most ⌊n/2⌋\lfloor n/2\rfloor⌊n/2⌋. Let Wn={0,1}n\mathcal W_n=\{0,1\}^nWn​={0,1}n, let ∣x∣|x|∣x∣ count the 111's in xxx, and put g(x)=1g(x)=1g(x)=1 if n<2∣x∣n<2|x|n<2∣x∣, and g(x)=0g(x)=0g(x)=0 otherwise. 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​), with the second term 000 at k=0k=0k=0 and subtraction in the natural numbers. Let αk,i,p\alpha_{k,i,p}αk,i,p​ be real coefficients for i<mki<m_ki<mk​ and coordinate permutations ppp. Define Pp∣x⟩=∣x∘p−1⟩P_p|x\rangle=|x\circ p^{-1}\ranglePp​∣x⟩=∣x∘p−1⟩ and

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 otherwise ϵ=0\epsilon=0ϵ=0, with empty products equal to 111. Put 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​ for i≠0i\ne0i=0. Assume that for each kkk, the vectors vk,0,iv_{k,0,i}vk,0,i​ are orthonormal and span the orbit span of sk,0s_{k,0}sk,0​. Define 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​⟩ and 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}​. Let Tℓ(B)\mathcal T_\ell(B)Tℓ​(B), for ℓ>0\ell>0ℓ>0, have entries ∑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]​, and set T0=0\mathcal T_0=0T0​=0. Then the map Φ(ρ)=∑kTℓk(Bk(ρ))\Phi(\rho)=\sum_k\mathcal T_{\ell_k}(B_k(\rho))Φ(ρ)=∑k​Tℓk​​(Bk​(ρ)) is a channel and achieves the supremum over all finite Kraus channels Ψ\PsiΨ, with ∑jKj†Kj=I\sum_jK_j^\dagger K_j=I∑j​Kj†​Kj​=I, of

inf⁡x∈Wn: min⁡(∣x∣,n−∣x∣)∈HU∈U(2)Re⁡Tr⁡ ⁣[U∣g(x)⟩⟨g(x)∣U† Ψ ⁣(U⊗n∣x⟩⟨x∣(U†)⊗n)].\inf_{\substack{x\in\mathcal W_n:\ \min(|x|,\,n-|x|)\in H\\U\in U(2)}} \operatorname{Re}\operatorname{Tr}\!\left[ U|g(x)\rangle\langle g(x)|U^\dagger\, \Psi\!\left(U^{\otimes n}|x\rangle\langle x|(U^\dagger)^{\otimes n}\right)\right].x∈Wn​: min(∣x∣,n−∣x∣)∈HU∈U(2)​inf​ReTr[U∣g(x)⟩⟨g(x)∣U†Ψ(U⊗n∣x⟩⟨x∣(U†)⊗n)].

Moreover, this optimal value is the least member of the set {Fn,h:h∈H}\{F_{n,h}:h\in H\}{Fn,h​:h∈H}, where

Fn,h=∑k=0h(nk)−1{k≠0}(nk−1)(nh)n−h−kn−2k,F_{n,h}=\sum_{k=0}^{h} \frac{\binom nk-\mathbf1_{\{k\ne0\}}\binom n{k-1}}{\binom nh} \frac{n-h-k}{n-2k},Fn,h​=k=0∑h​(hn​)(kn​)−1{k=0}​(k−1n​)​n−2kn−h−k​,

with real subtraction in the fractions. Thus the optimal value equals one of these Fn,hF_{n,h}Fn,h​ and is no larger than any of them. The hypotheses include n=1n=1n=1, in which case H={0}H=\{0\}H={0}.

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