Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Spin-half exchange equals an affine SWAP operator

Open
QAlgorithms.Papers.Independent.Extend50.P10.smLemmaI1_exchange

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

prove2quantum

For distinct sites i,ji,ji,j of an nnn-qubit register, let Sia=σia/2S_i^a=\sigma_i^a/2Sia​=σia​/2 for a=x,y,za=x,y,za=x,y,z, and let PijP_{ij}Pij​ exchange tensor factors i,ji,ji,j. Then

SixSjx+SiySjy+SizSjz=12Pij−14I.S_i^xS_j^x+S_i^yS_j^y+S_i^zS_j^z=\frac12P_{ij}-\frac14I.Six​Sjx​+Siy​Sjy​+Siz​Sjz​=21​Pij​−41​I.

The identity acts on the full register. This identifies each spin-half Heisenberg interaction with an element of the represented permutation algebra.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P10
Formal statement
noncomputable section

open scoped Matrix

open QAlgorithms

open QAlgorithms.Schur

open QAlgorithms.Papers.Independent.Information100.P44 (matrixUnit)

namespace QAlgorithms.Papers.Independent.Extend50.P10

attribute [local instance] Classical.propDecidable

/-- PDF p.18, SM Lemma I.1 (also Eq.(9), p.12): distinct spin-half sites satisfy
S_i·S_j = (1/2) SWAP_ij − (1/4) I. -/
theorem smLemmaI1_exchange {n : ℕ} (i j : Fin n) (hij : i ≠ j) :
    spinDot i j = (1 / 2 : ℂ) • tensorPermutation 2 n (Equiv.swap i j) -
      (1 / 4 : ℂ) • (1 : Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P10

end
Source
Speeding up Learning Quantum States through Group Equivariant Convolutional Quantum Ansätze, arXiv:2112.07611v3, PDF p. 18, SM Lemma I.1: spin-half exchange identity
Read-back

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

For every natural number nnn and distinct sites i,j∈{0,…,n−1}i,j\in\{0,\ldots,n-1\}i,j∈{0,…,n−1}, let Sℓ(A)xy=12Axℓ,yℓS_\ell(A)_{xy}=\frac12A_{x_\ell,y_\ell}Sℓ​(A)xy​=21​Axℓ​,yℓ​​ if configurations x,y∈{0,1}nx,y\in\{0,1\}^nx,y∈{0,1}n agree away from ℓ\ellℓ, and zero otherwise. With

X=(0110),Y=(0−ii0),Z=(100−1),X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Y=\begin{pmatrix}0&-\mathrm{i}\\\mathrm{i}&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix},X=(01​10​),Y=(0i​−i0​),Z=(10​0−1​),

the asserted identity is

Si(X)Sj(X)+Si(Y)Sj(Y)+Si(Z)Sj(Z)=12Pij−14I,S_i(X)S_j(X)+S_i(Y)S_j(Y)+S_i(Z)S_j(Z) =\frac12P_{ij}-\frac14I,Si​(X)Sj​(X)+Si​(Y)Sj​(Y)+Si​(Z)Sj​(Z)=21​Pij​−41​I,

where III is the identity on configurations and (Pij)yx=1(P_{ij})_{yx}=1(Pij​)yx​=1 exactly when y=x∘(i j)−1y=x\circ(i\,j)^{-1}y=x∘(ij)−1, and is zero otherwise; thus PijP_{ij}Pij​ interchanges sites iii and jjj. The distinct-site hypothesis can be satisfied only when n≥2n\geq2n≥2.

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me