Modules over a ring #
In this file we define
Module R M
: an additive commutative monoidM
is aModule
over aSemiring R
if forr : R
andx : M
their "scalar multiplication"r • x : M
is defined, and the operation•
satisfies some natural associativity and distributivity axioms similar to those on a ring.
Implementation notes #
In typical mathematical usage, our definition of Module
corresponds to "semimodule", and the
word "module" is reserved for Module R M
where R
is a Ring
and M
an AddCommGroup
.
If R
is a Field
and M
an AddCommGroup
, M
would be called an R
-vector space.
Since those assumptions can be made by changing the typeclasses applied to R
and M
,
without changing the axioms in Module
, mathlib calls everything a Module
.
In older versions of mathlib3, we had separate abbreviations for semimodules and vector spaces.
This caused inference issues in some cases, while not providing any real advantages, so we decided
to use a canonical Module
typeclass throughout.
Tags #
semimodule, module, vector space
A module is a generalization of vector spaces to a scalar semiring.
It consists of a scalar semiring R
and an additive monoid of "vectors" M
,
connected by a "scalar multiplication" operation r • x : M
(where r : R
and x : M
) with some natural associativity and
distributivity axioms similar to those on a ring.
- smul : R → M → M
Scalar multiplication distributes over addition from the right.
Scalar multiplication by zero gives zero.
Instances
A module over a semiring automatically inherits a MulActionWithZero
structure.
Equations
- Module.toMulActionWithZero = MulActionWithZero.mk ⋯ ⋯
Pullback a Module
structure along an injective additive monoid homomorphism.
See note [reducible non-instances].
Equations
- Function.Injective.module R f hf smul = Module.mk ⋯ ⋯
Instances For
Pushforward a Module
structure along a surjective additive monoid homomorphism.
See note [reducible non-instances].
Equations
- Function.Surjective.module R f hf smul = Module.mk ⋯ ⋯
Instances For
Push forward the action of R
on M
along a compatible surjective map f : R →+* S
.
See also Function.Surjective.mulActionLeft
and Function.Surjective.distribMulActionLeft
.
Equations
- Function.Surjective.moduleLeft f hf hsmul = Module.mk ⋯ ⋯
Instances For
Compose a Module
with a RingHom
, with action f s • m
.
See note [reducible non-instances].
Equations
- Module.compHom M f = Module.mk ⋯ ⋯
Instances For
Equations
A variant of Module.ext
that's convenient for term-mode.
An AddCommMonoid
that is a Module
over a Ring
carries a natural AddCommGroup
structure.
See note [reducible non-instances].
Equations
Instances For
A module over a Subsingleton
semiring is a Subsingleton
. We cannot register this
as an instance because Lean has no way to guess R
.
A semiring is Nontrivial
provided that there exists a nontrivial module over this semiring.
Equations
- instDistribSMul = DistribSMul.mk ⋯
A ring homomorphism f : R →+* M
defines a module structure by r • x = f r * x
.
Equations
- f.toModule = Module.compHom S f
Instances For
If the module action of R
on S
is compatible with multiplication on S
, then
fun x ↦ x • 1
is a ring homomorphism from R
to S
.
This is the RingHom
version of MonoidHom.smulOneHom
.
When R
is commutative, usually algebraMap
should be preferred.
Equations
- RingHom.smulOneHom = { toMonoidHom := MonoidHom.smulOneHom, map_zero' := ⋯, map_add' := ⋯ }
Instances For
A homomorphism between semirings R and S can be equivalently specified by a R-module structure on S such that S/S/R is a scalar tower.
Equations
- One or more equations did not get rendered due to their size.
Instances For
nsmul
is equal to any other module structure via a cast.
Convert back any exotic ℕ
-smul to the canonical instance. This should not be needed since in
mathlib all AddCommMonoid
s should normally have exactly one ℕ
-module structure by design.
All ℕ
-module structures are equal. Not an instance since in mathlib all AddCommMonoid
should normally have exactly one ℕ
-module structure by design.
Equations
- AddCommMonoid.uniqueNatModule = { default := inferInstance, uniq := ⋯ }
Instances For
Equations
- ⋯ = ⋯
Alias of Nat.smul_one_eq_cast
.
Alias of Int.smul_one_eq_cast
.