Lemma 3.34 — a matrix has a logarithm iff det ≠ 0; real logarithms
ProvedTeschlODE.Linear.matrix_logarithmA logarithm of a square matrix is a matrix with (3.200). Lemma 3.34 makes three claims:
- A (complex) matrix has a logarithm if and only if .
- If and every real eigenvalue of is positive, then has a real logarithm .
- If (with ), then has a real logarithm.
Claim 1 is what turns the monodromy matrix of a periodic system into in Floquet's theorem; claims 2–3 give the real version, Corollary 3.16.
Formalization Note. is Mathlib's NormedSpace.exp on Matrix (Fin n) (Fin n) 𝕂. "Real eigenvalue of " is Module.End.HasEigenvalue (Matrix.toLin' A) μ for , which for a real matrix is the same as being a real root of its characteristic polynomial. In claim 3 the hypothesis is added: the book states claim 3 inside the paragraph that begins "Hence suppose that " (p. 108), and without it the claim is false (, where has no logarithm).
import Mathlib
namespace TeschlODE.Linear
/-- Teschl, Lemma 3.34 (p. 108), all three claims. A logarithm of `A` is a matrix `B` with
`exp(B) = A` (3.200). (1) A complex matrix has a logarithm iff `det A ≠ 0`. (2) A real matrix
all of whose real eigenvalues are positive has a real logarithm. (3) For a real matrix `A`
(with `det A ≠ 0`, the standing assumption of the paragraph (3.200)–(3.202)), `A²` has a real
logarithm. -/
theorem matrix_logarithm (n : ℕ) :
(∀ A : Matrix (Fin n) (Fin n) ℂ,
(∃ B : Matrix (Fin n) (Fin n) ℂ, NormedSpace.exp B = A) ↔ A.det ≠ 0) ∧
(∀ A : Matrix (Fin n) (Fin n) ℝ,
(∀ μ : ℝ, Module.End.HasEigenvalue (Matrix.toLin' A) μ → 0 < μ) →
∃ B : Matrix (Fin n) (Fin n) ℝ, NormedSpace.exp B = A) ∧
(∀ A : Matrix (Fin n) (Fin n) ℝ, A.det ≠ 0 →
∃ B : Matrix (Fin n) (Fin n) ℝ, NormedSpace.exp B = A * A) := by sorry
end TeschlODE.Linear
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix a natural number . Throughout, denotes the matrix exponential given by the power series
taken in complex matrices or in real matrices, according to where lives.
Claim. Three statements hold together.
(1) Complex matrices. For every complex matrix :
(2) Real matrices with positive real eigenvalues. Let be a real matrix, and suppose every real number that is an eigenvalue of satisfies . Here "eigenvalue" means that for some nonzero . Then there exists a real matrix with .
- The hypothesis constrains only real eigenvalues; non-real complex eigenvalues are unrestricted.
- In particular, the hypothesis excludes as an eigenvalue.
- No other invertibility assumption is stated.
(3) Squares of invertible real matrices. For every real matrix with , there exists a real matrix with .
Degenerate cases.
- : there is only one matrix, the empty one, whose determinant is . Its exponential is itself, so all three parts hold trivially.
- :
- Part (1) says that a complex number equals for some complex exactly when .
- Part (2) says that a real equals for some real . If , then itself is a real eigenvalue that is not positive, so the hypothesis fails and nothing is claimed.
- Part (3) says that for some real whenever .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.