The category of R
-modules #
ModuleCat.{v} R
is the category of bundled R
-modules with carrier in the universe v
. We show
that it is preadditive and show that being an isomorphism, monomorphism and epimorphism is
equivalent to being a linear equivalence, an injective linear map and a surjective linear map,
respectively.
Implementation details #
To construct an object in the category of R
-modules from a type M
with an instance of the
Module
typeclass, write of R M
. There is a coercion in the other direction.
The roundtrip ↑(of R M)
is definitionally equal to M
itself (when M
is a type with Module
instance), and so is of R ↑M
(when M : ModuleCat R M
).
The morphisms are given their own type, not identified with LinearMap
.
There is a cast from morphisms in Module R
to linear maps, written f.hom
(ModuleCat.Hom.hom
).
To go from linear maps to morphisms in Module R
, use ModuleCat.ofHom
.
Similarly, given an isomorphism f : M ≅ N
use f.toLinearEquiv
and given a linear equiv
f : M ≃ₗ[R] N
, use f.toModuleIso
.
The category of R-modules and their morphisms.
Note that in the case of R = ℤ
, we can not
impose here that the ℤ
-multiplication field from the module structure is defeq to the one coming
from the isAddCommGroup
structure (contrary to what we do for all module structures in
mathlib), which creates some difficulties down the road.
- carrier : Type v
the underlying type of an object in
ModuleCat R
- isAddCommGroup : AddCommGroup ↑self
- isModule : Module R ↑self
Equations
- ModuleCat.instCoeSortType R = { coe := ModuleCat.carrier }
The object in the category of R-algebras associated to a type equipped with the appropriate
typeclasses. This is the preferred way to construct a term of ModuleCat R
.
Equations
- ModuleCat.of R X = { carrier := X, isAddCommGroup := inst✝¹, isModule := inst✝ }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Typecheck a LinearMap
as a morphism in ModuleCat
.
Equations
The results below duplicate the ConcreteCategory
simp lemmas, but we can keep them for dsimp
.
Convenience shortcut for ModuleCat.hom_bijective.injective
.
Convenience shortcut for ModuleCat.hom_bijective.surjective
.
ModuleCat.Hom.hom
bundled as an Equiv
.
Equations
- ModuleCat.homEquiv = { toFun := ModuleCat.Hom.hom, invFun := ModuleCat.ofHom, left_inv := ⋯, right_inv := ⋯ }
Equations
- ModuleCat.instInhabited R = { default := ModuleCat.of R R }
Equations
- One or more equations did not get rendered due to their size.
Equations
- ModuleCat.instInhabited_1 R = { default := ModuleCat.of R PUnit.{?u.10 + 1} }
Forgetting to the underlying type and then building the bundled object returns the original module.
Equations
- M.ofSelfIso = { hom := CategoryTheory.CategoryStruct.id M, inv := CategoryTheory.CategoryStruct.id M, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Reinterpreting a linear map in the category of R
-modules
Equations
- ModuleCat.«term↟_» = Lean.ParserDescr.node `ModuleCat.«term↟_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "↟") (Lean.ParserDescr.cat `term 1024))
Alias of ModuleCat.ofHom
.
Typecheck a LinearMap
as a morphism in ModuleCat
.
Equations
Alias of ModuleCat.ofHom
.
Typecheck a LinearMap
as a morphism in ModuleCat
.
Equations
Reinterpreting a linear map in the category of R
-modules.
This notation is deprecated: use ↟
instead.
Equations
- ModuleCat.«term↾_» = Lean.ParserDescr.node `ModuleCat.«term↾_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "↾") (Lean.ParserDescr.cat `term 1024))
Reinterpreting a linear map in the category of R
-modules.
This notation is deprecated: use ↟
instead.
Equations
- ModuleCat.«term↿_» = Lean.ParserDescr.node `ModuleCat.«term↿_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "↿") (Lean.ParserDescr.cat `term 1024))
Build an isomorphism in the category Module R
from a LinearEquiv
between Module
s.
Equations
- e.toModuleIso = { hom := ModuleCat.ofHom ↑e, inv := ModuleCat.ofHom ↑e.symm, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Build an isomorphism in the category Module R
from a LinearEquiv
between Module
s.
Equations
- i.toModuleIso' = i.toModuleIso
Build an isomorphism in the category ModuleCat R
from a LinearEquiv
between Module
s.
Equations
Build an isomorphism in the category ModuleCat R
from a LinearEquiv
between Module
s.
Equations
Build a LinearEquiv
from an isomorphism in the category ModuleCat R
.
Equations
- i.toLinearEquiv = LinearEquiv.ofLinear (ModuleCat.Hom.hom i.hom) (ModuleCat.Hom.hom i.inv) ⋯ ⋯
linear equivalences between Module
s are the same as (isomorphic to) isomorphisms
in ModuleCat
Equations
- linearEquivIsoModuleIso = { hom := fun (e : X ≃ₗ[R] Y) => e.toModuleIso, inv := fun (i : ModuleCat.of R X ≅ ModuleCat.of R Y) => i.toLinearEquiv, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Equations
- ModuleCat.instAddHom = { add := fun (f g : M ⟶ N) => { hom' := ModuleCat.Hom.hom f + ModuleCat.Hom.hom g } }
Equations
- ModuleCat.instSubHom = { sub := fun (f g : M ⟶ N) => { hom' := ModuleCat.Hom.hom f - ModuleCat.Hom.hom g } }
Equations
Equations
- ModuleCat.instPreadditive = { homGroup := inferInstance, add_comp := ⋯, comp_add := ⋯ }
ModuleCat.Hom.hom
bundled as an additive equivalence.
Equations
- ModuleCat.homAddEquiv = { toEquiv := ModuleCat.homEquiv, map_add' := ⋯ }
Equations
- ModuleCat.instSMulHom = { smul := fun (c : S) (f : M ⟶ N) => { hom' := c • ModuleCat.Hom.hom f } }
Equations
- ModuleCat.Hom.instModule = Function.Injective.module S { toFun := ModuleCat.Hom.hom, map_zero' := ⋯, map_add' := ⋯ } ⋯ ⋯
ModuleCat.Hom.hom
bundled as a linear equivalence.
Equations
- ModuleCat.homLinearEquiv = { toFun := ModuleCat.homAddEquiv.toFun, map_add' := ⋯, map_smul' := ⋯, invFun := ModuleCat.homAddEquiv.invFun, left_inv := ⋯, right_inv := ⋯ }
Let S
be an S₀
-algebra. Then S
-modules are modules over S₀
.
Equations
- ModuleCat.Algebra.instModuleCarrier = Module.compHom (↑M) (algebraMap S₀ S)
Let S
be an S₀
-algebra. Then the category of S
-modules is S₀
-linear.
Equations
- ModuleCat.Algebra.instLinear = { homModule := inferInstance, smul_comp := ⋯, comp_smul := ⋯ }
ModuleCat.Hom.hom
as an isomorphism of rings.
Equations
- M.endRingEquiv = { toFun := ModuleCat.Hom.hom, invFun := ModuleCat.ofHom, left_inv := ⋯, right_inv := ⋯, map_mul' := ⋯, map_add' := ⋯ }
ModuleCat.Hom.hom
as an isomorphism of monoids.
Equations
The scalar multiplication on an object of ModuleCat R
considered as
a morphism of rings from R
to the endomorphisms of the underlying abelian group.
The scalar multiplication on ModuleCat R
considered as a morphism of rings
to the endomorphisms of the forgetful functor to AddCommGrp)
.
Given A : AddCommGrp
and a ring morphism R →+* End A
, this is a type synonym
for A
, on which we shall define a structure of R
-module.
Equations
- ModuleCat.mkOfSMul' x✝ = A
Equations
- ModuleCat.instSMulCarrierMkOfSMul' φ = { smul := fun (r : R) (x : ↑A) => (CategoryTheory.ConcreteCategory.hom (have this := φ r; this)) x }
Equations
- ModuleCat.instModuleCarrierMkOfSMul' φ = { toSMul := ModuleCat.instSMulCarrierMkOfSMul' φ, one_smul := ⋯, mul_smul := ⋯, smul_zero := ⋯, smul_add := ⋯, add_smul := ⋯, zero_smul := ⋯ }
Given A : AddCommGrp
and a ring morphism R →+* End A
, this is an object in
ModuleCat R
, whose underlying abelian group is A
and whose scalar multiplication is
given by R
.
Equations
Constructor for morphisms in ModuleCat R
which takes as inputs
a morphism between the underlying objects in AddCommGrp
and the compatibility
with the scalar multiplication.
Equations
- ModuleCat.homMk φ hφ = { hom' := { toFun := ⇑(CategoryTheory.ConcreteCategory.hom φ), map_add' := ⋯, map_smul' := ⋯ } }
@[simp]
lemmas for LinearMap.comp
and categorical identities.