Concrete categories #
A concrete category is a category C
with a fixed faithful functor
forget : C ⥤ Type*
. We define concrete categories using class ConcreteCategory
.
In particular, we impose no restrictions on the
carrier type C
, so Type
is a concrete category with the identity
forgetful functor.
Each concrete category C
comes with a canonical faithful functor
forget C : C ⥤ Type*
. 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'
.
Two classes helping construct concrete categories in the two most
common cases are provided in the files BundledHom
and
UnbundledHom
, see their documentation for details.
References #
See [Ahrens and Lumsdaine, Displayed Categories][ahrens2017] for related work.
- forget : CategoryTheory.Functor C (Type w)
We have a functor to Type
- forget_faithful : CategoryTheory.Faithful CategoryTheory.ConcreteCategory.forget
That functor is faithful
A concrete category is a category C
with a fixed faithful functor Forget : C ⥤ Type
.
Note that ConcreteCategory
potentially depends on three independent universe levels,
- the universe level
w
appearing inForget : C ⥤ Type w
- the universe level
v
of the morphisms (i.e. we have aCategory.{v} C
) - the universe level
u
of the objects (i.eC : Type u
) They are specified that order, to avoid unnecessary universe annotations.
Instances
The forgetful functor from a concrete category to Type u
.
Equations
- CategoryTheory.forget C = CategoryTheory.ConcreteCategory.forget
Instances For
Provide a coercion to Type u
for a concrete category. This is not marked as an instance
as it could potentially apply to every type, and so is too expensive in typeclass search.
You can use it on particular examples as:
instance : HasCoeToSort X := ConcreteCategory.hasCoeToSort X
Equations
- CategoryTheory.ConcreteCategory.hasCoeToSort C = { coe := fun X => (CategoryTheory.forget C).obj X }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
In any concrete category, we can test equality of morphisms by pointwise evaluations.
Analogue of congr_fun h x
,
when h : f = g
is an equality between morphisms in a concrete category.
In any concrete category, injective morphisms are monomorphisms.
In any concrete category, surjective morphisms are epimorphisms.
- forget₂ : CategoryTheory.Functor C D
A functor from
C
toD
- forget_comp : CategoryTheory.Functor.comp CategoryTheory.HasForget₂.forget₂ (CategoryTheory.forget D) = CategoryTheory.forget C
It covers the
ConcreteCategory.forget
forC
andD
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
- CategoryTheory.forget₂ C D = CategoryTheory.HasForget₂.forget₂
Instances For
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
Every forgetful functor factors through the identity functor. This is not a global instance as it is prone to creating type class resolution loops.