Free modules #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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.
module.free R M
is the statement that the R
-module M
is free.
Instances of this typeclass
- module.free.of_subsingleton
- module.free.of_subsingleton'
- module.free.of_division_ring
- module.free.self
- module.free.prod
- module.free.pi
- module.free.matrix
- module.free.function
- module.free.finsupp
- module.free.dfinsupp
- module.free.direct_sum
- module.free.tensor
- module.free.linear_map
- module.free.add_monoid_hom
- basis.dual_free
- quaternion_algebra.module.free
- quaternion.module.free
- number_field.ring_of_integers.module.free
- module.free.multilinear_map
If module.free R M
then choose_basis_index R M
is the ι
which indexes the basis
ι → M
.
Equations
Instances for module.free.choose_basis_index
If module.free R M
then choose_basis : ι → M
is the basis.
Here ι = choose_basis_index R M
.
Equations
- module.free.choose_basis R M = _.some.snd
The isomorphism M ≃ₗ[R] (choose_basis_index R M →₀ R)
.
Equations
- module.free.repr R M = (module.free.choose_basis R M).repr
The universal property of free modules: giving a functon (choose_basis_index 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 smul_comm_class R S M'
holds.
If R
is commutative, you can set S := R
; if R
is not commutative,
you can recover an add_equiv
by setting S := ℕ
.
See library note [bundled maps over different rings].
Equations
- module.free.constr R M N = (module.free.choose_basis R M).constr S
A variation of of_equiv
: the assumption module.free R P
here is explicit rather than an
instance.
The module structure provided by semiring.to_module
is free.
The product of finitely many free modules is free.
The module of finite matrices is free.
The product of finitely many free modules is free (non-dependent version to help with typeclass search).