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.
Equations
Instances For
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
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
- CategoryTheory.Limits.limit.coneMorphism c = (CategoryTheory.Limits.limit.isLimit F).liftConeMorphism c
Instances For
Given any other limit cone for F
, the chosen limit F
is isomorphic to the cone point.
Equations
- CategoryTheory.Limits.limit.isoLimitCone t = (CategoryTheory.Limits.limit.isLimit F).conePointUniqueUpToIso t.isLimit
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
- CategoryTheory.Limits.HasLimit.isoOfNatIso w = (CategoryTheory.Limits.limit.isLimit F).conePointsIsoOfNatIso (CategoryTheory.Limits.limit.isLimit G) w
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
- CategoryTheory.Limits.HasLimit.isoOfEquivalence e w = (CategoryTheory.Limits.limit.isLimit F).conePointsIsoOfEquivalence (CategoryTheory.Limits.limit.isLimit G) e w
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
- CategoryTheory.Limits.limit.post F G = CategoryTheory.Limits.limit.lift (F.comp G) (G.mapCone (CategoryTheory.Limits.limit.cone F))
Instances For
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
- 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
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
The limit cone obtained from a right adjoint of the constant functor.
Equations
- CategoryTheory.Limits.coneOfAdj adj F = { pt := L.obj F, π := adj.counit.app F }
Instances For
The cones defined by coneOfAdj
are limit cones.
Equations
- CategoryTheory.Limits.isLimitConeOfAdj adj F = { lift := fun (s : CategoryTheory.Limits.Cone F) => (adj.homEquiv s.pt F) s.π, fac := ⋯, uniq := ⋯ }
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
- ⋯ = ⋯
Equations
- ⋯ = ⋯
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
- CategoryTheory.Limits.colimit.coconeMorphism c = (CategoryTheory.Limits.colimit.isColimit F).descCoconeMorphism c
Instances For
Given any other colimit cocone for F
, the chosen colimit F
is isomorphic to the cocone point.
Equations
- CategoryTheory.Limits.colimit.isoColimitCocone t = (CategoryTheory.Limits.colimit.isColimit F).coconePointUniqueUpToIso t.isColimit
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
- CategoryTheory.Limits.HasColimit.isoOfNatIso w = (CategoryTheory.Limits.colimit.isColimit F).coconePointsIsoOfNatIso (CategoryTheory.Limits.colimit.isColimit G) w
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
- CategoryTheory.Limits.HasColimit.isoOfEquivalence e w = (CategoryTheory.Limits.colimit.isColimit F).coconePointsIsoOfEquivalence (CategoryTheory.Limits.colimit.isColimit G) e w
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
- CategoryTheory.Limits.colimit.post F G = CategoryTheory.Limits.colimit.desc (F.comp G) (G.mapCocone (CategoryTheory.Limits.colimit.cocone F))
Instances For
Equations
- ⋯ = ⋯
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
- ⋯ = ⋯
Equations
- ⋯ = ⋯
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
- P.op = { desc := fun (s : CategoryTheory.Limits.Cocone F.op) => (P.lift s.unop).op, fac := ⋯, uniq := ⋯ }
Instances For
If t : Cocone F
is a colimit cocone, then t.op : Cone F.op
is a limit cone.
Equations
- P.op = { lift := fun (s : CategoryTheory.Limits.Cone F.op) => (P.desc s.unop).op, fac := ⋯, uniq := ⋯ }
Instances For
If t : Cone F.op
is a limit cone, then t.unop : Cocone F
is a colimit cocone.
Equations
- P.unop = { desc := fun (s : CategoryTheory.Limits.Cocone F) => (P.lift s.op).unop, fac := ⋯, uniq := ⋯ }
Instances For
If t : Cocone F.op
is a colimit cocone, then t.unop : Cone F
is a limit cone.
Equations
- P.unop = { lift := fun (s : CategoryTheory.Limits.Cone F) => (P.desc s.op).unop, fac := ⋯, uniq := ⋯ }
Instances For
If t.op : Cocone F.op
is a colimit cocone, then t : Cone F
is a limit cone.
Equations
- CategoryTheory.Limits.isLimitOfOp P = P.unop
Instances For
If t.op : Cone F.op
is a limit cone, then t : Cocone F
is a colimit cocone.
Equations
- CategoryTheory.Limits.isColimitOfOp P = P.unop
Instances For
If t.unop : Cocone F
is a colimit cocone, then t : Cone F.op
is a limit cone.
Equations
Instances For
If t.unop : Cone F
is a limit cone, then t : Cocone F.op
is a colimit cocone.
Equations
Instances For
t : Cone F
is a limit cone if and only if t.op : Cocone F.op
is a colimit cocone.
Equations
- CategoryTheory.Limits.isLimitEquivIsColimitOp = equivOfSubsingletonOfSubsingleton CategoryTheory.Limits.IsLimit.op CategoryTheory.Limits.isLimitOfOp
Instances For
t : Cocone F
is a colimit cocone if and only if t.op : Cone F.op
is a limit cone.
Equations
- CategoryTheory.Limits.isColimitEquivIsLimitOp = equivOfSubsingletonOfSubsingleton CategoryTheory.Limits.IsColimit.op CategoryTheory.Limits.isColimitOfOp