Change of basis is similarity
ProvedHefferonLinAlg.change_of_basis_gives_similar_matricesLet be a linear transformation of an -dimensional vector space over a field , and let and be bases of . Then there is an invertible matrix with : the two matrices representing the same transformation with respect to different bases are similar. This is the hinge of the book — it turns the search for a canonical form for similarity into the search for the basis in which a map looks simplest, which is the whole programme of Chapter Five.
import Mathlib open Matrix
namespace HefferonLinAlg
theorem change_of_basis_gives_similar_matrices
{K : Type*} [Field K] {n : ℕ} {V : Type*} [AddCommGroup V] [Module K V]
(B C : Module.Basis (Fin n) K V) (t : V →ₗ[K] V) :
∃ P : Matrix (Fin n) (Fin n) K, IsUnit P.det ∧
LinearMap.toMatrix C C t = P⁻¹ * LinearMap.toMatrix B B t * P := by
sorry
end HefferonLinAlgRead-back
What the Lean code literally says, in plain math · claude-opus-5
Read-back: HefferonLinAlg.change_of_basis_gives_similar_matrices
The declaration asserts the following, for every choice of the data below (all of , , are implicit arguments, , , explicit; nothing is fixed in advance):
- an arbitrary field (no assumption of characteristic, cardinality, or algebraic closure — finite fields and are included);
- an arbitrary natural number , including ;
- an arbitrary type carrying the structure of an additive commutative group together with a -module structure (over a field this is a -vector space; no finite-dimensionality hypothesis is imposed separately);
- two bases and of over , both indexed by the finite index set — the existence of such a basis is itself a hypothesis, and it forces ; the two bases are unconstrained relative to each other and may be equal, or reorderings/rescalings of each other;
- an arbitrary -linear map from to itself (an endomorphism; the same space on both sides, with no injectivity, surjectivity, or invertibility assumed — is allowed).
Under exactly these hypotheses, the claim is a pure existence statement (not uniqueness, and with no formula, construction, or characterization of the witness given):
Here the notation must be unfolded carefully. denotes the matrix over representing with respect to the basis used simultaneously as the basis of the source and of the target — i.e. the matrix whose entry is the -th coordinate of in the basis , so that ; likewise uses the basis on both sides. No mixed-basis matrix appears anywhere in the statement. The condition " is a unit" is stated as invertibility of in the ring ; since is a field this is equivalent to , hence to being an invertible matrix. The symbol is the total matrix-inverse operation (defined for every square matrix, returning the zero matrix when the determinant is not invertible), but under the accompanying unit hypothesis it is the genuine two-sided inverse of . The order and placement of the factors is exactly as written: the -matrix equals on the left, the -matrix in the middle, and on the right — the statement does not assert the reversed conjugation , nor does it assert that is (or is related in any specified way to) the change-of-basis matrix between and ; any invertible realizing the displayed equality suffices. Degenerate case: when , is the zero module, all matrices are the empty matrix, , and the equality holds trivially, so the statement carries no content in that instance. The declaration is a single implication from the listed hypotheses to this existential conclusion; it makes no claim in the converse direction (it does not say that similarity of two matrices implies they represent a common in two bases), and it does not claim that every invertible works.
Confirmed by the mission captain (proposal self-audit).