Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Fact 1: contraction sandwich identity

Proved
QAlgorithms.Papers.Independent.Extend50.P18.contraction_sandwich

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

prove2quantum

Let d≥1d\ge1d≥1, k≥1k\ge1k≥1, and n=r+2kn=r+2kn=r+2k with r≥0r\ge0r≥0. Let V(k)V^{(k)}V(k) be the product of the kkk swaps between registers n−2k+jn-2k+jn−2k+j and n−j+1n-j+1n−j+1, partially transposed on the final registers. Thus each transposed swap equals dP+dP^+dP+ for the normalized Bell projector. For every complex operator XXX on the first n−kn-kn−k registers,

V(k)(X⊗Ik)V(k)=(Tr⁡n−2k+1,…,n−kX⊗I2k)V(k).V^{(k)}(X\otimes I_k)V^{(k)}=(\operatorname{Tr}_{n-2k+1,\ldots,n-k}X\otimes I_{2k})V^{(k)}.V(k)(X⊗Ik​)V(k)=(Trn−2k+1,…,n−k​X⊗I2k​)V(k).

The partial trace is unnormalized. The identity applies to arbitrary operators, including non-Hermitian ones, and is the contraction rule used in subsequent trace calculations.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P18
Formal statement
noncomputable section

open scoped BigOperators Matrix ComplexOrder

namespace QAlgorithms.Papers.Independent.Extend50.P18

attribute [local instance] Classical.propDecidable

/-- Fact 1, with n=r+2k: the contraction sandwich identity for every complex
operator X, without positivity or state normalization (PDF pp.9-11, (38)). -/
theorem contraction_sandwich (d r k : ℕ) (hd : 0 < d) (hk : 0 < k)
    (X : Matrix ((Fin r → Fin d) × (Fin k → Fin d)) ((Fin r → Fin d) × (Fin k → Fin d)) ℂ) :
    pairedContraction d r k * liftInput X * pairedContraction d r k =
      liftSurvivor (k := k) (QAlgorithms.traceRight X) * pairedContraction d r k := by sorry

end QAlgorithms.Papers.Independent.Extend50.P18

end
Source
Efficient multi port-based teleportation schemes, arXiv:2008.00984v4, PDF p. 9, Fact 1
Read-back

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

For every d,r,k∈Nd,r,k\in\mathbb Nd,r,k∈N with d>0d>0d>0 and k>0k>0k>0, and every complex matrix XXX indexed by pairs (u,v)(u,v)(u,v), where u:[r]→[d]u:[r]\to[d]u:[r]→[d], v:[k]→[d]v:[k]\to[d]v:[k]→[d], and [m]={0,…,m−1}[m]=\{0,\ldots,m-1\}[m]={0,…,m−1}, define matrices on triples (u,(v,w))(u,(v,w))(u,(v,w)) as follows: C((u,(v,w)),(u′,(v′,w′)))C((u,(v,w)),(u',(v',w')))C((u,(v,w)),(u′,(v′,w′))) is 111 exactly when u=u′u=u'u=u′, v(l)=w(k−1−l)v(l)=w(k-1-l)v(l)=w(k−1−l), and v′(l)=w′(k−1−l)v'(l)=w'(k-1-l)v′(l)=w′(k−1−l) for every l∈[k]l\in[k]l∈[k], and is zero otherwise; LX((u,(v,w)),(u′,(v′,w′)))=X((u,v),(u′,v′))L_X((u,(v,w)),(u',(v',w')))=X((u,v),(u',v'))LX​((u,(v,w)),(u′,(v′,w′)))=X((u,v),(u′,v′)) when w=w′w=w'w=w′, and is zero otherwise. Define the matrix ZZZ on words of length rrr by

Z(u,u′)=∑h:[k]→[d]X((u,h),(u′,h)),Z(u,u')=\sum_{h:[k]\to[d]}X((u,h),(u',h)),Z(u,u′)=h:[k]→[d]∑​X((u,h),(u′,h)),

and define KZ((u,(v,w)),(u′,(v′,w′)))=Z(u,u′)K_Z((u,(v,w)),(u',(v',w')))=Z(u,u')KZ​((u,(v,w)),(u′,(v′,w′)))=Z(u,u′) when (v,w)=(v′,w′)(v,w)=(v',w')(v,w)=(v′,w′), and zero otherwise. Then

CLXC=KZC.C L_X C=K_Z C.CLX​C=KZ​C.

The assertion imposes no further condition on XXX and permits r=0r=0r=0, in which case the words u,u′u,u'u,u′ are empty.

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

    Confirmed by the moderator at approval.

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