AFTD Auto-Formalizing Theoretical Domains

four_symmetric_normal_spectral_from_real_pair

theoremverified

Complex symmetric normal four-by-four matrices have a real orthogonal eigenbasis, conditional on simultaneous diagonalization of commuting real symmetric four-by-four matrices.

Statement

theorem four_symmetric_normal_spectral_from_real_pair
    (N : Matrix (Fin 4) (Fin 4) ℂ) (hsym : N.transpose = N)
    (hnormal : Nᴴ * N = N * Nᴴ)
    (hdiag : ∀ (R S : Matrix (Fin 4) (Fin 4) ℝ),
      R.transpose = R → S.transpose = S → R*S = S*R →
      ∃ (O : Matrix (Fin 4) (Fin 4) ℝ) (r s : Fin 4 → ℝ),
        O.transpose * O = 1 ∧ O * O.transpose = 1 ∧
        R = O * Matrix.diagonal r * O.transpose ∧
        S = O * Matrix.diagonal s * O.transpose) :
    ∃ (O : Matrix (Fin 4) (Fin 4) ℝ) (lam : Fin 4 → ℂ),
      O.transpose * O = 1 ∧ O * O.transpose = 1 ∧
      let Q : Matrix (Fin 4) (Fin 4) ℂ := fun i j => O i j
      N = Q * Matrix.diagonal lam * Q.transpose
Source
Helper for OP-693, in the rank-four normal-completion route related to https://arxiv.org/abs/0903.0090.
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext

The proof, explained

The proof decomposes the complex symmetric normal matrix $N$ into its real and imaginary parts $N = R + i S$. By entrywise symmetry $N^T = N$, the real matrices $R$ and $S$ are symmetric, and the normality condition $N^* N = N N^*$ implies that $R$ and $S$ commute. The assumed simultaneous diagonalization hypothesis then supplies a real orthogonal matrix $O$ simultaneously diagonalizing $R$ and $S$ with real eigenvalues $r$ and $s$. Combining these into complex eigenvalues $\lambda = r + i s$ shows that $N = Q \mathrm{diag}(\lambda) Q^T$, where $Q$ is the orthogonal matrix $O$ viewed over $\mathbb{C}$.

  1. The entries of $N$ satisfy $N_{ij} = N_{ji}$ for all $i, j \in \{0, 1, 2, 3\}$.

    From the symmetry hypothesis $N^T = N$ (hsym), applying equality of values (`congrArg`) to select the $(j, i)$-entry and rewriting with the definition of the matrix transpose (`Matrix.transpose_apply`) yields entrywise symmetry $N_{ij} = N_{ji}$ (hs).

    lines 11–14

    uses congrArg, Matrix.transpose_apply

      dsimp only
      have hs (i j : Fin 4) : N i j = N j i := by
        have h := congrArg (fun M : Matrix (Fin 4) (Fin 4) ℂ => M j i) hsym
        simpa only [Matrix.transpose_apply] using h
  2. The real part $R = \mathrm{Re}(N)$ and imaginary part $S = \mathrm{Im}(N)$ are symmetric real matrices ($R^T = R$ and $S^T = S$).

    To show that $R^T = R$ and $S^T = S$, it suffices by matrix extensionality (`ext`) to verify equality entrywise. For each entry $(i, j)$, transposition evaluates at index $(j, i)$; applying the real and imaginary part projections (`Complex.re` and `Complex.im`) via `congrArg` to the entrywise symmetry $N_{ji} = N_{ij}$ shows $(R^T)_{ij} = R_{ji} = R_{ij}$ and $(S^T)_{ij} = S_{ji} = S_{ij}$.

    lines 15–19

    uses congrArg, Complex.re, Complex.im

      refine ⟨?_, ?_, ?_⟩
      · ext i j
        exact congrArg Complex.re (hs j i)
      · ext i j
        exact congrArg Complex.im (hs j i)
  3. The real and imaginary parts commute ($R S = S R$). automation

    By matrix extensionality, it suffices to prove $(R S)_{ij} = (S R)_{ij}$ for all indices $i, j$. From the normality hypothesis $N^* N = N N^*$ (hnormal), we equate entry $(i, j)$ and take the imaginary part via `congrArg`. Expanding matrix multiplication (`Matrix.mul_apply`), conjugate transpose (`Matrix.conjTranspose_apply`), and the four-term sums (`Fin.sum_univ_four`), together with complex arithmetic (`Complex.add_im`, `Complex.mul_im`, `Complex.star_def`, `Complex.conj_im`, `Complex.conj_re`) and symmetry $N_{ij} = N_{ji}$, gives the relation $(R S - S R)_{ij} = (S R - R S)_{ij}$. Linear arithmetic (`linarith`) solves this linear identity to conclude $(R S)_{ij} = (S R)_{ij}$.

    lines 20–27

    uses congrArg, Complex.im, Matrix.mul_apply, Matrix.conjTranspose_apply, Fin.sum_univ_four, Complex.add_im, Complex.mul_im, Complex.star_def, Complex.conj_im, Complex.conj_re

      · ext i j
        have hn := congrArg Complex.im (congrArg (fun M : Matrix (Fin 4) (Fin 4) ℂ => M i j) hnormal)
        simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Fin.sum_univ_four,
          Complex.add_im, Complex.mul_im, Complex.star_def, Complex.conj_im, Complex.conj_re] at hn
        simp only [Matrix.mul_apply, Fin.sum_univ_four]
        simp only [hs i, hs j] at hn
        simp only [hs i, hs j]
        linarith
  4. There exist a real orthogonal matrix $O$ and eigenvalue vectors $r, s : \{0, 1, 2, 3\} \to \mathbb{R}$ simultaneously diagonalizing $R$ and $S$ as $R = O \mathrm{diag}(r) O^T$ and $S = O \mathrm{diag}(s) O^T$.

    Applying the lemma `in767_spectralproof_normal_symmetric_parts_commute` shows that the real part $R$ and imaginary part $S$ are symmetric and commute. The hypothesis `hdiag` on commuting real symmetric $4 \times 4$ matrices then yields an orthogonal matrix $O$ (satisfying $O^T O = 1$ and $O O^T = 1$) and diagonal vectors $r$ and $s$ such that $R = O \mathrm{diag}(r) O^T$ and $S = O \mathrm{diag}(s) O^T$.

    lines 42–43

    uses in767_spectralproof_normal_symmetric_parts_commute

      obtain ⟨hR, hS, hRS⟩ := in767_spectralproof_normal_symmetric_parts_commute N hsym hnormal
      obtain ⟨O, r, s, horth, hcoorth, hr, hi⟩ := hdiag _ _ hR hS hRS
  5. With candidate orthogonal matrix $O$ and complex eigenvalues $\lambda_k = r_k + i s_k$, it suffices to show $N = Q \mathrm{diag}(\lambda) Q^T$, where $Q$ is $O$ regarded as a complex matrix.

    We provide $O$ and the complex eigenvalue vector $\lambda = r + i s$ defined via `Complex.I`. The orthogonality relations $O^T O = 1$ and $O O^T = 1$ hold directly from the simultaneous diagonalization, leaving only the matrix identity $N = Q \mathrm{diag}(\lambda) Q^T$ to be established.

    lines 44–45

    uses Complex.I

      refine ⟨O, fun k => (r k : ℂ) + Complex.I * (s k : ℂ), horth, hcoorth, ?_⟩
      dsimp only
  6. For each entry $(i, j)$, the real part $\mathrm{Re}(N_{ij})$ and imaginary part $\mathrm{Im}(N_{ij})$ are expressed as explicit four-term sums matching the expanded $(i, j)$-entry of $Q \mathrm{diag}(\lambda) Q^T$.

    By matrix extensionality (`ext`), we consider an arbitrary entry $(i, j)$. Evaluating the $(i, j)$-entries of the diagonal forms $R = O \mathrm{diag}(r) O^T$ and $S = O \mathrm{diag}(s) O^T$ via `congrArg`, and expanding matrix multiplication (`Matrix.mul_apply`), diagonal multiplication (`Matrix.mul_diagonal`), transposition (`Matrix.transpose_apply`), and the four-term sums (`Fin.sum_univ_four`), yields explicit sums for $\mathrm{Re}(N_{ij})$ and $\mathrm{Im}(N_{ij})$. We also rewrite the $(i, j)$-entry of the target matrix product using `Matrix.mul_apply`.

    lines 46–51

    uses congrArg, Matrix.mul_apply, Matrix.mul_diagonal, Matrix.transpose_apply, Fin.sum_univ_four

      ext i j
      have hr' := congrArg (fun M : Matrix (Fin 4) (Fin 4) ℝ => M i j) hr
      have hi' := congrArg (fun M : Matrix (Fin 4) (Fin 4) ℝ => M i j) hi
      rw [Matrix.mul_apply] at hr' hi'
      simp only [Matrix.mul_diagonal, Matrix.transpose_apply, Fin.sum_univ_four] at hr' hi'
      rw [Matrix.mul_apply]
  7. The matrix factorization $N = Q \mathrm{diag}(\lambda) Q^T$ holds entrywise. automation

    By `Complex.ext`, two complex numbers are equal if their real and imaginary parts match. Expanding the real and imaginary parts of the target matrix entry using `Complex.mul_re` and `Complex.mul_im`, along with `Matrix.mul_diagonal`, `Matrix.transpose_apply`, and `Fin.sum_univ_four`, reduces both components to the explicit sums found for $\mathrm{Re}(N_{ij})$ and $\mathrm{Im}(N_{ij})$, which linear arithmetic (`linarith`) verifies.

    lines 52–54

    uses Complex.ext, Matrix.mul_diagonal, Matrix.transpose_apply, Fin.sum_univ_four, Complex.mul_re, Complex.mul_im

      apply Complex.ext <;>
        simp [Matrix.mul_diagonal, Matrix.transpose_apply, Fin.sum_univ_four,
          Complex.mul_re, Complex.mul_im] <;> linarith
congrArg
If two inputs are equal, applying any function to them yields equal values ($a_1 = a_2 \implies f(a_1) = f(a_2)$).
Matrix.transpose_apply
The $(i, j)$-entry of the transpose matrix $M^T$ is $M_{ji}$.
Complex.re
The projection extracting the real part of a complex number.
Complex.im
The projection extracting the imaginary part of a complex number.
Matrix.mul_apply
The $(i, k)$-entry of the matrix product $M * N$ is given by the sum $\sum_j M_{ij} N_{jk}$.
Matrix.conjTranspose_apply
The $(j, i)$-entry of the conjugate transpose $M^H$ is the complex conjugate of $M_{ij}$.
Fin.sum_univ_four
The sum of a function over the four-element index set Fin 4 is the sum of its four terms $f(0) + f(1) + f(2) + f(3)$.
Complex.add_im
The imaginary part of a sum of complex numbers is the sum of their imaginary parts: $\mathrm{Im}(z + w) = \mathrm{Im}(z) + \mathrm{Im}(w)$.
Complex.mul_im
The imaginary part of a product of complex numbers is $\mathrm{Im}(z w) = \mathrm{Re}(z)\mathrm{Im}(w) + \mathrm{Im}(z)\mathrm{Re}(w)$.
Complex.star_def
The star operation on complex numbers is the complex conjugation ring automorphism.
Complex.conj_im
The imaginary part of the complex conjugate $\overline{z}$ is $-\mathrm{Im}(z)$.
Complex.conj_re
The real part of the complex conjugate $\overline{z}$ is $\mathrm{Re}(z)$.
in767_spectralproof_normal_symmetric_parts_commute
For any complex symmetric normal $4 \times 4$ matrix $N$, its real part $R$ and imaginary part $S$ are symmetric ($R^T = R$, $S^T = S$) and commute ($R S = S R$).
Complex.I
The imaginary unit $i \in \mathbb{C}$, satisfying $i^2 = -1$.
Matrix.mul_diagonal
Multiplying a matrix $M$ on the right by a diagonal matrix with diagonal $d$ scales each $(i, j)$-entry of $M$ by $d_j$.
Complex.ext
Two complex numbers are equal if and only if their real parts are equal and their imaginary parts are equal.
Complex.mul_re
The real part of a product of complex numbers is $\mathrm{Re}(z w) = \mathrm{Re}(z)\mathrm{Re}(w) - \mathrm{Im}(z)\mathrm{Im}(w)$.

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

open Matrixopen scoped BigOperators Matrix ComplexOrderset_option backward.isDefEq.respectTransparency falseset_option linter.unusedSimpArgs falseprivate lemma in767_spectralproof_normal_symmetric_parts_commute    (N : Matrix (Fin 4) (Fin 4) ℂ) (hsym : N.transpose = N)    (hnormal : Nᴴ * N = N * Nᴴ) :    let R : Matrix (Fin 4) (Fin 4) ℝ := fun i j => (N i j).re    let S : Matrix (Fin 4) (Fin 4) ℝ := fun i j => (N i j).im    R.transpose = R ∧ S.transpose = S ∧ R*S=S*R := by  dsimp only  have hs (i j : Fin 4) : N i j = N j i := by    have h := congrArg (fun M : Matrix (Fin 4) (Fin 4) ℂ => M j i) hsym    simpa only [Matrix.transpose_apply] using h  refine ⟨?_, ?_, ?_⟩  · ext i j    exact congrArg Complex.re (hs j i)  · ext i j    exact congrArg Complex.im (hs j i)  · ext i j    have hn := congrArg Complex.im (congrArg (fun M : Matrix (Fin 4) (Fin 4) ℂ => M i j) hnormal)    simp only [Matrix.mul_apply, Matrix.conjTranspose_apply, Fin.sum_univ_four,      Complex.add_im, Complex.mul_im, Complex.star_def, Complex.conj_im, Complex.conj_re] at hn    simp only [Matrix.mul_apply, Fin.sum_univ_four]    simp only [hs i, hs j] at hn    simp only [hs i, hs j]    linariththeorem four_symmetric_normal_spectral_from_real_pair    (N : Matrix (Fin 4) (Fin 4) ℂ) (hsym : N.transpose = N)    (hnormal : Nᴴ * N = N * Nᴴ)    (hdiag : ∀ (R S : Matrix (Fin 4) (Fin 4) ℝ),      R.transpose = R → S.transpose = S → R*S = S*R →      ∃ (O : Matrix (Fin 4) (Fin 4) ℝ) (r s : Fin 4 → ℝ),        O.transpose * O = 1 ∧ O * O.transpose = 1 ∧        R = O * Matrix.diagonal r * O.transpose ∧        S = O * Matrix.diagonal s * O.transpose) :    ∃ (O : Matrix (Fin 4) (Fin 4) ℝ) (lam : Fin 4 → ℂ),      O.transpose * O = 1 ∧ O * O.transpose = 1 ∧      let Q : Matrix (Fin 4) (Fin 4) ℂ := fun i j => O i j      N = Q * Matrix.diagonal lam * Q.transpose := by  obtain ⟨hR, hS, hRS⟩ := in767_spectralproof_normal_symmetric_parts_commute N hsym hnormal  obtain ⟨O, r, s, horth, hcoorth, hr, hi⟩ := hdiag _ _ hR hS hRS  refine ⟨O, fun k => (r k : ℂ) + Complex.I * (s k : ℂ), horth, hcoorth, ?_⟩  dsimp only  ext i j  have hr' := congrArg (fun M : Matrix (Fin 4) (Fin 4) ℝ => M i j) hr  have hi' := congrArg (fun M : Matrix (Fin 4) (Fin 4) ℝ => M i j) hi  rw [Matrix.mul_apply] at hr' hi'  simp only [Matrix.mul_diagonal, Matrix.transpose_apply, Fin.sum_univ_four] at hr' hi'  rw [Matrix.mul_apply]  apply Complex.ext <;>    simp [Matrix.mul_diagonal, Matrix.transpose_apply, Fin.sum_univ_four,      Complex.mul_re, Complex.mul_im] <;> linarith
See it in the graphDiscuss this resultChallenge it