Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Torus, single-spin, and joint-spin inversion of matrix units

Open
QAlgorithms.Papers.Independent.Intake100.P95.matrixUnitInversions

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

prove2quantum

Let n≥1n\ge1n≥1 and let EijE_{ij}Eij​ be an off-diagonal matrix unit on the nnn-qubit computational basis, indexed by distinct nnn-bit strings i,ji,ji,j. There exist real torus angles θk\theta_kθk​ such that

∑kθk=0,θi−θj∈π+2πZ,Ad⁡diag⁡(e−iθk)(Eij)=−Eij.\sum_k\theta_k=0,\qquad\theta_i-\theta_j\in\pi+2\pi\mathbb Z,\qquad\operatorname{Ad}_{\operatorname{diag}(e^{-i\theta_k})}(E_{ij})=-E_{ij}.k∑​θk​=0,θi​−θj​∈π+2πZ,Addiag(e−iθk​)​(Eij​)=−Eij​.

There also exist one qubit and a real z-rotation angle on that qubit alone that sign-invert EijE_{ij}Eij​. If a joint z-rotation with the same angle on every qubit sign-inverts EijE_{ij}Eij​, then iii and jjj have different Hamming weights. The last assertion is stated only as a necessary condition. These bit strings represent the paper's one-based indices after subtracting one, with leading zeroes retained.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P95
Formal statement
namespace QAlgorithms.Papers.Independent.Intake100.P95

open scoped BigOperators

open QAlgorithms.Papers.Independent.Information100.P32 (Op evolution)

open QAlgorithms.Papers.Independent.Advance50.P38 (comm realHSPairing)

open QAlgorithms.Papers.Independent.Information100.P10 (pauli)

open QAlgorithms.Papers.Independent.Claimed50.P03 (wordMatrix wordSupport)

noncomputable section

/-- Proposition 1(1)–(3), PDF p.9. Indices are already reduced by one.
The torus angles sum to zero. The final clause remains necessary only. -/
theorem matrixUnitInversions {n : ℕ} (hn : 0 < n)
    (i j : QAlgorithms.Qubits n) (hij : i ≠ j) :
    (∃ theta : QAlgorithms.Qubits n → ℝ,
      (∑ k, theta k) = 0 ∧ OddPi (theta i - theta j) ∧
      adjointConjugation (torus theta) (Matrix.single i j (1 : ℂ)) = -Matrix.single i j (1 : ℂ)) ∧
    (∃ (l : Fin n) (phi : ℝ),
      adjointConjugation (individualZRotation (fun k => if k = l then phi else 0))
        (Matrix.single i j (1 : ℂ)) = -Matrix.single i j (1 : ℂ)) ∧
    (∀ phi : ℝ, adjointConjugation (jointZ n phi) (Matrix.single i j (1 : ℂ)) = -Matrix.single i j (1 : ℂ) →
      QAlgorithms.hammingWeight i ≠ QAlgorithms.hammingWeight j) := by sorry

end

end QAlgorithms.Papers.Independent.Intake100.P95
Source
Which Quantum Evolutions Can Be Reversed by Local Unitary Operations? Algebraic Classification and Gradient-Flow-Based Numerical Checks, arXiv:quant-ph/0610061v1, PDF p. 9, Proposition 1: individual and joint inversion of matrix units
Read-back

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

For every positive integer nnn and every pair of distinct nnn-bit strings i,ji,ji,j, let EijE_{ij}Eij​ be the matrix with entry 111 in row iii, column jjj, and zero elsewhere. There exists a real function θ\thetaθ on all nnn-bit strings such that

∑kθk=0,θi−θj=(2z+1)π for some z∈Z,DθEijDθ†=−Eij,Dθ=diag⁡(e−iθk).\sum_k\theta_k=0,\qquad \theta_i-\theta_j=(2z+1)\pi\ \text{for some }z\in\mathbb Z, \qquad D_\theta E_{ij}D_\theta^\dagger=-E_{ij}, \quad D_\theta=\operatorname{diag}(e^{-\mathrm i\theta_k}).k∑​θk​=0,θi​−θj​=(2z+1)π for some z∈Z,Dθ​Eij​Dθ†​=−Eij​,Dθ​=diag(e−iθk​).

There also exist a site l∈{0,…,n−1}l\in\{0,\ldots,n-1\}l∈{0,…,n−1} and an angle ϕ∈R\phi\in\mathbb Rϕ∈R such that conjugation by the tensor product applying diag⁡(e−iϕ/2,e+iϕ/2)\operatorname{diag}(e^{-\mathrm i\phi/2},e^{+\mathrm i\phi/2})diag(e−iϕ/2,e+iϕ/2) at site lll and the identity elsewhere sends EijE_{ij}Eij​ to −Eij-E_{ij}−Eij​. Finally, for every real ϕ\phiϕ, if

R(ϕ)EijR(ϕ)†=−Eij,R(ϕ)=⨂l=0n−1diag⁡(e−iϕ/2,e+iϕ/2),R(\phi)E_{ij}R(\phi)^\dagger=-E_{ij}, \qquad R(\phi)=\bigotimes_{l=0}^{n-1}\operatorname{diag}(e^{-\mathrm i\phi/2},e^{+\mathrm i\phi/2}),R(ϕ)Eij​R(ϕ)†=−Eij​,R(ϕ)=l=0⨂n−1​diag(e−iϕ/2,e+iϕ/2),

then the number of true bits in iii differs from the number of true bits in jjj.

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

    Confirmed by the moderator at approval.

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