Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Kernel dimensions of the powers determine the block counts

Proved
HefferonLinAlg.jordanBlock_count_from_kernel_dims

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

invariantjordan-formkernellinear-algebranilpotent

Let AAA be a square complex matrix with a Jordan form given by block sizes szszsz and eigenvalues λ\lambdaλ, fix a scalar μ\muμ, and write dr=dim⁡ker⁡(A−μI)rd_r = \dim \ker (A - \mu I)^rdr​=dimker(A−μI)r. Then the number of Jordan blocks of size exactly r+1r+1r+1 carrying the eigenvalue μ\muμ satisfies

#{i:szi=r+1, λi=μ}+dr+dr+2  =  2 dr+1.\#\{i : sz_i = r+1,\ \lambda_i = \mu\} + d_r + d_{r+2} \;=\; 2\,d_{r+1}.#{i:szi​=r+1, λi​=μ}+dr​+dr+2​=2dr+1​.

Read as #=2dr+1−dr−dr+2\#= 2d_{r+1} - d_r - d_{r+2}#=2dr+1​−dr​−dr+2​, this is the classical formula recovering the block structure from the kernel dimensions of the powers of A−μIA - \mu IA−μI; it is stated additively here because truncated subtraction on the naturals would silently weaken the claim. Because the right-hand side depends only on AAA and μ\muμ, every Jordan form of AAA must have the same number of blocks of each size and eigenvalue — which is exactly why the Jordan block multiset is an invariant.

Preamble
import Mathlib
import Definitions.Def_HefferonLinAlg_jordan

open Matrix
Formal statement
namespace HefferonLinAlg

theorem jordanBlock_count_from_kernel_dims
    {n k : ℕ} {A : Matrix (Fin n) (Fin n) ℂ} {sz : Fin k → ℕ} {lam : Fin k → ℂ}
    (h : IsJordanFormOf A sz lam) (mu : ℂ) (r : ℕ) :
    (Finset.univ.filter fun i => sz i = r + 1 ∧ lam i = mu).card
        + kerDim A mu r + kerDim A mu (r + 2)
      = 2 * kerDim A mu (r + 1) := by
  sorry

end HefferonLinAlg
Source
Jim Hefferon, *Linear Algebra*, Saint Michael's College, 2020 printing, Chapter Five, Section III.2, Theorem 2.16, printed p. 434 — Hefferon states there that the number and the length of the strings is determined by the transformation; this is the standard kernel-dimension formula that makes that determinacy quantitative
Read-back

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

Read-back: HefferonLinAlg.jordanBlock_count_from_kernel_dims

What the statement asserts

Fix two natural numbers nnn and kkk (both implicit, both allowed to be 000), a square complex matrix

A∈Mn×n(C)A \in M_{n\times n}(\mathbb{C})A∈Mn×n​(C)

indexed by {0,1,…,n−1}\{0,1,\dots,n-1\}{0,1,…,n−1}, a function sz:{0,…,k−1}→N\mathrm{sz} : \{0,\dots,k-1\} \to \mathbb{N}sz:{0,…,k−1}→N assigning a natural number size to each of kkk indices, and a function λ:{0,…,k−1}→C\lambda : \{0,\dots,k-1\} \to \mathbb{C}λ:{0,…,k−1}→C assigning a complex number to each of those same kkk indices. Assume the hypothesis hhh, spelled out below, that (sz,λ)(\mathrm{sz}, \lambda)(sz,λ) is a Jordan form of AAA. Then the claim is: for every complex number μ\muμ and every natural number rrr,

#{ i∈{0,…,k−1}  :  sz(i)=r+1  and  λ(i)=μ }  +  d(μ,r)  +  d(μ,r+2)  =  2 d(μ,r+1),\#\bigl\{\, i \in \{0,\dots,k-1\} \;:\; \mathrm{sz}(i) = r+1 \ \text{ and } \ \lambda(i) = \mu \,\bigr\} \;+\; d(\mu, r) \;+\; d(\mu, r+2) \;=\; 2\, d(\mu, r+1),#{i∈{0,…,k−1}:sz(i)=r+1  and  λ(i)=μ}+d(μ,r)+d(μ,r+2)=2d(μ,r+1),

where d(μ,s)d(\mu, s)d(μ,s) abbreviates the quantity kerDim⁡(A,μ,s)\operatorname{kerDim}(A,\mu,s)kerDim(A,μ,s) defined below. Both μ\muμ and rrr are quantified inside the statement (they are explicit arguments), so a single instance of the theorem covers all of them; nnn, kkk, AAA, sz\mathrm{sz}sz, λ\lambdaλ are quantified outside as implicit arguments.

Unfolding every notion the statement depends on

The kernel dimension d(μ,s)=kerDim⁡(A,μ,s)d(\mu,s) = \operatorname{kerDim}(A,\mu,s)d(μ,s)=kerDim(A,μ,s)

For a matrix AAA over a field KKK (here K=CK = \mathbb{C}K=C), a scalar μ\muμ, and a natural number sss,

d(μ,s)  =  dim⁡Cker⁡(x↦(A−μI)s x),d(\mu,s) \;=\; \dim_{\mathbb{C}} \ker\Bigl( x \mapsto (A - \mu I)^{s}\, x \Bigr),d(μ,s)=dimC​ker(x↦(A−μI)sx),

i.e. the C\mathbb{C}C-dimension (as a natural number, via Module.finrank) of the kernel of the linear map on the coordinate space Cn\mathbb{C}^{n}Cn given by left multiplication by the matrix power (A−μI)s(A - \mu I)^{s}(A−μI)s. Here μI\mu IμI is the scalar μ\muμ acting on the identity matrix, and the power is matrix power with the standard convention (A−μI)0=I(A-\mu I)^{0} = I(A−μI)0=I; consequently d(μ,0)=dim⁡ker⁡(id)=0d(\mu, 0) = \dim \ker(\mathrm{id}) = 0d(μ,0)=dimker(id)=0 for every μ\muμ.

The hypothesis hhh: "(sz,λ)(\mathrm{sz},\lambda)(sz,λ) is a Jordan form of AAA"

This is the conjunction of two conditions.

  1. Every block is nonempty: sz(i)>0\mathrm{sz}(i) > 0sz(i)>0 for all i∈{0,…,k−1}i \in \{0,\dots,k-1\}i∈{0,…,k−1}.

  2. There exists a re-indexing bijection

e:{0,…,n−1}  → ∼   ∐i=0k−1{0,…,sz(i)−1}e : \{0,\dots,n-1\} \;\xrightarrow{\ \sim\ }\; \coprod_{i=0}^{k-1} \{0,\dots,\mathrm{sz}(i)-1\}e:{0,…,n−1} ∼ ​i=0∐k−1​{0,…,sz(i)−1}

(a bijection between the index set of AAA and the disjoint union of the block index sets — its mere existence forces n=∑isz(i)n = \sum_{i} \mathrm{sz}(i)n=∑i​sz(i)), such that AAA is similar to the matrix JeJ^{e}Je obtained by transporting the block-diagonal Jordan matrix JJJ along eee, i.e. the n×nn \times nn×n matrix with entries Jabe=J e(a) e(b)J^{e}_{a b} = J_{\,e(a)\, e(b)}Jabe​=Je(a)e(b)​.

Here:

  • The Jordan matrix J=jordanMatrix⁡(sz,λ)J = \operatorname{jordanMatrix}(\mathrm{sz},\lambda)J=jordanMatrix(sz,λ) is the block-diagonal matrix, indexed by pairs (i,a)(i, a)(i,a) with i∈{0,…,k−1}i \in \{0,\dots,k-1\}i∈{0,…,k−1} and a∈{0,…,sz(i)−1}a \in \{0,\dots,\mathrm{sz}(i)-1\}a∈{0,…,sz(i)−1}, whose iii-th diagonal block is the sz(i)×sz(i)\mathrm{sz}(i) \times \mathrm{sz}(i)sz(i)×sz(i) Jordan block with eigenvalue λ(i)\lambda(i)λ(i), and whose off-diagonal blocks are zero: J(i,a),(j,b)=0J_{(i,a),(j,b)} = 0J(i,a),(j,b)​=0 whenever i≠ji \neq ji=j.

  • The Jordan block jordanBlock⁡(m,c)\operatorname{jordanBlock}(m, c)jordanBlock(m,c) is the m×mm \times mm×m matrix whose (p,q)(p,q)(p,q) entry is

{cif p=q,1if p=q+1,0otherwise,\begin{cases} c & \text{if } p = q,\\ 1 & \text{if } p = q+1,\\ 0 & \text{otherwise,} \end{cases}⎩⎨⎧​c10​if p=q,if p=q+1,otherwise,​

so the ones sit on the subdiagonal (below the diagonal), not the superdiagonal.

  • Similarity of two square matrices X,YX, YX,Y over a commutative ring means: there exists a matrix PPP of the same shape whose determinant is a unit (over C\mathbb{C}C: det⁡P≠0\det P \neq 0detP=0) with
P−1XP=Y,P^{-1} X P = Y,P−1XP=Y,

where P−1P^{-1}P−1 is the standard total inverse operation (well-behaved here because det⁡P\det PdetP is assumed invertible). Note the direction: the hypothesis says P−1AP=JeP^{-1} A P = J^{e}P−1AP=Je, i.e. AAA is conjugated into the Jordan matrix.

Arithmetic and typing notes

  • The counted quantity #{ i:sz(i)=r+1 and λ(i)=μ }\#\{\, i : \mathrm{sz}(i) = r+1 \text{ and } \lambda(i) = \mu \,\}#{i:sz(i)=r+1 and λ(i)=μ} is the cardinality of a subset of the finite index set {0,…,k−1}\{0,\dots,k-1\}{0,…,k−1} — a count of block indices, not of blocks weighted by size. The condition is an exact equality sz(i)=r+1\mathrm{sz}(i) = r+1sz(i)=r+1 of natural numbers together with an exact equality λ(i)=μ\lambda(i) = \muλ(i)=μ of complex numbers.
  • Every quantity in the displayed equation is a natural number, and the equation is an equality in N\mathbb{N}N: the block count, the three kernel dimensions, the two additions, and the multiplication by 222. No subtraction occurs anywhere in the statement, so no truncated-natural-subtraction behaviour is in play. The equation is written in the "all terms on the correct side" form
count+d(μ,r)+d(μ,r+2)=2 d(μ,r+1)\text{count} + d(\mu,r) + d(\mu,r+2) = 2\,d(\mu,r+1)count+d(μ,r)+d(μ,r+2)=2d(μ,r+1)

rather than as a difference.

  • The indices rrr, r+1r+1r+1, r+2r+2r+2 are all natural numbers; the smallest instance is r=0r = 0r=0, which reads
#{ i:sz(i)=1 and λ(i)=μ }+0+d(μ,2)=2 d(μ,1),\#\{\, i : \mathrm{sz}(i) = 1 \text{ and } \lambda(i) = \mu \,\} + 0 + d(\mu,2) = 2\,d(\mu,1),#{i:sz(i)=1 and λ(i)=μ}+0+d(μ,2)=2d(μ,1),

since d(μ,0)=0d(\mu,0) = 0d(μ,0)=0 as noted above.

  • μ\muμ ranges over all of C\mathbb{C}C; nothing requires μ\muμ to be an eigenvalue of AAA or to appear among the values λ(i)\lambda(i)λ(i). For such a μ\muμ all three kernel dimensions and the count are 000.

Degenerate cases silently included

  • k=0k = 0k=0: the index set of blocks is empty, so the nonemptiness condition sz(i)>0\mathrm{sz}(i) > 0sz(i)>0 holds vacuously, the disjoint union is empty, and the existence of the bijection eee forces n=0n = 0n=0. Then AAA is the empty 0×00 \times 00×0 matrix, the count is 000, all kernel dimensions are 000, and the equation reads 0+0+0=2⋅00 + 0 + 0 = 2\cdot 00+0+0=2⋅0.
  • n=0n = 0n=0: the underlying space is the zero space, so every kernel dimension is 000.
  • The hypothesis hhh is not satisfiable for arbitrary combinations of the implicit data — for instance, whenever n≠∑isz(i)n \neq \sum_i \mathrm{sz}(i)n=∑i​sz(i), or whenever AAA is not similar to the indicated block-diagonal matrix, no such eee and PPP exist, and the theorem says nothing about those instances.
  • The conclusion is stated about kernel dimensions of AAA itself, not of the Jordan matrix JJJ; the link between them is carried entirely by the hypothesis hhh.
  • Nothing in the statement requires the eigenvalues λ(i)\lambda(i)λ(i) to be distinct across blocks, nor the sizes sz(i)\mathrm{sz}(i)sz(i) to be sorted or distinct; repeated (sz(i),λ(i))(\mathrm{sz}(i), \lambda(i))(sz(i),λ(i)) pairs are allowed and each contributes separately to the count.

Proof status

The declaration's proof body is sorry: no proof is supplied.

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