mathlib3 documentation


The forgetful functor from R-modules preserves filtered colimits. #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

Forgetful functors from algebraic categories usually don't preserve colimits. However, they tend to preserve filtered colimits.

In this file, we start with a ring R, a small filtered category J and a functor F : J ⥤ Module R. We show that the colimit of F ⋙ forget₂ (Module R) AddCommGroup (in AddCommGroup) carries the structure of an R-module, thereby showing that the forgetful functor forget₂ (Module R) AddCommGroup preserves filtered colimits. In particular, this implies that forget (Module R) preserves filtered colimits.


The colimit of F ⋙ forget₂ (Module R) AddCommGroup in the category AddCommGroup. In the following, we will show that this has the structure of an R-module.


The canonical projection into the colimit, as a quotient type.

theorem Module.filtered_colimits.M.mk_eq {R : Type u} [ring R] {J : Type v} [category_theory.small_category J] [category_theory.is_filtered J] (F : J Module R) (x y : Σ (j : J), (F.obj j)) (h : (k : J) (f : x.fst k) (g : y.fst k), ( f) x.snd = ( g) y.snd) :

The "unlifted" version of scalar multiplication in the colimit.

@[protected, instance]

Scalar multiplication in the colimit. See also colimit_smul_aux.


The bundled R-module giving the filtered colimit of a diagram.


Given a cocone t of F, the induced monoid linear map from the colimit to the cocone point. We already know that this is a morphism between additive groups. The only thing left to see is that it is a linear map, i.e. preserves scalar multiplication.