mathlib documentation

category_theory.limits.has_limits

Existence of limits and colimits #

In category_theory.limits.is_limit we defined is_limit c, the data showing that a cone c is a limit cone.

The two main structures defined in this file are:

has_limit is a propositional typeclass (it's important that it is a proposition merely asserting the existence of a limit, as otherwise we would have non-defeq problems from incompatible instances).

While has_limit only asserts the existence of a limit cone, we happily use the axiom of choice in mathlib, so there are convenience functions all depending on has_limit F:

Key to using the has_limit interface is that there is an @[ext] lemma stating that to check f = g, for f g : Z ⟶ limit F, it suffices to check f ≫ limit.π F j = g ≫ limit.π F j for every j. This, combined with @[simp] lemmas, makes it possible to prove many easy facts about limits using automation (e.g. tidy).

There are abbreviations has_limits_of_shape J C and has_limits C asserting the existence of classes of limits. Later more are introduced, for finite limits, special shapes of limits, etc.

Ideally, many results about limits should be stated first in terms of is_limit, and then a result in terms of has_limit derived from this. At this point, however, this is far from uniformly achieved in mathlib --- often statements are only written in terms of has_limit.

Implementation #

At present we simply say everything twice, in order to handle both limits and colimits. It would be highly desirable to have some automation support, e.g. a @[dualize] attribute that behaves similarly to @[to_additive].

References #

@[nolint]
structure category_theory.limits.limit_cone {J : Type v} [category_theory.small_category J] {C : Type u} [category_theory.category C] (F : J C) :
Type (max u v)

limit_cone F contains a cone over F together with the information that it is a limit.

An arbitrary choice of limit object of a functor.

Equations

The projection from the limit object to a value of the functor.

Equations
@[simp]
theorem category_theory.limits.limit.w_assoc {J : Type v} [category_theory.small_category J] {C : Type u} [category_theory.category C] (F : J C) [category_theory.limits.has_limit F] {j j' : J} (f : j j') {X' : C} (f' : F.obj j' X') :

Functoriality of limits.

Usually this morphism should be accessed through lim.map, but may be needed separately when you have specified limits for the source and target functors, but not necessarily for all functors of shape J.

Equations

The isomorphism (in Type) between morphisms from a specified object W to the limit object, and cones with cone point W.

Equations
def category_theory.limits.limit.hom_iso' {J : Type v} [category_theory.small_category J] {C : Type u} [category_theory.category C] (F : J C) [category_theory.limits.has_limit F] (W : C) :
(W category_theory.limits.limit F) {p // ∀ {j j' : J} (f : j j'), p j F.map f = p j'}

The isomorphism (in Type) between morphisms from a specified object W to the limit object, and an explicit componentwise description of cones with cone point W.

Equations

If a functor F has a limit, so does any naturally isomorphic functor.

If a functor G has the same collection of cones as a functor F which has a limit, then G also has a limit.

The limits of F : J ⥤ C and G : K ⥤ C are isomorphic, if there is an equivalence e : J ≌ K making the triangle commute up to natural isomorphism.

Equations

If a E ⋙ F has a limit, and E is an equivalence, we can construct a limit of F.

limit F is functorial in F, when C has all limits of shape J.

Equations

The isomorphism between morphisms from W to the cone point of the limit cone for F and cones over F with cone point W is natural in F.

Equations

We can transport limits of shape J along an equivalence J ≌ J'.

@[nolint]
structure category_theory.limits.colimit_cocone {J : Type v} [category_theory.small_category J] {C : Type u} [category_theory.category C] (F : J C) :
Type (max u v)

colimit_cocone F contains a cocone over F together with the information that it is a colimit.

An arbitrary choice of colimit object of a functor.

Equations

The coprojection from a value of the functor to the colimit object.

Equations
@[simp]

We have lots of lemmas describing how to simplify colimit.ι F j ≫ _, and combined with colimit.ext we rely on these lemmas for many calculations.

However, since category.assoc is a @[simp] lemma, often expressions are right associated, and it's hard to apply these lemmas about colimit.ι.

We thus use reassoc to define additional @[simp] lemmas, with an arbitrary extra morphism. (see tactic/reassoc_axiom.lean)

Functoriality of colimits.

Usually this morphism should be accessed through colim.map, but may be needed separately when you have specified colimits for the source and target functors, but not necessarily for all functors of shape J.

Equations

The isomorphism (in Type) between morphisms from the colimit object to a specified object W, and cocones with cone point W.

Equations
def category_theory.limits.colimit.hom_iso' {J : Type v} [category_theory.small_category J] {C : Type u} [category_theory.category C] (F : J C) [category_theory.limits.has_colimit F] (W : C) :
(category_theory.limits.colimit F W) {p // ∀ {j j' : J} (f : j j'), F.map f p j' = p j}

The isomorphism (in Type) between morphisms from the colimit object to a specified object W, and an explicit componentwise description of cocones with cone point W.

Equations

If F has a colimit, so does any naturally isomorphic functor.

If a functor G has the same collection of cocones as a functor F which has a colimit, then G also has a colimit.

If a E ⋙ F has a colimit, and E is an equivalence, we can construct a colimit of F.

colimit F is functorial in F, when C has all colimits of shape J.

Equations

The isomorphism between morphisms from the cone point of the colimit cocone for F to W and cocones over F with cone point W is natural in F.

Equations

We can transport colimits of shape J along an equivalence J ≌ J'.

If t : cone F is a limit cone, then t.op : cocone F.op is a colimit cocone.

Equations

If t : cocone F is a colimit cocone, then t.op : cone F.op is a limit cone.

Equations

If t : cone F.op is a limit cone, then t.unop : cocone F is a colimit cocone.

Equations

If t : cocone F.op is a colimit cocone, then t.unop : cone F. is a limit cone.

Equations