The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.LinearAlgebra.InvariantBasisNumber

27 declarations and 1 deprecated aliases. Mathlib docs · Source

Invariant basis number property

Main definitions

Let R be a (not necessary commutative) ring.

  • InvariantBasisNumber R is a type class stating that (Fin n → R) ≃ₗ[R] (Fin m → R) implies n = m, a property known as the invariant basis number property.

    This assumption implies that there is a well-defined notion of the rank of a finitely generated free (left) R-module.

It is also useful to consider the following stronger conditions:

  • The rank condition, witnessed by the type class RankCondition R, states that the existence of a surjective linear map (Fin n → R) →ₗ[R] (Fin m → R) implies m ≤ n.

  • The strong rank condition, witnessed by the type class StrongRankCondition R, states that the existence of an injective linear map (Fin n → R) →ₗ[R] (Fin m → R) implies n ≤ m.

  • OrzechProperty R, defined in Mathlib/RingTheory/OrzechProperty.lean, states that for any finitely generated R-module M, any surjective homomorphism f : N → M from a submodule N of M to M is injective.

Instances

  • IsNoetherianRing.orzechProperty (defined in Mathlib/RingTheory/Noetherian/Orzech.lean) : any left-Noetherian ring satisfies the Orzech property. This applies in particular to division rings.

  • strongRankCondition_of_orzechProperty : the Orzech property implies the strong rank condition (for non-trivial rings).

  • IsNoetherianRing.strongRankCondition : every nontrivial left-Noetherian ring satisfies the strong rank condition (and so in particular every division ring or field).

  • rankCondition_of_strongRankCondition : the strong rank condition implies the rank condition.

  • invariantBasisNumber_of_rankCondition : the rank condition implies the invariant basis number property.

  • invariantBasisNumber_of_nontrivial_of_commRing: a nontrivial commutative ring satisfies the invariant basis number property.

More generally, every commutative ring satisfies the Orzech property, hence the strong rank condition, which is proved in Mathlib/RingTheory/FiniteType.lean. We keep invariantBasisNumber_of_nontrivial_of_commRing here since it imports fewer files.

Counterexamples to converse results

The following examples can be found in the book of Lam [lam_1999] (see also https://math.stackexchange.com/questions/4711904):

  • Let k be a field, then the free (non-commutative) algebra k⟨x, y⟩ satisfies the rank condition but not the strong rank condition.
  • The free (non-commutative) algebra ℚ⟨a, b, c, d⟩ quotient by the two-sided ideal (ac − 1, bd − 1, ab, cd) satisfies the invariant basis number property but not the rank condition.

TODO

So far, there is no API at all for the InvariantBasisNumber class. There are several natural ways to formulate that a module M is finitely generated and free, for example M ≃ₗ[R] (Fin n → R), M ≃ₗ[R] (ι → R), where ι is a fintype, or providing a basis indexed by a finite type. There should be lemmas applying the invariant basis number property to each situation.

The finite version of the invariant basis number property implies the infinite analogue, i.e., that (ι →₀ R) ≃ₗ[R] (ι' →₀ R) implies that Cardinal.mk ι = Cardinal.mk ι'. This fact (and its variants) should be formalized.

References

  • https://en.wikipedia.org/wiki/Invariant_basis_number
  • https://mathoverflow.net/a/2574/
  • [Lam, T. Y. Lectures on Modules and Rings][lam_1999]
  • [Orzech, Morris. Onto endomorphisms are isomorphisms][orzech1971]
  • [Djoković, D. Ž. Epimorphisms of modules which must be isomorphisms][djokovic1973]
  • [Ribenboim, Paulo. Épimorphismes de modules qui sont nécessairement des isomorphismes][ribenboim1971]

Tags

free module, rank, Orzech property, (strong) rank condition, invariant basis number, IBN

We want to show that nontrivial commutative rings have invariant basis number. The idea is to take a maximal ideal I of R and use an isomorphism R^n ≃ R^m of R modules to produce an isomorphism (R/I)^n ≃ (R/I)^m of R/I-modules, which will imply n = m since R/I is a field and we know that fields have invariant basis number.

We construct the isomorphism in two steps:

  1. We construct the ring R^n/I^n, show that it is an R/I-module and show that there is an isomorphism of R/I-modules R^n/I^n ≃ (R/I)^n. This isomorphism is called Ideal.piQuotEquiv and is located in the file Mathlib/RingTheory/Ideal/Quotient/Basic.lean.
  2. We construct an isomorphism of R/I-modules R^n/I^n ≃ R^m/I^m using the isomorphism R^n ≃ R^m.

class StrongRankCondition E3 #

(R : Type u) → [Semiring R] → Prop

We say that R satisfies the strong rank condition if (Fin n → R) →ₗ[R] (Fin m → R) injective implies n ≤ m.

theorem strongRankCondition_iff E0 #

∀ (R : Type u) [inst : Semiring R],
  StrongRankCondition R ↔ ∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Function.Injective ⇑f → n ≤ m

ctor StrongRankCondition.mk E0 #

∀ {R : Type u} [inst : Semiring R],
  (∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Function.Injective ⇑f → n ≤ m) → StrongRankCondition R

theorem StrongRankCondition.le_of_fin_injective E1 #

∀ {R : Type u} {inst : Semiring R} [self : StrongRankCondition R] {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R),
  Function.Injective ⇑f → n ≤ m

Any injective linear map from Rⁿ to Rᵐ guarantees n ≤ m.

theorem le_of_fin_injective E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R),
  Function.Injective ⇑f → n ≤ m

theorem strongRankCondition_iff_succ E1 #

∀ (R : Type u) [inst : Semiring R],
  StrongRankCondition R ↔ ∀ (n : ℕ) (f : (Fin (n + 1) → R) →ₗ[R] Fin n → R), ¬Function.Injective ⇑f

A ring satisfies the strong rank condition if and only if, for all n : ℕ, any linear map (Fin (n + 1) → R) →ₗ[R] (Fin n → R) is not injective.

instance strongRankCondition_of_orzechProperty E0 #

∀ (R : Type u) [inst : Semiring R] [Nontrivial R] [OrzechProperty R], StrongRankCondition R

Any nontrivial ring satisfying Orzech property also satisfies strong rank condition.

theorem card_le_of_injective E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {α : Type u_1} {β : Type u_2} [inst_2 : Fintype α]
  [inst_3 : Fintype β] (f : (α → R) →ₗ[R] β → R), Function.Injective ⇑f → Fintype.card α ≤ Fintype.card β

theorem card_le_of_injective' E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {α : Type u_1} {β : Type u_2} [inst_2 : Fintype α]
  [inst_3 : Fintype β] (f : (α →₀ R) →ₗ[R] β →₀ R), Function.Injective ⇑f → Fintype.card α ≤ Fintype.card β

class RankCondition E1 #

(R : Type u) → [Semiring R] → Prop

We say that R satisfies the rank condition if (Fin n → R) →ₗ[R] (Fin m → R) surjective implies m ≤ n.

theorem rankCondition_iff E0 #

∀ (R : Type u) [inst : Semiring R],
  RankCondition R ↔ ∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Function.Surjective ⇑f → m ≤ n

ctor RankCondition.mk E0 #

∀ {R : Type u} [inst : Semiring R],
  (∀ {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R), Function.Surjective ⇑f → m ≤ n) → RankCondition R

theorem RankCondition.le_of_fin_surjective E1 #

∀ {R : Type u} {inst : Semiring R} [self : RankCondition R] {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R),
  Function.Surjective ⇑f → m ≤ n

Any surjective linear map from Rⁿ to Rᵐ guarantees m ≤ n.

theorem le_of_fin_surjective E1 #

∀ (R : Type u) [inst : Semiring R] [RankCondition R] {n m : ℕ} (f : (Fin n → R) →ₗ[R] Fin m → R),
  Function.Surjective ⇑f → m ≤ n

theorem card_le_of_surjective E1 #

∀ (R : Type u) [inst : Semiring R] [RankCondition R] {α : Type u_1} {β : Type u_2} [inst_2 : Fintype α]
  [inst_3 : Fintype β] (f : (α → R) →ₗ[R] β → R), Function.Surjective ⇑f → Fintype.card β ≤ Fintype.card α

theorem card_le_of_surjective' E1 #

∀ (R : Type u) [inst : Semiring R] [RankCondition R] {α : Type u_1} {β : Type u_2} [inst_2 : Fintype α]
  [inst_3 : Fintype β] (f : (α →₀ R) →ₗ[R] β →₀ R), Function.Surjective ⇑f → Fintype.card β ≤ Fintype.card α

theorem Module.Finite.exists_nat_not_surjective E1 #

∀ (R : Type u) [inst : Semiring R] [RankCondition R] (M : Type u_1) [inst_2 : AddCommMonoid M] [inst_3 : Module R M]
  [Module.Finite R M], ∃ n, ∀ (f : M →ₗ[R] Fin n → R), ¬Function.Surjective ⇑f

instance rankCondition_of_strongRankCondition E0 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R], RankCondition R

By the universal property for free modules, any surjective map (Fin n → R) →ₗ[R] (Fin m → R) has an injective splitting (Fin m → R) →ₗ[R] (Fin n → R) from which the strong rank condition gives the necessary inequality for the rank condition.

class InvariantBasisNumber E1 #

(R : Type u) → [Semiring R] → Prop

We say that R has the invariant basis number property if (Fin n → R) ≃ₗ[R] (Fin m → R) implies n = m. This gives rise to a well-defined notion of rank of a finitely generated free module.

ctor InvariantBasisNumber.mk E0 #

∀ {R : Type u} [inst : Semiring R], (∀ {n m : ℕ} (a : (Fin n → R) ≃ₗ[R] Fin m → R), n = m) → InvariantBasisNumber R

theorem invariantBasisNumber_iff E0 #

∀ (R : Type u) [inst : Semiring R], InvariantBasisNumber R ↔ ∀ {n m : ℕ} (a : (Fin n → R) ≃ₗ[R] Fin m → R), n = m

instance invariantBasisNumber_of_rankCondition E0 #

∀ (R : Type u) [inst : Semiring R] [RankCondition R], InvariantBasisNumber R

theorem strongRankCondition_iff_forall_not_injective E1 #

∀ (R : Type u) [inst : Semiring R],
  StrongRankCondition R ↔ ∀ (n : ℕ) (f : (ℕ →₀ R) →ₗ[R] Fin n → R), ¬Function.Injective ⇑f

A semiring R satisfies the strong rank condition, iff we cannot embed R^(ℕ) in some Rⁿ.

theorem card_eq_of_linearEquiv E1 #

∀ (R : Type u) [inst : Semiring R] [InvariantBasisNumber R] {α : Type u_1} {β : Type u_2} [inst_2 : Fintype α]
  [inst_3 : Fintype β] (f : (α → R) ≃ₗ[R] β → R), Fintype.card α = Fintype.card β

instance instNontrivial E0 #

∀ (R : Type u) [inst : Semiring R] [InvariantBasisNumber R], Nontrivial R

instance IsNoetherianRing.strongRankCondition E0 #

∀ (R : Type u) [inst : Ring R] [Nontrivial R] [IsNoetherianRing R], StrongRankCondition R

Any nontrivial Noetherian ring satisfies the strong rank condition, since it satisfies Orzech property.

instance invariantBasisNumber_of_nontrivial_of_commRing E0 #

∀ {R : Type u} [inst : CommRing R] [Nontrivial R], InvariantBasisNumber R

Nontrivial commutative rings satisfy the invariant basis number property.

There are two stronger results in mathlib:

  1. CommRing.orzechProperty in Mathlib.RingTheory.FiniteType, which says that any commutative ring satisfies the Orzech property, and hence (by strongRankCondition_of_orzechProperty) that nontrivial commutative rings satisfy the strong rank condition. A shortcut instance commRing_strongRankCondition is also provided.
  2. rankCondition_of_nontrivial_of_commSemiring in Mathlib.LinearAlgebra.Matrix.InvariantBasisNumber, which says that any nontrivial commutative semiring satisfies the rank condition.

We prove this instance here anyway to reduce the required imports.

Deprecated aliases

NameNew nameSince
nontrivial_of_invariantBasisNumber2026-10-08