Dimension characterizes isomorphism
ProvedHefferonLinAlg.dimension_characterizes_isomorphismTwo finite-dimensional vector spaces and over the same field are isomorphic if and only if they have the same dimension. Finite-dimensional vector spaces are therefore classified up to isomorphism by a single natural number; everything else about such a space is structure carried on top of its dimension.
import Mathlib open Matrix
namespace HefferonLinAlg
theorem dimension_characterizes_isomorphism
{K V W : Type*} [Field K]
[AddCommGroup V] [Module K V] [FiniteDimensional K V]
[AddCommGroup W] [Module K W] [FiniteDimensional K W] :
Nonempty (V ≃ₗ[K] W) ↔ Module.finrank K V = Module.finrank K W := by
sorry
end HefferonLinAlgRead-back
What the Lean code literally says, in plain math · claude-opus-5
For every field and every pair of types and (in arbitrary universes) that are each equipped with the structure of an additive commutative group together with a -module structure, and each assumed to be finite-dimensional over — all of these being instance-level assumptions supplied implicitly, with the same field acting on both and — the statement asserts the following biconditional (an "if and only if", not a one-directional implication):
Here the left-hand side is the assertion that the type of -linear equivalences from to — i.e. -linear maps that are bijective, with a specified two-sided inverse that is itself -linear — is inhabited; it is a bare existence claim ("the collection of such isomorphisms is nonempty"), with no uniqueness, no canonicity, and no particular isomorphism named or constructed. The right-hand side is an equality of natural numbers: and denote Mathlib's Module.finrank, the rank of the module as a natural number, and under the standing finite-dimensionality hypotheses these coincide with the ordinary dimensions (the convention by which finrank returns for an infinite-dimensional space is not in play here, since both spaces are assumed finite-dimensional; note, however, that remains the genuine value in the degenerate case where or is the zero module). The quantification silently includes all degenerate cases: and/or may be the trivial module , in which case the right-hand side reads and the left-hand side is witnessed by the zero map; and may be the same space, or literally the same type; and may be any field whatsoever, including finite fields and fields of positive characteristic. No hypothesis relates and beyond their sharing the scalar field and both being finite-dimensional, and every stated hypothesis is satisfiable (e.g. ), so the statement is not vacuous. Nothing is asserted about bases, matrices, or coordinates, and no explicit universally quantified term-level variables appear — the only variables are the two module types, the field, and their structural instances. The declaration is stated inside a namespace and its proof is left unfilled (sorry), so the file asserts the biconditional as a claim without supplying a proof of it.
Confirmed by the mission captain (proposal self-audit).