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.total_id_surjective
to prove that any module is the quotient of a free module.
Main definition #
Module.Free R M
: the class of freeR
-modules.
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.
Equations
- Module.Free.ChooseBasisIndex R M = ↑(Exists.choose ⋯)
Instances For
There is no hope of computing this, but we add the instance anyway to avoid fumbling with
open scoped Classical
.
Equations
If Module.Free R M
then chooseBasis : ι → M
is the basis.
Here ι = ChooseBasisIndex R M
.
Equations
Instances For
The isomorphism M ≃ₗ[R] (ChooseBasisIndex R M →₀ R)
.
Equations
- Module.Free.repr R M = (Module.Free.chooseBasis R M).repr
Instances For
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].
Equations
- Module.Free.constr R M N = Basis.constr (Module.Free.chooseBasis R M) S
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
A variation of of_equiv
: the assumption Module.Free R P
here is explicit rather than an
instance.
The module structure provided by Semiring.toModule
is free.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The product of finitely many free modules is free.
Equations
- ⋯ = ⋯
The module of finite matrices is free.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The product of finitely many free modules is free (non-dependent version to help with typeclass search).
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯