AFTD Auto-Formalizing Theoretical Domains

quaternion_spinor_unitary_scaled

theoremverified

The quaternion spinor matrix is unitary up to the squared quaternion norm.

Statement

theorem quaternion_spinor_unitary_scaled (q : Fin 4 → ℝ) :
    (quaternion_spinor_matrix q) * (quaternion_spinor_matrix q).conjTranspose =
      (((∑ i, (q i)^2 : ℝ) : ℂ)) • (1 : Matrix (Fin 2) (Fin 2) ℂ)
Source
arXiv:2611.19367v1, Lemma 3, quaternion reference spinor construction.
Verified
18 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
Used by 1

The proof, explained

To show that the product of the quaternion spinor matrix and its conjugate transpose is the identity matrix scaled by the squared quaternion norm $\sum_{i=0}^3 q_i^2$, the proof proceeds by direct entry-by-entry computation. It reduces the $2 \times 2$ matrix equation to four complex scalar equations, and then equates the real and imaginary parts of each entry to obtain eight real scalar equalities. Finally, it expands the definitions of matrix multiplication, complex arithmetic, and coordinate sums, reducing each entry to an elementary polynomial identity in the coordinates $q_0, q_1, q_2, q_3$ that cancels completely by commutative ring arithmetic.

  1. To prove the matrix equality, it suffices to show that the entries of both sides agree at all four index pairs $(0,0), (0,1), (1,0)$, and $(1,1)$.

    Matrix extensionality (`ext i j`) reduces equality of the two $2 \times 2$ matrices to equality of their corresponding entries at arbitrary indices $i, j \in \{0, 1\}$. Exhausting the two possible values for $i$ and for $j$ (`fin_cases i`, `fin_cases j`) splits the goal into four entry-wise complex equations.

    lines 4–5

      ext i j
      fin_cases i <;> fin_cases j <;>
  2. Each of the four entry-wise complex equations reduces to two real scalar equations, matching the real and imaginary parts.

    By complex extensionality (`Complex.ext`), two complex numbers are equal if and only if their real parts match and their imaginary parts match. Applying this to each of the four matrix entries produces eight real scalar equalities.

    line 6

    uses Complex.ext

        apply Complex.ext <;>
  3. All eight real scalar equations hold identically, verifying that the diagonal entries equal $\sum_{i=0}^3 q_i^2$ and the off-diagonal entries vanish.

    Automated simplification (`simp`) unfolds the definition of the quaternion spinor matrix (`quaternion_spinor_matrix`), matrix multiplication (`Matrix.mul_apply`), conjugate transpose (`Matrix.conjTranspose_apply`), complex conjugation (`Complex.star_def`), complex multiplication (`Complex.mul_re`, `Complex.mul_im`), and squares (`pow_two`), and expands the finite sums over indices 0 to 1 (`Fin.sum_univ_two`) and 0 to 3 (`Fin.sum_univ_four`). This reduces each entry to an explicit polynomial identity in the real coordinates $q_0, q_1, q_2, q_3$: the diagonal real parts simplify to $q_0^2 + q_1^2 + q_2^2 + q_3^2 = q_0^2 + q_1^2 + q_2^2 + q_3^2$, while the diagonal imaginary parts and all off-diagonal parts cancel to 0. Commutative ring arithmetic (`ring`) closes all eight polynomial equalities.

    lines 7–9

    uses quaternion_spinor_matrix, Matrix.mul_apply, Matrix.conjTranspose_apply, Fin.sum_univ_two, Fin.sum_univ_four, Complex.star_def, Complex.mul_re, Complex.mul_im, pow_two

        simp [quaternion_spinor_matrix, Matrix.mul_apply, Matrix.conjTranspose_apply,
          Fin.sum_univ_two, Fin.sum_univ_four, Complex.star_def,
          Complex.mul_re, Complex.mul_im, pow_two] <;> ring
Complex.ext
Two complex numbers are equal if their real parts are equal and their imaginary parts are equal.
Matrix.mul_apply
The $(i, k)$-th entry of the product of two matrices $M$ and $N$ is the sum $\sum_j M_{ij} N_{jk}$.
Matrix.conjTranspose_apply
The $(j, i)$-th entry of the conjugate transpose $M^*$ is the complex conjugate of $M_{ij}$.
Fin.sum_univ_two
The sum of a function over the two-element index set $\{0, 1\}$ equals $f(0) + f(1)$.
Fin.sum_univ_four
The sum of a function over the four-element index set $\{0, 1, 2, 3\}$ equals $f(0) + f(1) + f(2) + f(3)$.
Complex.star_def
The involution star on complex numbers is complex conjugation.
Complex.mul_re
The real part of the product of two complex numbers $z$ and $w$ is $\mathrm{Re}(z)\mathrm{Re}(w) - \mathrm{Im}(z)\mathrm{Im}(w)$.
Complex.mul_im
The imaginary part of the product of two complex numbers $z$ and $w$ is $\mathrm{Re}(z)\mathrm{Im}(w) + \mathrm{Im}(z)\mathrm{Re}(w)$.
pow_two
The square $a^2$ of an element in a monoid equals $a \cdot a$.
quaternion_spinor_matrix
The definition of the $2 \times 2$ complex matrix associated to a 4-vector $q$, with entries $(q_0 - i q_3, -q_2 - i q_1)$ in the first row and $(q_2 - i q_1, q_0 + i q_3)$ in the second row.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem quaternion_spinor_unitary_scaled (q : Fin 4 → ℝ) :    (quaternion_spinor_matrix q) * (quaternion_spinor_matrix q).conjTranspose =      (((∑ i, (q i)^2 : ℝ) : ℂ)) • (1 : Matrix (Fin 2) (Fin 2) ℂ) := by  ext i j  fin_cases i <;> fin_cases j <;>    apply Complex.ext <;>    simp [quaternion_spinor_matrix, Matrix.mul_apply, Matrix.conjTranspose_apply,      Fin.sum_univ_two, Fin.sum_univ_four, Complex.star_def,      Complex.mul_re, Complex.mul_im, pow_two] <;> ring
See it in the graphDiscuss this resultChallenge it