Existence of limits and colimits #
In CategoryTheory.Limits.IsLimit
we defined IsLimit c
,
the data showing that a cone c
is a limit cone.
The two main structures defined in this file are:
LimitCone F
, which consists of a choice of cone forF
and the fact it is a limit cone, andHasLimit F
, asserting the mere existence of some limit cone forF
.
HasLimit
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 HasLimit
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 HasLimit F
:
limit F : C
, producing some limit object (of course all such are isomorphic)limit.π F j : limit F ⟶ F.obj j
, the morphisms out of the limit,limit.lift F c : c.pt ⟶ limit F
, the universal morphism from any otherc : Cone F
, etc.
Key to using the HasLimit
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 HasLimitsOfShape J C
and HasLimits 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 IsLimit
,
and then a result in terms of HasLimit
derived from this.
At this point, however, this is far from uniformly achieved in mathlib ---
often statements are only written in terms of HasLimit
.
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 #
LimitCone F
contains a cone over F
together with the information that it is a limit.
- cone : CategoryTheory.Limits.Cone F
The cone itself
- isLimit : CategoryTheory.Limits.IsLimit self.cone
The proof that is the limit cone
Instances For
HasLimit F
represents the mere existence of a limit for F
.
- mk' :: (
- exists_limit : Nonempty (CategoryTheory.Limits.LimitCone F)
There is some limit cone for
F
- )
Instances
Use the axiom of choice to extract explicit LimitCone F
from HasLimit F
.
Equations
Instances For
C
has limits of shape J
if there exists a limit for every functor F : J ⥤ C
.
- has_limit : ∀ (F : CategoryTheory.Functor J C), CategoryTheory.Limits.HasLimit F
All functors
F : J ⥤ C
fromJ
have limits
Instances
C
has all limits of size v₁ u₁
(HasLimitsOfSize.{v₁ u₁} C
)
if it has limits of every shape J : Type u₁
with [Category.{v₁} J]
.
- has_limits_of_shape : ∀ (J : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} J], CategoryTheory.Limits.HasLimitsOfShape J C
All functors
F : J ⥤ C
from all smallJ
have limits
Instances
C
has all (small) limits if it has limits of every shape that is as big as its hom-sets.
Instances For
Equations
- (_ : CategoryTheory.Limits.HasLimit F) = (_ : CategoryTheory.Limits.HasLimit F)
Equations
- (_ : CategoryTheory.Limits.HasLimitsOfShape J C) = (_ : CategoryTheory.Limits.HasLimitsOfShape J C)
An arbitrary choice of limit cone for a functor.
Equations
Instances For
An arbitrary choice of limit object of a functor.
Equations
Instances For
The projection from the limit object to a value of the functor.
Equations
- CategoryTheory.Limits.limit.π F j = (CategoryTheory.Limits.limit.cone F).π.app j
Instances For
Evidence that the arbitrary choice of cone provided by limit.cone F
is a limit cone.
Equations
Instances For
The morphism from the cone point of any other cone to the limit object.
Equations
- CategoryTheory.Limits.limit.lift F c = (CategoryTheory.Limits.limit.isLimit F).lift c
Instances For
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
Instances For
The cone morphism from any cone to the arbitrary choice of limit cone.
Equations
Instances For
Given any other limit cone for F
, the chosen limit F
is isomorphic to the cone point.
Equations
Instances For
The isomorphism (in Type
) between
morphisms from a specified object W
to the limit object,
and cones with cone point W
.
Equations
- CategoryTheory.Limits.limit.homIso F W = (CategoryTheory.Limits.limit.isLimit F).homIso W
Instances For
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
- CategoryTheory.Limits.limit.homIso' F W = (CategoryTheory.Limits.limit.isLimit F).homIso' W
Instances For
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 : J ⥤ C
are isomorphic,
if the functors are naturally isomorphic.
Equations
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
The canonical morphism from the limit of F
to the limit of E ⋙ F
.
Equations
Instances For
If we have particular limit cones available for E ⋙ F
and for F
,
we obtain a formula for limit.pre F E
.
The canonical morphism from G
applied to the limit of F
to the limit of F ⋙ G
.
Equations
Instances For
Equations
- (_ : CategoryTheory.Limits.HasLimit (CategoryTheory.Functor.comp e.functor F)) = (_ : CategoryTheory.Limits.HasLimit (CategoryTheory.Functor.comp e.functor F))
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
- One or more equations did not get rendered due to their size.
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
The constant functor and limit functor are adjoint to each other
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CategoryTheory.Limits.instIsRightAdjointFunctorCategoryLim = { left := CategoryTheory.Functor.const J, adj := CategoryTheory.Limits.constLimAdj }
Equations
- (_ : CategoryTheory.Mono (CategoryTheory.Limits.limMap α)) = (_ : CategoryTheory.Mono (CategoryTheory.Limits.lim.toPrefunctor.map α))
Equations
- (_ : CategoryTheory.Mono (CategoryTheory.Limits.limMap α)) = (_ : CategoryTheory.Mono (CategoryTheory.Limits.limMap α))
The limit cone obtained from a right adjoint of the constant functor.
Equations
- CategoryTheory.Limits.coneOfAdj adj F = { pt := L.toPrefunctor.obj F, π := adj.counit.app F }
Instances For
The cones defined by coneOfAdj
are limit cones.
Equations
- CategoryTheory.Limits.isLimitConeOfAdj adj F = CategoryTheory.Limits.IsLimit.mk fun (s : CategoryTheory.Limits.Cone F) => (adj.homEquiv s.pt F) s.π
Instances For
We can transport limits of shape J
along an equivalence J ≌ J'
.
A category that has larger limits also has smaller limits.
hasLimitsOfSizeShrink.{v u} C
tries to obtain HasLimitsOfSize.{v u} C
from some other HasLimitsOfSize C
.
Equations
ColimitCocone F
contains a cocone over F
together with the information that it is a
colimit.
- cocone : CategoryTheory.Limits.Cocone F
The cocone itself
- isColimit : CategoryTheory.Limits.IsColimit self.cocone
The proof that it is the colimit cocone
Instances For
HasColimit F
represents the mere existence of a colimit for F
.
- mk' :: (
- exists_colimit : Nonempty (CategoryTheory.Limits.ColimitCocone F)
There exists a colimit for
F
- )
Instances
Use the axiom of choice to extract explicit ColimitCocone F
from HasColimit F
.
Equations
Instances For
C
has colimits of shape J
if there exists a colimit for every functor F : J ⥤ C
.
- has_colimit : ∀ (F : CategoryTheory.Functor J C), CategoryTheory.Limits.HasColimit F
All
F : J ⥤ C
have colimits for a fixedJ
Instances
C
has all colimits of size v₁ u₁
(HasColimitsOfSize.{v₁ u₁} C
)
if it has colimits of every shape J : Type u₁
with [Category.{v₁} J]
.
- has_colimits_of_shape : ∀ (J : Type u₁) [inst : CategoryTheory.Category.{v₁, u₁} J], CategoryTheory.Limits.HasColimitsOfShape J C
All
F : J ⥤ C
have colimits for all smallJ
Instances
C
has all (small) colimits if it has colimits of every shape that is as big as its hom-sets.
Equations
Instances For
Equations
- (_ : CategoryTheory.Limits.HasColimit F) = (_ : CategoryTheory.Limits.HasColimit F)
Equations
- (_ : CategoryTheory.Limits.HasColimitsOfShape J C) = (_ : CategoryTheory.Limits.HasColimitsOfShape J C)
An arbitrary choice of colimit cocone of a functor.
Equations
Instances For
An arbitrary choice of colimit object of a functor.
Equations
Instances For
The coprojection from a value of the functor to the colimit object.
Equations
- CategoryTheory.Limits.colimit.ι F j = (CategoryTheory.Limits.colimit.cocone F).ι.app j
Instances For
Evidence that the arbitrary choice of cocone is a colimit cocone.
Equations
Instances For
The morphism from the colimit object to the cone point of any other cocone.
Equations
Instances For
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
Instances For
The cocone morphism from the arbitrary choice of colimit cocone to any cocone.
Equations
Instances For
Given any other colimit cocone for F
, the chosen colimit F
is isomorphic to the cocone point.
Equations
Instances For
The isomorphism (in Type
) between
morphisms from the colimit object to a specified object W
,
and cocones with cone point W
.
Equations
- CategoryTheory.Limits.colimit.homIso F W = (CategoryTheory.Limits.colimit.isColimit F).homIso W
Instances For
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
- CategoryTheory.Limits.colimit.homIso' F W = (CategoryTheory.Limits.colimit.isColimit F).homIso' W
Instances For
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.
The colimits of F : J ⥤ C
and G : J ⥤ C
are isomorphic,
if the functors are naturally isomorphic.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The colimits 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
- One or more equations did not get rendered due to their size.
Instances For
The canonical morphism from the colimit of E ⋙ F
to the colimit of F
.
Equations
Instances For
If we have particular colimit cocones available for E ⋙ F
and for F
,
we obtain a formula for colimit.pre F E
.
The canonical morphism from G
applied to the colimit of F ⋙ G
to G
applied to the colimit of F
.
Equations
Instances For
Equations
- (_ : CategoryTheory.Limits.HasColimit (CategoryTheory.Functor.comp e.functor F)) = (_ : CategoryTheory.Limits.HasColimit (CategoryTheory.Functor.comp e.functor F))
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
- One or more equations did not get rendered due to their size.
Instances For
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
- One or more equations did not get rendered due to their size.
Instances For
The colimit functor and constant functor are adjoint to each other
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- CategoryTheory.Limits.instIsLeftAdjointFunctorCategoryColim = { right := CategoryTheory.Functor.const J, adj := CategoryTheory.Limits.colimConstAdj }
Equations
- (_ : CategoryTheory.Epi (CategoryTheory.Limits.colimMap α)) = (_ : CategoryTheory.Epi (CategoryTheory.Limits.colim.toPrefunctor.map α))
Equations
We can transport colimits of shape J
along an equivalence J ≌ J'
.
A category that has larger colimits also has smaller colimits.
hasColimitsOfSizeShrink.{v u} C
tries to obtain HasColimitsOfSize.{v u} C
from some other HasColimitsOfSize C
.
Equations
If t : Cone F
is a limit cone, then t.op : Cocone F.op
is a colimit cocone.
Equations
- CategoryTheory.Limits.IsLimit.op P = CategoryTheory.Limits.IsColimit.mk fun (s : CategoryTheory.Limits.Cocone F.op) => (P.lift (CategoryTheory.Limits.Cocone.unop s)).op
Instances For
If t : Cocone F
is a colimit cocone, then t.op : Cone F.op
is a limit cone.
Equations
- CategoryTheory.Limits.IsColimit.op P = CategoryTheory.Limits.IsLimit.mk fun (s : CategoryTheory.Limits.Cone F.op) => (P.desc (CategoryTheory.Limits.Cone.unop s)).op
Instances For
If t : Cone F.op
is a limit cone, then t.unop : Cocone F
is a colimit cocone.
Equations
- CategoryTheory.Limits.IsLimit.unop P = CategoryTheory.Limits.IsColimit.mk fun (s : CategoryTheory.Limits.Cocone F) => (P.lift (CategoryTheory.Limits.Cocone.op s)).unop
Instances For
If t : Cocone F.op
is a colimit cocone, then t.unop : Cone F.
is a limit cone.
Equations
- CategoryTheory.Limits.IsColimit.unop P = CategoryTheory.Limits.IsLimit.mk fun (s : CategoryTheory.Limits.Cone F) => (P.desc (CategoryTheory.Limits.Cone.op s)).unop
Instances For
t : Cone F
is a limit cone if and only if t.op : Cocone F.op
is a colimit cocone.
Equations
- One or more equations did not get rendered due to their size.
Instances For
t : Cocone F
is a colimit cocone if and only if t.op : Cone F.op
is a limit cone.
Equations
- One or more equations did not get rendered due to their size.