# mathlib3documentation

category_theory.limits.types

# Limits in the category of types. #

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

We show that the category of types has all (co)limits, by providing the usual concrete models.

We also give a characterisation of filtered colimits in Type, via colimit.ι F i xi = colimit.ι F j xj ↔ ∃ k (f : i ⟶ k) (g : j ⟶ k), F.map f xi = F.map g xj.

Finally, we prove the category of types has categorical images, and that these agree with the range of a function.

def category_theory.limits.types.limit_cone {J : Type v} (F : J Type (max v u)) :

(internal implementation) the limit cone of a functor, implemented as flat sections of a pi type

Equations

(internal implementation) the fact that the proposed limit cone is the limit

Equations
@[protected, instance]

The category of types has all limits.

@[protected, instance]

The equivalence between a limiting cone of F in Type u and the "concrete" definition as the sections of F.

Equations
@[simp]
theorem category_theory.limits.types.is_limit_equiv_sections_apply {J : Type v} {F : J Type (max v u)} (j : J) (x : c.X) :
= c.π.app j x
@[simp]
theorem category_theory.limits.types.is_limit_equiv_sections_symm_apply {J : Type v} {F : J Type (max v u)} (x : (F.sections)) (j : J) :
c.π.app j = x j
noncomputable def category_theory.limits.types.limit_equiv_sections {J : Type v} (F : J Type (max v u)) :

The equivalence between the abstract limit of F in Type u and the "concrete" definition as the sections of F.

Equations
@[simp]
theorem category_theory.limits.types.limit_equiv_sections_apply {J : Type v} (F : J Type (max v u)) (j : J) :
@[simp]
theorem category_theory.limits.types.limit_equiv_sections_symm_apply {J : Type v} (F : J Type (max v u)) (x : (F.sections)) (j : J) :
@[simp]
@[ext]
noncomputable def category_theory.limits.types.limit.mk {J : Type v} (F : J Type (max v u)) (x : Π (j : J), F.obj j) (h : (j j' : J) (f : j j'), F.map f (x j) = x j') :

Construct a term of limit F : Type u from a family of terms x : Π j, F.obj j which are "coherent": ∀ (j j') (f : j ⟶ j'), F.map f (x j) = x j'.

Equations
@[simp]
theorem category_theory.limits.types.limit.π_mk {J : Type v} (F : J Type (max v u)) (x : Π (j : J), F.obj j) (h : (j j' : J) (f : j j'), F.map f (x j) = x j') (j : J) :
@[simp]
theorem category_theory.limits.types.limit.π_mk' {J : Type v} (F : J Type v) (x : Π (j : J), F.obj j) (h : (j j' : J) (f : j j'), F.map f (x j) = x j') (j : J) :
@[ext]
theorem category_theory.limits.types.limit_ext {J : Type v} (F : J Type (max v u)) (x y : category_theory.limits.limit F) (w : (j : J), ) :
x = y
@[ext]
theorem category_theory.limits.types.limit_ext' {J : Type v} (F : J Type v) (x y : category_theory.limits.limit F) (w : (j : J), ) :
x = y
theorem category_theory.limits.types.limit_ext_iff {J : Type v} (F : J Type (max v u)) (x y : category_theory.limits.limit F) :
x = y (j : J),
@[simp]
theorem category_theory.limits.types.limit.w_apply {J : Type v} {F : J Type (max v u)} {j j' : J} (f : j j') :
F.map f =
@[simp]
theorem category_theory.limits.types.limit.lift_π_apply {J : Type v} (F : J Type (max v u)) (j : J) (x : s.X) :
= s.π.app j x
@[simp]
theorem category_theory.limits.types.limit.map_π_apply {J : Type v} {F G : J Type (max v u)} (α : F G) (j : J)  :
= α.app j
@[simp]
theorem category_theory.limits.types.limit.w_apply' {J : Type v} {F : J Type v} {j j' : J} (f : j j') :
F.map f =
@[simp]
theorem category_theory.limits.types.limit.lift_π_apply' {J : Type v} (F : J Type v) (j : J) (x : s.X) :
= s.π.app j x
@[simp]
theorem category_theory.limits.types.limit.map_π_apply' {J : Type v} {F G : J Type v} (α : F G) (j : J)  :
= α.app j
def category_theory.limits.types.quot.rel {J : Type v} (F : J Type (max v u)) :
(Σ (j : J), F.obj j) (Σ (j : J), F.obj j) Prop

The relation defining the quotient type which implements the colimit of a functor F : J ⥤ Type u. See category_theory.limits.types.quot.

Equations
@[nolint]
def category_theory.limits.types.quot {J : Type v} (F : J Type (max v u)) :
Type (max v u)

A quotient type implementing the colimit of a functor F : J ⥤ Type u, as pairs ⟨j, x⟩ where x : F.obj j, modulo the equivalence relation generated by ⟨j, x⟩ ~ ⟨j', x'⟩ whenever there is a morphism f : j ⟶ j' so F.map f x = x'.

Equations
Instances for category_theory.limits.types.quot
def category_theory.limits.types.colimit_cocone {J : Type v} (F : J Type (max v u)) :

(internal implementation) the colimit cocone of a functor, implemented as a quotient of a sigma type

Equations

(internal implementation) the fact that the proposed colimit cocone is the colimit

Equations
@[protected, instance]

The category of types has all colimits.

@[protected, instance]
noncomputable def category_theory.limits.types.colimit_equiv_quot {J : Type v} (F : J Type (max v u)) :

The equivalence between the abstract colimit of F in Type u and the "concrete" definition as a quotient.

Equations
@[simp]
theorem category_theory.limits.types.colimit_equiv_quot_symm_apply {J : Type v} (F : J Type (max v u)) (j : J) (x : F.obj j) :
(quot.mk j, x⟩) =
@[simp]
theorem category_theory.limits.types.colimit_equiv_quot_apply {J : Type v} (F : J Type (max v u)) (j : J) (x : F.obj j) :
= quot.mk j, x⟩
@[simp]
theorem category_theory.limits.types.colimit.w_apply {J : Type v} {F : J Type (max v u)} {j j' : J} {x : F.obj j} (f : j j') :
(F.map f x) =
@[simp]
theorem category_theory.limits.types.colimit.ι_desc_apply {J : Type v} (F : J Type (max v u)) (j : J) (x : F.obj j) :
= s.ι.app j x
@[simp]
theorem category_theory.limits.types.colimit.ι_map_apply {J : Type v} {F G : J Type (max v u)} (α : F G) (j : J) (x : F.obj j) :
= (α.app j x)
@[simp]
theorem category_theory.limits.types.colimit.w_apply' {J : Type v} {F : J Type v} {j j' : J} {x : F.obj j} (f : j j') :
(F.map f x) =
@[simp]
theorem category_theory.limits.types.colimit.ι_desc_apply' {J : Type v} (F : J Type v) (j : J) (x : F.obj j) :
= s.ι.app j x
@[simp]
theorem category_theory.limits.types.colimit.ι_map_apply' {J : Type v} {F G : J Type v} (α : F G) (j : J) (x : F.obj j) :
= (α.app j x)
theorem category_theory.limits.types.colimit_sound {J : Type v} {F : J Type (max v u)} {j j' : J} {x : F.obj j} {x' : F.obj j'} (f : j j') (w : F.map f x = x') :
theorem category_theory.limits.types.colimit_sound' {J : Type v} {F : J Type (max v u)} {j j' : J} {x : F.obj j} {x' : F.obj j'} {j'' : J} (f : j j'') (f' : j' j'') (w : F.map f x = F.map f' x') :
theorem category_theory.limits.types.colimit_eq {J : Type v} {F : J Type (max v u)} {j j' : J} {x : F.obj j} {x' : F.obj j'} (w : = ) :
j', x'⟩
theorem category_theory.limits.types.jointly_surjective {J : Type v} (F : J Type (max v u)) (x : t.X) :
(j : J) (y : F.obj j), t.ι.app j y = x
theorem category_theory.limits.types.jointly_surjective' {J : Type v} {F : J Type (max v u)}  :
(j : J) (y : F.obj j),

A variant of jointly_surjective for x : colimit F.

@[protected]
def category_theory.limits.types.filtered_colimit.rel {J : Type v} (F : J Type (max v u)) (x y : Σ (j : J), F.obj j) :
Prop

An alternative relation on Σ j, F.obj j, which generates the same equivalence relation as we use to define the colimit in Type above, but that is more convenient when working with filtered colimits.

Elements in F.obj j and F.obj j' are equivalent if there is some k : J to the right where their images are equal.

Equations
theorem category_theory.limits.types.filtered_colimit.rel_of_quot_rel {J : Type v} (F : J Type (max v u)) (x y : Σ (j : J), F.obj j) :
theorem category_theory.limits.types.filtered_colimit.eqv_gen_quot_rel_of_rel {J : Type v} (F : J Type (max v u)) (x y : Σ (j : J), F.obj j) :
noncomputable def category_theory.limits.types.filtered_colimit.is_colimit_of {J : Type v} (F : J Type (max v u)) (hsurj : (x : t.X), (i : J) (xi : F.obj i), x = t.ι.app i xi) (hinj : (i j : J) (xi : F.obj i) (xj : F.obj j), t.ι.app i xi = t.ι.app j xj ( (k : J) (f : i k) (g : j k), F.map f xi = F.map g xj)) :

Recognizing filtered colimits of types.

Equations
@[protected]
@[protected]
theorem category_theory.limits.types.filtered_colimit.colimit_eq_iff_aux {J : Type v} (F : J Type (max v u)) {i j : J} {xi : F.obj i} {xj : F.obj j} :
j, xj⟩
theorem category_theory.limits.types.filtered_colimit.is_colimit_eq_iff {J : Type v} (F : J Type (max v u)) {i j : J} {xi : F.obj i} {xj : F.obj j} :
t.ι.app i xi = t.ι.app j xj (k : J) (f : i k) (g : j k), F.map f xi = F.map g xj
theorem category_theory.limits.types.filtered_colimit.colimit_eq_iff {J : Type v} (F : J Type (max v u)) {i j : J} {xi : F.obj i} {xj : F.obj j} :
(k : J) (f : i k) (g : j k), F.map f xi = F.map g xj
def category_theory.limits.types.image {α β : Type u} (f : α β) :

the image of a morphism in Type is just set.range f

Equations
Instances for category_theory.limits.types.image
@[protected, instance]
def category_theory.limits.types.image.inhabited {α β : Type u} (f : α β) [inhabited α] :
Equations
def category_theory.limits.types.image.ι {α β : Type u} (f : α β) :

the inclusion of image f into the target

Equations
Instances for category_theory.limits.types.image.ι
@[protected, instance]
noncomputable def category_theory.limits.types.image.lift {α β : Type u} {f : α β}  :

the universal property for the image factorisation

Equations
theorem category_theory.limits.types.image.lift_fac {α β : Type u} {f : α β}  :

the factorisation of any morphism in Type through a mono.

Equations
noncomputable def category_theory.limits.types.is_image {α β : Type u} (f : α β) :

the facorisation through a mono has the universal property of the image.

Equations
@[protected, instance]
@[protected, instance]
@[protected, instance]
Equations