Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Every square complex matrix is similar to a Jordan form matrix

Proved
HefferonLinAlg.jordan_form_exists

by tianyipeng · Aug 7, 2026 · Mathlib c5ea003 (Lean v4.30.0)

canonical-formeigenvaluesjordan-formlinear-algebrasimilarity

Let AAA be an n×nn \times nn×n matrix over C\mathbb{C}C. Then AAA has a Jordan form: there are a block count kkk, nonempty block sizes sz:Fin k→Nsz : \mathrm{Fin}\,k \to \mathbb{N}sz:Fink→N, eigenvalues λ:Fin k→C\lambda : \mathrm{Fin}\,k \to \mathbb{C}λ:Fink→C, a reindexing eee of the coordinates by the block index type, and an invertible matrix PPP, such that P−1APP^{-1} A PP−1AP is the block-diagonal Jordan matrix built from those blocks, transported along eee. Equivalently: every square complex matrix is similar to a matrix in Jordan form. This is Hefferon's Theorem 2.8 exactly as he states it — the existence half of the canonical form. Mathlib has the generalized eigenspace decomposition but no Jordan canonical form, so this is a genuine formalization target.

Preamble
import Mathlib
import Definitions.Def_HefferonLinAlg_jordan

open Matrix
Formal statement
namespace HefferonLinAlg

theorem jordan_form_exists
    {n : ℕ} (A : Matrix (Fin n) (Fin n) ℂ) : HasJordanForm A := by
  sorry

end HefferonLinAlg
Source
Jim Hefferon, *Linear Algebra*, Saint Michael's College, 2020 printing, Chapter Five, Section IV.2, Theorem 2.8, printed p. 454 (PDF p. 464)
Read-back

What the Lean code literally says, in plain math · claude-opus-5

Read-back: HefferonLinAlg.jordan_form_exists

For every natural number nnn (an implicit argument, so it ranges over all of N\mathbb{N}N including n=0n = 0n=0) and every square matrix AAA of size n×nn \times nn×n with entries in C\mathbb{C}C, indexed by rows and columns drawn from {0,1,…,n−1}\{0, 1, \dots, n-1\}{0,1,…,n−1}, the following holds: there exist

  • a natural number kkk (the number of blocks, with k=0k = 0k=0 allowed a priori),
  • a function s:{0,…,k−1}→Ns : \{0,\dots,k-1\} \to \mathbb{N}s:{0,…,k−1}→N assigning a size sis_isi​ to each block, and
  • a function λ:{0,…,k−1}→C\lambda : \{0,\dots,k-1\} \to \mathbb{C}λ:{0,…,k−1}→C assigning a scalar λi\lambda_iλi​ to each block,

such that both of the following are true.

(a) Every block is nonempty: si>0s_i > 0si​>0 for all i∈{0,…,k−1}i \in \{0,\dots,k-1\}i∈{0,…,k−1}. (Sizes are natural numbers, so this rules out si=0s_i = 0si​=0 and nothing else; the sis_isi​ need not be distinct or ordered, and the λi\lambda_iλi​ need not be distinct either.)

(b) There is a reindexing under which AAA is similar to the corresponding block-diagonal Jordan matrix. Precisely, let

I  =  {(i,a)  :  i∈{0,…,k−1},  a∈{0,…,si−1}}I \;=\; \{(i,a) \;:\; i \in \{0,\dots,k-1\},\; a \in \{0,\dots,s_i-1\}\}I={(i,a):i∈{0,…,k−1},a∈{0,…,si​−1}}

be the disjoint-union index set of the blocks (so ∣I∣=∑isi|I| = \sum_{i} s_i∣I∣=∑i​si​), and let JJJ be the I×II \times II×I matrix over C\mathbb{C}C that is block-diagonal with iii-th diagonal block the si×sis_i \times s_isi​×si​ matrix

Jab(i)  =  {λi,a=b,1,a=b+1,0,otherwise,J^{(i)}_{ab} \;=\; \begin{cases} \lambda_i, & a = b,\\[2pt] 1, & a = b + 1,\\[2pt] 0, & \text{otherwise,} \end{cases}Jab(i)​=⎩⎨⎧​λi​,1,0,​a=b,a=b+1,otherwise,​

i.e. λi\lambda_iλi​ on the diagonal and 111 on the subdiagonal (ones below the diagonal), and J(i,a),(j,b)=0J_{(i,a),(j,b)} = 0J(i,a),(j,b)​=0 whenever i≠ji \neq ji=j. Then the claim is that there exists a bijection

e:{0,…,n−1}  → ∼   Ie : \{0,\dots,n-1\} \;\xrightarrow{\ \sim\ }\; Ie:{0,…,n−1} ∼ ​I

(the existence of such a bijection already forces ∑isi=n\sum_{i} s_i = n∑i​si​=n) such that, writing J~\widetilde{J}J for the n×nn \times nn×n matrix obtained by transporting JJJ along eee, namely J~uv=Je(u), e(v)\widetilde{J}_{uv} = J_{e(u),\,e(v)}Juv​=Je(u),e(v)​, we have that AAA is similar to J~\widetilde{J}J in the following explicit sense: there exists an n×nn \times nn×n matrix PPP over C\mathbb{C}C whose determinant is a unit of C\mathbb{C}C (equivalently, det⁡P≠0\det P \neq 0detP=0, since C\mathbb{C}C is a field) and which satisfies the equation in this exact orientation

P−1AP  =  J~,P^{-1} A P \;=\; \widetilde{J},P−1AP=J,

where P−1P^{-1}P−1 denotes the matrix-inverse operation, which is a total function in this formalization (returning the zero matrix when the determinant is not invertible) but which, under the stated unit-determinant hypothesis, is the genuine two-sided inverse of PPP.

Scope and edge cases. The statement is an existence claim only: it asserts nothing about uniqueness of kkk, of the multiset of pairs (si,λi)(s_i, \lambda_i)(si​,λi​), or of PPP or eee; no ordering, grouping, or distinctness of blocks or eigenvalues is imposed; and the λi\lambda_iλi​ are not independently required to be eigenvalues, roots of the characteristic polynomial, or otherwise related to AAA except through the similarity equation above. The auxiliary notion of the multiset {(si,λi)}\{(s_i, \lambda_i)\}{(si​,λi​)} of block data is defined in the accompanying definitions file but does not appear in this statement. The degenerate case n=0n = 0n=0 is included, where AAA is the empty matrix and the claim is satisfiable with k=0k = 0k=0 (an empty family of blocks, empty index set III, and the empty bijection); the hypothesis-free form of the theorem means there are no assumptions that could be vacuously satisfied — the quantifier over AAA ranges over every complex square matrix of every size. The scalar field is fixed to C\mathbb{C}C in this statement, even though the underlying definitions of similarity, Jordan blocks, and Jordan matrices are stated over an arbitrary commutative ring. The declaration is a theorem whose proof is not supplied in this file.

Human review
  • Endorsed by Shuze Chen · Aug 7, 2026

  • Endorsed by tianyipeng · Aug 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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.

How Prove2Me works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me