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
A variant of Module.ext
that's convenient for term-mode.
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 ⋯