Skip to content

Triangularize matrices over an algebraically closed field - #410

Merged
PerAlexandersson merged 2 commits into
mainfrom
proof/triangularize
Aug 21, 2026
Merged

Triangularize matrices over an algebraically closed field#410
PerAlexandersson merged 2 commits into
mainfrom
proof/triangularize

Conversation

@PerAlexandersson

Copy link
Copy Markdown
Owner

The missing keystone for #405 item 3 (and, downstream, #394).

New file RealRooted/Mathlib/LinearAlgebra/Matrix/Triangularize.lean:

  • Matrix.exists_mulVec_eq_smul: a matrix over an algebraically closed field
    has an eigenvector — charpoly root → singular pencil (spectrum.mem_iff +
    isUnit_iff_isUnit_det) → kernel vector (exists_mulVec_eq_zero_iff);
  • Matrix.exists_unitsConj_blockTriangular: every square matrix over an
    algebraically closed field is conjugate to an upper triangular matrix
    ,
    with the triangular shape witnessed by an injective height function
    b : m → ℕ — index-type agnostic, no linear order needed.

Proof: classical induction on Fintype.card. Conjugating by
1.updateCol i₀ v (invertible: its determinant is v i₀ via cramer_one)
clears the eigencolumn; Equiv.sumCompl splits the index type; the complement
block recurses; all bookkeeping is fromBlocks algebra + submatrix_mul_equiv.

Mathlib has no matrix-level triangularization (Eigenspace/Triangularizable
stops at flags of invariant subspaces), so the file mirrors the Mathlib tree
for upstreaming.

Together with #409 (charpoly_compound_of_blockTriangular,
charpoly_compound_conj) this makes #405 item 3 a pure assembly step:
triangularize, take compounds, read off the diagonal.

Sorry-free, no warnings.

🤖 Generated with Claude Code

PerAlexandersson and others added 2 commits August 21, 2026 16:36
Adds RealRooted/Mathlib/LinearAlgebra/Matrix/Triangularize.lean:

- `Matrix.exists_mulVec_eq_smul`: a matrix over an algebraically closed field
  has an eigenvector (charpoly root -> singular pencil -> kernel vector);
- `Matrix.exists_unitsConj_blockTriangular`: every square matrix over an
  algebraically closed field is conjugate to an upper triangular matrix, the
  triangular shape witnessed by an injective height function `b : m -> N`, so
  no linear order on the index type is required.

The induction conjugates by `1.updateCol i0 v` (invertible since its
determinant is `v i0`, via `cramer_one`) to clear the eigencolumn, then splits
the index type with `Equiv.sumCompl` and recurses on the complement block; all
block bookkeeping is `Matrix.fromBlocks` algebra plus `submatrix_mul_equiv`.

This is the missing keystone for the compound eigenvalue theorem (#405 item 3)
and, downstream, Gantmacher-Krein (#394).  Mathlib currently has no
matrix-level triangularization; the file mirrors the Mathlib tree for
upstreaming.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant