Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Dimension characterizes isomorphism

Proved
HefferonLinAlg.dimension_characterizes_isomorphism

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

dimensionisomorphismlinear-algebra

Two finite-dimensional vector spaces VVV and WWW over the same field KKK 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.

Preamble
import Mathlib

open Matrix
Formal statement
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 HefferonLinAlg
Source
Jim Hefferon, *Linear Algebra*, Saint Michael's College, 2020 printing, Chapter Three, Section I.2, Theorem 2.3, p. 194
Read-back

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

For every field KKK and every pair of types VVV and WWW (in arbitrary universes) that are each equipped with the structure of an additive commutative group together with a KKK-module structure, and each assumed to be finite-dimensional over KKK — all of these being instance-level assumptions supplied implicitly, with the same field KKK acting on both VVV and WWW — the statement asserts the following biconditional (an "if and only if", not a one-directional implication):

(there exists at least one K-linear isomorphism V→ ∼ W)  ⟺  dim⁡KV=dim⁡KW.\bigl(\text{there exists at least one } K\text{-linear isomorphism } V \xrightarrow{\ \sim\ } W\bigr) \iff \dim_K V = \dim_K W .(there exists at least one K-linear isomorphism V ∼ ​W)⟺dimK​V=dimK​W.

Here the left-hand side is the assertion that the type of KKK-linear equivalences from VVV to WWW — i.e. KKK-linear maps f:V→Wf : V \to Wf:V→W that are bijective, with a specified two-sided inverse that is itself KKK-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: dim⁡KV\dim_K VdimK​V and dim⁡KW\dim_K WdimK​W 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 000 for an infinite-dimensional space is not in play here, since both spaces are assumed finite-dimensional; note, however, that 000 remains the genuine value in the degenerate case where VVV or WWW is the zero module). The quantification silently includes all degenerate cases: VVV and/or WWW may be the trivial module {0}\{0\}{0}, in which case the right-hand side reads 0=00 = 00=0 and the left-hand side is witnessed by the zero map; VVV and WWW may be the same space, or literally the same type; and KKK may be any field whatsoever, including finite fields and fields of positive characteristic. No hypothesis relates VVV and WWW beyond their sharing the scalar field KKK and both being finite-dimensional, and every stated hypothesis is satisfiable (e.g. V=W=KV = W = KV=W=K), 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.

Human review
  • Endorsed by Shuze Chen · Aug 5, 2026

  • Endorsed by tianyipeng · Aug 5, 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