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.FreeModule.Basic

29 declarations. Mathlib docs · Source

Free modules

We introduce a class Module.Free R M, for R a Semiring and M an R-module and we provide several basic instances for this class.

Use Finsupp.linearCombination_id_surjective to prove that any module is the quotient of a free module.

Main definition

  • Module.Free R M : the class of free R-modules.

theorem Module.End.smulLeft.congr_simp E1 #

∀ {R : Type u_1} {M : Type u_4} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (α α_1 : R)
  (e_α : α = α_1) (hα : α ∈ Set.center R), Module.End.smulLeft α hα = Module.End.smulLeft α_1 ⋯

theorem RingHomInvPair.toRingEquiv.congr_simp E1 #

∀ {R₁ : Type u_1} {R₂ : Type u_2} [inst : Semiring R₁] [inst_1 : Semiring R₂] (σ σ_1 : R₁ →+* R₂) (e_σ : σ = σ_1)
  (σ' σ'_1 : R₂ →+* R₁) (e_σ' : σ' = σ'_1) [inst_2 : RingHomInvPair σ σ'],
  RingHomInvPair.toRingEquiv σ σ' = RingHomInvPair.toRingEquiv σ_1 σ'_1

class Module.Free E1 #

(R : Type u) → (M : Type v) → [inst : Semiring R] → [inst_1 : AddCommMonoid M] → [Module R M] → Prop

Module.Free R M is the statement that the R-module M is free.

ctor Module.Free.mk E0 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Nonempty ((I : Type v) × Module.Basis I R M) → Module.Free R M

theorem Module.Free.exists_basis E1 #

∀ (R : Type u) (M : Type v) {inst : Semiring R} {inst_1 : AddCommMonoid M} {inst_2 : Module R M}
  [self : Module.Free R M], Nonempty ((I : Type v) × Module.Basis I R M)

theorem Module.Free.exists_set E1 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M],
  ∃ S, Nonempty (Module.Basis (↑S) R M)

theorem Module.free_iff_set E1 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Module.Free R M ↔ ∃ S, Nonempty (Module.Basis (↑S) R M)

theorem Module.free_def E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Small.{w, v} M],
  Module.Free R M ↔ ∃ I, Nonempty (Module.Basis I R M)

If M fits in universe w, then freeness is equivalent to existence of a basis in that universe.

Note that if M does not fit in w, the reverse direction of this implication is still true as Module.Free.of_basis.

theorem Module.Free.of_basis E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {ι : Type w}
  (b : Module.Basis ι R M), Module.Free R M

def Module.Free.ChooseBasisIndex E1 #

(R : Type u) →
  (M : Type v) → [inst : Semiring R] → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → [Module.Free R M] → Type v

If Module.Free R M then ChooseBasisIndex R M is the ι which indexes the basis ι → M. Note that this is defined such that this type is finite if R is trivial.

instance Module.Free.instDecidableEqChooseBasisIndex E0 #

(R : Type u) →
  (M : Type v) →
    [inst : Semiring R] →
      [inst_1 : AddCommMonoid M] →
        [inst_2 : Module R M] → [inst_3 : Module.Free R M] → DecidableEq (Module.Free.ChooseBasisIndex R M)

There is no hope of computing this, but we add the instance anyway to avoid fumbling with open scoped Classical.

def Module.Free.chooseBasis E1 #

(R : Type u) →
  (M : Type v) →
    [inst : Semiring R] →
      [inst_1 : AddCommMonoid M] →
        [inst_2 : Module R M] → [inst_3 : Module.Free R M] → Module.Basis (Module.Free.ChooseBasisIndex R M) R M

If Module.Free R M then chooseBasis : ι → M is the basis. Here ι = ChooseBasisIndex R M.

def Module.Free.constr E1 #

(R : Type u) →
  (M : Type v) →
    (N : Type z) →
      [inst : Semiring R] →
        [inst_1 : AddCommMonoid M] →
          [inst_2 : Module R M] →
            [inst_3 : Module.Free R M] →
              [inst_4 : AddCommMonoid N] →
                [inst_5 : Module R N] →
                  {S : Type z} →
                    [inst_6 : Semiring S] →
                      [inst_7 : Module S N] →
                        [inst_8 : SMulCommClass R S N] → (Module.Free.ChooseBasisIndex R M → N) ≃ₗ[S] M →ₗ[R] N

The universal property of free modules: giving a function (ChooseBasisIndex R M) → N, for N an R-module, is the same as giving an R-linear map M →ₗ[R] N.

This definition is parameterized over an extra Semiring S, such that SMulCommClass R S M' holds. If R is commutative, you can set S := R; if R is not commutative, you can recover an AddEquiv by setting S := ℕ. See library note [bundled maps over different rings].

instance Module.Free.instIsTorsionFree E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M],
  Module.IsTorsionFree R M

instance Module.Free.instNonemptyChooseBasisIndexOfNontrivial E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  [inst_3 : Module.Free R M] [Nontrivial M], Nonempty (Module.Free.ChooseBasisIndex R M)

theorem Module.Free.infinite E1 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M]
  [Infinite R] [Nontrivial M], Infinite M

instance Module.Free.instFaithfulSMulOfNontrivial E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M]
  [Nontrivial M], FaithfulSMul R M

theorem Module.Free.of_equiv E1 #

∀ {R : Type u_2} {R' : Type u_3} {M : Type u_4} {M' : Type u_5} [inst : Semiring R] [inst_1 : AddCommMonoid M]
  [inst_2 : Module R M] [inst_3 : Semiring R'] [inst_4 : AddCommMonoid M'] [inst_5 : Module R' M'] {σ : R →+* R'}
  {σ' : R' →+* R} [inst_6 : RingHomInvPair σ σ'] [inst_7 : RingHomInvPair σ' σ] (e₂ : M ≃ₛₗ[σ] M') [Module.Free R M],
  Module.Free R' M'

theorem Module.Free.of_equiv' E1 #

∀ {R : Type u} {N : Type z} [inst : Semiring R] [inst_1 : AddCommMonoid N] [inst_2 : Module R N] {P : Type v}
  [inst_3 : AddCommMonoid P] [inst_4 : Module R P], Module.Free R P → ∀ (e : P ≃ₗ[R] N), Module.Free R N

A variation of of_equiv: the assumption Module.Free R P here is explicit rather than an instance.

theorem Module.Free.iff_of_equiv E1 #

∀ {R : Type u_2} {R' : Type u_3} {M : Type u_4} {M' : Type u_5} [inst : Semiring R] [inst_1 : AddCommMonoid M]
  [inst_2 : Module R M] [inst_3 : Semiring R'] [inst_4 : AddCommMonoid M'] [inst_5 : Module R' M'] {σ : R →+* R'}
  {σ' : R' →+* R} [inst_6 : RingHomInvPair σ σ'] [inst_7 : RingHomInvPair σ' σ] (e₂ : M ≃ₛₗ[σ] M'),
  Module.Free R M ↔ Module.Free R' M'

instance Module.Free.shrink E0 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M]
  [inst_4 : Small.{w, v} M], Module.Free R (Shrink.{w, v} M)

instance Module.Free.self E0 #

∀ (R : Type u) [inst : Semiring R], Module.Free R R

The module structure provided by Semiring.toModule is free.

instance Module.Free.ulift E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M],
  Module.Free R (ULift.{u_2, v} M)

instance Module.Free.of_subsingleton E0 #

∀ (R : Type u) (N : Type z) [inst : Semiring R] [inst_1 : AddCommMonoid N] [inst_2 : Module R N] [Subsingleton N],
  Module.Free R N

theorem Module.Free.of_subsingleton' E1 #

∀ (R : Type u) (N : Type z) [inst : Semiring R] [inst_1 : AddCommMonoid N] [inst_2 : Module R N] [Subsingleton R],
  Module.Free R N

theorem Module.Basis.repr_algebraMap E1 #

∀ {R : Type u} {S : Type u_2} [inst : CommRing R] [inst_1 : Ring S] [inst_2 : Algebra R S] {ι : Type u_3}
  {B : Module.Basis ι R S} {i : ι}, B i = 1 → ∀ (r : R), B.repr ((algebraMap R S) r) = fun₀ | i => r

If B is a basis of the R-algebra S such that B i = 1 for some index i, then each r : R gets represented as s • B i as an element of S.

theorem Module.End.mem_center_iff E0 #

∀ {R : Type u_2} {M : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M]
  {f : Module.End R M}, f ∈ Set.center (Module.End R M) ↔ ∃ α, ∃ (hα : α ∈ Set.center R), f = Module.End.smulLeft α hα

theorem Module.End.mem_submonoidCenter_iff E0 #

∀ {R : Type u_2} {M : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M]
  {f : Module.End R M},
  f ∈ Submonoid.center (Module.End R M) ↔ ∃ α, ∃ (hα : α ∈ Submonoid.center R), f = Module.End.smulLeft α hα

theorem Module.End.mem_subsemigroupCenter_iff E0 #

∀ {R : Type u_2} {M : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [Module.Free R M]
  {f : Module.End R M},
  f ∈ Subsemigroup.center (Module.End R M) ↔ ∃ α, ∃ (hα : α ∈ Subsemigroup.center R), f = Module.End.smulLeft α hα