Forgetful functors #
A concrete category is a category C where the objects and morphisms correspond with types and
(bundled) functions between these types, see the file
Mathlib.CategoryTheory.ConcreteCategory.Basic
Each concrete category C comes with a canonical faithful functor forget C : C ⥤ Type*.
We impose no restrictions on the category C, so Type has the identity forgetful functor.
We say that a concrete category C admits a forgetful functor to a concrete category D, if it
has a functor forget₂ C D : C ⥤ D such that (forget₂ C D) ⋙ (forget D) = forget C, see
class HasForget₂. Due to Faithful.div_comp, it suffices to verify that forget₂.obj and
forget₂.map agree with the equality above; then forget₂ will satisfy the functor laws
automatically, see HasForget₂.mk'.
We say that a concrete category C admits a forgetful functor to a concrete category D, if it
has a functor forget₂ C D : C ⥤ D such that (forget₂ C D) ⋙ (forget D) = forget C, see
class HasForget₂. Due to Faithful.div_comp, it suffices to verify that forget₂.obj and
forget₂.map agree with the equality above; then forget₂ will satisfy the functor laws
automatically, see HasForget₂.mk'.
References #
See Ahrens and Lumsdaine, Displayed Categories for related work.
The forgetful functor from a concrete category to the category of types.
Equations
- CategoryTheory.forget C = { obj := fun (X : C) => CategoryTheory.ToType X, map := fun {X Y : C} (f : X ⟶ Y) => ⇑(CategoryTheory.ConcreteCategory.hom f), map_id := ⋯, map_comp := ⋯ }
Instances For
Analogue of congr_fun h x,
when h : f = g is an equality between morphisms in a concrete category.
Analogue of congr_arg f h,
when h : x = x' is an equality between elements of objects in a concrete category.
HasForget₂ C D, where C and D are both concrete categories, provides a functor
forget₂ C D : C ⥤ D and a proof that forget₂ ⋙ (forget D) = forget C.
Instances
The forgetful functor C ⥤ D between concrete categories for which we have an instance
HasForget₂ C.
Equations
Instances For
Equations
- CategoryTheory.InducedCategory.hasForget₂ f = { forget₂ := CategoryTheory.inducedFunctor f, forget_comp := ⋯ }
Equations
- CategoryTheory.FullSubcategory.hasForget₂ P = { forget₂ := P.ι, forget_comp := ⋯ }
In order to construct a “partially forgetting” functor, we do not need to verify functor laws;
it suffices to ensure that compositions agree with forget₂ C D ⋙ forget D = forget C.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Composition of HasForget₂ instances.
Equations
- CategoryTheory.HasForget₂.trans C D E = { forget₂ := (CategoryTheory.forget₂ C D).comp (CategoryTheory.forget₂ D E), forget_comp := ⋯ }
Instances For
Equations
- CategoryTheory.Types.instFunLike X Y = { coe := fun (f : X ⟶ Y) => f, coe_injective' := ⋯ }
Equations
- One or more equations did not get rendered due to their size.