The category of R-modules #
Module.{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.
Similarly, there is a coercion from morphisms in Module R to linear maps.
Porting note: the next two paragraphs should be revised.
Unfortunately, Lean is not smart enough to see that, given an object M : Module R, the expression
of R M, where we coerce M to the carrier type, is definitionally equal to M itself.
This means that to go the other direction, i.e., from linear maps/equivalences to (iso)morphisms
in the category of R-modules, we have to take care not to inadvertently end up with an
of R M where M is already an object. Hence, given f : M →ₗ[R] N,
- if
M N : Module R, simply usef; - if
M : Module RandNis an unbundledR-module, use↿forasHomLeft f; - if
Mis an unbundledR-module andN : Module R, use↾forasHomRight f; - if
MandNare unbundledR-modules, use↟forasHom f.
Similarly, given f : M ≃ₗ[R] N, use toModuleIso, toModuleIso'Left, toModuleIso'Right
or toModuleIso', respectively.
The arrow notations are localized, so you may have to open ModuleCat (or open scoped ModuleCat)
to use them. Note that the notation for asHomLeft clashes with the notation used to promote
functions between types to morphisms in the category Type, so to avoid confusion, it is probably a
good idea to avoid having the locales Module and CategoryTheory.Type open at the same time.
If you get an error when trying to apply a theorem and the convert tactic produces goals of the
form M = of R M, then you probably used an incorrect variant of asHom or 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
Instances For
An alias for ModuleCat.{max u₁ u₂}, to deal around unification issues.
Since the universe the ring lives in can be inferred, we put that last.
Equations
- ModuleCatMax R = ModuleCat R
Instances For
Equations
- ModuleCat.instCoeSortModuleCatType R = { coe := ModuleCat.carrier }
Equations
Equations
- ModuleCat.instFunLikeHomModuleCatToQuiverToCategoryStructModuleCategoryCarrier R = LinearMap.instFunLike
Equations
- ⋯ = ⋯
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.
Equations
- One or more equations did not get rendered due to their size.
The object in the category of R-modules associated to an R-module
Equations
- ModuleCat.of R X = ModuleCat.mk X
Instances For
Typecheck a LinearMap as a morphism in Module R.
Equations
- ModuleCat.ofHom f = f
Instances For
Equations
- ModuleCat.instInhabitedModuleCat R = { default := ModuleCat.of R PUnit.{u_1 + 1} }
Equations
- ModuleCat.ofUnique R = i
Forgetting to the underlying type and then building the bundled object returns the original module.
Equations
- ModuleCat.ofSelfIso M = { hom := CategoryTheory.CategoryStruct.id M, inv := CategoryTheory.CategoryStruct.id M, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Equations
- ⋯ = ⋯
Reinterpreting a linear map in the category of R-modules.
Equations
- ModuleCat.asHom = id
Instances For
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))
Instances For
Reinterpreting a linear map in the category of R-modules.
Equations
- ModuleCat.asHomRight = id
Instances For
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))
Instances For
Reinterpreting a linear map in the category of R-modules.
Equations
- ModuleCat.asHomLeft = id
Instances For
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))
Instances For
Build an isomorphism in the category Module R from a LinearEquiv between Modules.
Equations
- LinearEquiv.toModuleIso e = { hom := ↑e, inv := ↑(LinearEquiv.symm e), hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Build an isomorphism in the category ModuleCat R from a LinearEquiv between Modules.
Equations
Instances For
Build an isomorphism in the category ModuleCat R from a LinearEquiv between Modules.
Equations
Instances For
Build a LinearEquiv from an isomorphism in the category ModuleCat R.
Equations
- CategoryTheory.Iso.toLinearEquiv i = LinearEquiv.ofLinear i.hom i.inv ⋯ ⋯
Instances For
linear equivalences between Modules are the same as (isomorphic to) isomorphisms
in ModuleCat
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ModuleCat.instAddCommGroupHomModuleCatToQuiverToCategoryStructModuleCategory = LinearMap.addCommGroup
Equations
- ModuleCat.instPreadditiveModuleCatModuleCategory = { homGroup := inferInstance, add_comp := ⋯, comp_add := ⋯ }
Equations
- ⋯ = ⋯
Equations
- One or more equations did not get rendered due to their size.
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The scalar multiplication on ModuleCat R considered as a morphism of rings
to the endomorphisms of the forgetful functor to AddCommGroupCat).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given A : AddCommGroupCat 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
Instances For
Equations
- ModuleCat.instAddCommGroupαMkOfSMul' φ = id inferInstance
Equations
- ModuleCat.instSMulαAddCommGroupMkOfSMul' φ = { smul := fun (r : R) (x : ↑A) => (let_fun this := φ r; this) x }
Given A : AddCommGroupCat 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
Instances For
Constructor for morphisms in ModuleCat R which takes as inputs
a morphism between the underlying objects in AddCommGroupCat and the compatibility
with the scalar multiplication.
Equations
- ModuleCat.homMk φ hφ = { toAddHom := { toFun := ⇑φ, map_add' := ⋯ }, map_smul' := ⋯ }
Instances For
Equations
- ⋯ = ⋯