The colimit type of a functor to types #
Given a category J
(with J : Type u
and [Category.{v} J]
) and
a functor F : J ⥤ Type w₀
, we introduce a type F.ColimitType : Type (max u w₀)
,
which satisfies a certain universal property of the colimit: it is defined
as a suitable quotient of Σ j, F.obj j
. This universal property is not
expressed in a categorical way (as in general Type (max u w₀)
is not the same as Type u
).
We also introduce a notion of cocone of F : J ⥤ Type w₀
, this is F.CoconeTypes
,
or more precisely Functor.CoconeTypes.{w₁} F
, which consists of a candidate
colimit type for F
which is in Type w₁
(in case w₁ = w₀
, we shall show
this is the same as the data of c : Cocone F
in the categorical sense).
Given c : F.CoconeTypes
, we also introduce a property c.IsColimit
which says
that the canonical map F.ColimitType → c.pt
is a bijection, and we shall show (TODO)
that when w₁ = w₀
, it is equivalent to saying that the corresponding cocone
in a categorical sense is a colimit.
TODO #
- refactor
DirectedSystem
and the construction of colimits inType
by usingFunctor.ColimitType
. - add a similar API for limits in
Type
?
Given a functor F : J ⥤ Type w₀
, this is a "cocone" of F
where
we allow the point pt
to be in a different universe than w
.
Instances For
Given c : F.CoconeTypes
and a map φ : c.pt → T
, this is
the cocone for F
obtained by postcomposition with φ
.
Instances For
The cocone for G : J ⥤ Type w₀'
that is deduced from a cocone for F : J ⥤ Type w₀
and a natural map G.obj j → F.obj j
for all j : J
.
Equations
Instances For
Given F : J ⥤ Type w₀
, this is the relation Σ j, F.obj j
which
generates an equivalence relation such that the quotient identifies
to the colimit type of F
.
Instances For
The colimit type of a functor F : J ⥤ Type w₀
. (It may not
be in Type w₀
.)
Equations
Instances For
The canonical maps F.obj j → F.ColimitType
.
Equations
- F.ιColimitType j x = Quot.mk F.ColimitTypeRel ⟨j, x⟩
Instances For
The cocone corresponding to F.ColimitType
.
Equations
- F.coconeTypes = { pt := F.ColimitType, ι := fun (j : J) => F.ιColimitType j, ι_naturality := ⋯ }
Instances For
An heterogeneous universe version of the universal property of the colimit is
satisfied by F.ColimitType
together the maps F.ιColimitType j
.
Equations
Instances For
Given F : J ⥤ Type w₀
and c : F.CoconeTypes
, this is the property
that c
is a colimit. It is defined by saying the canonical map
F.descColimitType c : F.ColimitType → c.pt
is a bijection.
- bijective : Function.Bijective (F.descColimitType c)
Instances For
Given F : J ⥤ Type w₀
, and c : F.CoconeTypes
a cocone that is colimit,
this is the equivalence F.ColimitType ≃ c.pt
.
Equations
- hc.equiv = Equiv.ofBijective (F.descColimitType c) ⋯
Instances For
If F : J ⥤ Type w₀
and c : F.CoconeTypes
is colimit, then
c
satisfies a heterogeneous universe version of the universal
property of colimits.
Instances For
Structure which expresses that c : F.CoconeTypes
satisfies the universal property of the colimit of types:
compatible families of maps F.obj j → T
(where T
is any type in a specified universe) descend in a unique
way as maps c.pt → T
.
- desc (c' : F.CoconeTypes) : c.pt → c'.pt
any cocone descends (in a unique way) as a map
Instances For
Any structure IsColimitCore.{max w₂ w₃} c
can be
lowered to IsColimitCore.{w₂} c
Equations
- hc.down = { desc := fun (c' : F.CoconeTypes) => Equiv.ulift.toFun ∘ hc.desc (c'.postcomp ⇑Equiv.ulift.symm), fac := ⋯, funext := ⋯ }
Instances For
A colimit cocone for F : J ⥤ Type w₀
induces a colimit cocone
for G : J ⥤ Type w₉'
when we have a natural equivalence G.obj j ≃ F.obj j
for all j : J
.
Equations
- hc.precompose e naturality = { desc := fun (c' : G.CoconeTypes) => hc.desc (c'.precompose (fun {j' : J} => ⇑(e j').symm) ⋯), fac := ⋯, funext := ⋯ }
Instances For
When c : F.CoconeTypes
satisfies the property
c.IsColimit
, this is a term in IsColimitCore.{w₂} c
for any universe w₂
.
Equations
- hc.isColimitCore = { desc := hc.desc, fac := ⋯, funext := ⋯ }