WithInitial
and WithTerminal
#
Given a category C
, this file constructs two objects:
WithTerminal C
, the category built fromC
by formally adjoining a terminal object.WithInitial C
, the category built fromC
by formally adjoining an initial object.
The terminal resp. initial object is WithTerminal.star
resp. WithInitial.star
, and
the proofs that these are terminal resp. initial are in WithTerminal.star_terminal
and WithInitial.star_initial
.
The inclusion from C
into WithTerminal C
resp. WithInitial C
is denoted
WithTerminal.incl
resp. WithInitial.incl
.
The relevant constructions needed for the universal properties of these constructions are:
lift
, which liftsF : C ⥤ D
to a functor fromWithTerminal C
resp.WithInitial C
in the case where an objectZ : D
is provided satisfying some additional conditions.inclLift
shows that the composition oflift
withincl
is isomorphic to the functor which was lifted.liftUnique
provides the uniqueness property oflift
.
In addition to this, we provide WithTerminal.map
and WithInitial.map
providing the
functoriality of these constructions with respect to functors on the base categories.
We define corresponding pseudofunctors WithTerminal.pseudofunctor
and WithInitial.pseudofunctor
from Cat
to Cat
.
Formally adjoin a terminal object to a category.
- of {C : Type u} : C → WithTerminal C
- star {C : Type u} : WithTerminal C
Equations
Formally adjoin an initial object to a category.
- of {C : Type u} : C → WithInitial C
- star {C : Type u} : WithInitial C
Equations
Morphisms for WithTerminal C
.
Identity morphisms for WithTerminal C
.
Composition of morphisms for WithTerminal C
.
Equations
- One or more equations did not get rendered due to their size.
- CategoryTheory.WithTerminal.comp = fun (_f : (CategoryTheory.WithTerminal.of _X).Hom x✝) (_g : x✝.Hom CategoryTheory.WithTerminal.star) => PUnit.unit
- CategoryTheory.WithTerminal.comp = fun (f : CategoryTheory.WithTerminal.star.Hom (CategoryTheory.WithTerminal.of _X)) (_g : (CategoryTheory.WithTerminal.of _X).Hom x✝) => PEmpty.elim f
- CategoryTheory.WithTerminal.comp = fun (_f : x✝.Hom CategoryTheory.WithTerminal.star) (g : CategoryTheory.WithTerminal.star.Hom (CategoryTheory.WithTerminal.of _Y)) => PEmpty.elim g
- CategoryTheory.WithTerminal.comp = fun (x x : CategoryTheory.WithTerminal.star.Hom CategoryTheory.WithTerminal.star) => PUnit.unit
Equations
- One or more equations did not get rendered due to their size.
Helper function for typechecking.
Equations
The inclusion from C
into WithTerminal C
.
Equations
- CategoryTheory.WithTerminal.incl = { obj := CategoryTheory.WithTerminal.of, map := fun {X Y : C} (f : X ⟶ Y) => f, map_id := ⋯, map_comp := ⋯ }
Map WithTerminal
with respect to a functor F : C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
A natural isomorphism between the functor map (𝟭 C)
and 𝟭 (WithTerminal C)
.
Equations
- One or more equations did not get rendered due to their size.
A natural isomorphism between the functor map (F ⋙ G)
and map F ⋙ map G
.
Equations
- One or more equations did not get rendered due to their size.
From a natural transformation of functors C ⥤ D
, the induced natural transformation
of functors WithTerminal C ⥤ WithTerminal D
.
Equations
- One or more equations did not get rendered due to their size.
The prelax functor from Cat
to Cat
defined with WithTerminal
.
Equations
- One or more equations did not get rendered due to their size.
The pseudofunctor from Cat
to Cat
defined with WithTerminal
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- CategoryTheory.WithTerminal.instUniqueHomStar = { default := PUnit.unit, uniq := ⋯ }
- CategoryTheory.WithTerminal.instUniqueHomStar = { default := PUnit.unit, uniq := ⋯ }
The isomorphism between star and an abstract terminal object of WithTerminal C
Lift a functor F : C ⥤ D
to WithTerminal C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
The isomorphism between incl ⋙ lift F _ _
with F
.
Equations
- One or more equations did not get rendered due to their size.
The isomorphism between (lift F _ _).obj WithTerminal.star
with Z
.
Equations
The uniqueness of lift
.
Equations
- One or more equations did not get rendered due to their size.
A variant of lift
with Z
a terminal object.
Equations
- CategoryTheory.WithTerminal.liftToTerminal F hZ = CategoryTheory.WithTerminal.lift F (fun (_x : C) => hZ.from (F.obj _x)) ⋯
A variant of incl_lift
with Z
a terminal object.
Equations
- CategoryTheory.WithTerminal.inclLiftToTerminal F hZ = CategoryTheory.WithTerminal.inclLift F (fun (_x : C) => hZ.from (F.obj _x)) ⋯
A variant of lift_unique
with Z
a terminal object.
Equations
- CategoryTheory.WithTerminal.liftToTerminalUnique F hZ G h hG = CategoryTheory.WithTerminal.liftUnique F (fun (_z : C) => hZ.from (F.obj _z)) ⋯ G h hG ⋯
A functor WithTerminal C ⥤ D
can be seen as an element of the comma category
Comma (𝟭 (C ⥤ D)) (const C)
.
Equations
- One or more equations did not get rendered due to their size.
A morphism of functors WithTerminal C ⥤ D
gives a morphism between the associated comma
objects.
Equations
- CategoryTheory.WithTerminal.mkCommaMorphism η = { left := CategoryTheory.whiskerLeft CategoryTheory.WithTerminal.incl η, right := η.app CategoryTheory.WithTerminal.star, w := ⋯ }
An element of the comma category Comma (𝟭 (C ⥤ D)) (Functor.const C)
can be seen as a
functor WithTerminal C ⥤ D
.
Equations
- CategoryTheory.WithTerminal.ofCommaObject c = CategoryTheory.WithTerminal.lift c.left (fun (x : C) => c.hom.app x) ⋯
A morphism in Comma (𝟭 (C ⥤ D)) (Functor.const C)
gives a morphism between the associated
functors WithTerminal C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
The category of functors WithTerminal C ⥤ D
is equivalent to the category
Comma (𝟭 (C ⥤ D)) (const C)
.
Equations
- One or more equations did not get rendered due to their size.
Morphisms for WithInitial C
.
Equations
Identity morphisms for WithInitial C
.
Composition of morphisms for WithInitial C
.
Equations
- One or more equations did not get rendered due to their size.
- CategoryTheory.WithInitial.comp = fun (_f : CategoryTheory.WithInitial.star.Hom x✝) (_g : x✝.Hom (CategoryTheory.WithInitial.of _X)) => PUnit.unit
- CategoryTheory.WithInitial.comp = fun (_f : x✝.Hom (CategoryTheory.WithInitial.of _X)) (g : (CategoryTheory.WithInitial.of _X).Hom CategoryTheory.WithInitial.star) => PEmpty.elim g
- CategoryTheory.WithInitial.comp = fun (f : (CategoryTheory.WithInitial.of _Y).Hom CategoryTheory.WithInitial.star) (_g : CategoryTheory.WithInitial.star.Hom x✝) => PEmpty.elim f
- CategoryTheory.WithInitial.comp = fun (x x : CategoryTheory.WithInitial.star.Hom CategoryTheory.WithInitial.star) => PUnit.unit
Equations
- One or more equations did not get rendered due to their size.
Helper function for typechecking.
Equations
The inclusion of C
into WithInitial C
.
Equations
- CategoryTheory.WithInitial.incl = { obj := CategoryTheory.WithInitial.of, map := fun {X Y : C} (f : X ⟶ Y) => f, map_id := ⋯, map_comp := ⋯ }
Map WithInitial
with respect to a functor F : C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
A natural isomorphism between the functor map (𝟭 C)
and 𝟭 (WithInitial C)
.
Equations
- One or more equations did not get rendered due to their size.
A natural isomorphism between the functor map (F ⋙ G)
and map F ⋙ map G
.
Equations
- One or more equations did not get rendered due to their size.
From a natural transformation of functors C ⥤ D
, the induced natural transformation
of functors WithInitial C ⥤ WithInitial D
.
Equations
- One or more equations did not get rendered due to their size.
The prelax functor from Cat
to Cat
defined with WithInitial
.
Equations
- One or more equations did not get rendered due to their size.
The pseudofunctor from Cat
to Cat
defined with WithInitial
.
Equations
- One or more equations did not get rendered due to their size.
Equations
- CategoryTheory.WithInitial.instUniqueHomStar = { default := PUnit.unit, uniq := ⋯ }
- CategoryTheory.WithInitial.instUniqueHomStar = { default := PUnit.unit, uniq := ⋯ }
The isomorphism between star and an abstract initial object of WithInitial C
Lift a functor F : C ⥤ D
to WithInitial C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
The isomorphism between incl ⋙ lift F _ _
with F
.
Equations
- One or more equations did not get rendered due to their size.
The isomorphism between (lift F _ _).obj WithInitial.star
with Z
.
Equations
The uniqueness of lift
.
Equations
- One or more equations did not get rendered due to their size.
A variant of lift
with Z
an initial object.
Equations
- CategoryTheory.WithInitial.liftToInitial F hZ = CategoryTheory.WithInitial.lift F (fun (_x : C) => hZ.to (F.obj _x)) ⋯
A variant of incl_lift
with Z
an initial object.
Equations
- CategoryTheory.WithInitial.inclLiftToInitial F hZ = CategoryTheory.WithInitial.inclLift F (fun (_x : C) => hZ.to (F.obj _x)) ⋯
A variant of lift_unique
with Z
an initial object.
Equations
- CategoryTheory.WithInitial.liftToInitialUnique F hZ G h hG = CategoryTheory.WithInitial.liftUnique F (fun (_z : C) => hZ.to (F.obj _z)) ⋯ G h hG ⋯
A functor WithInitial C ⥤ D
can be seen as an element of the comma category
Comma (const C) (𝟭 (C ⥤ D))
.
Equations
- One or more equations did not get rendered due to their size.
A morphism of functors WithInitial C ⥤ D
gives a morphism between the associated comma
objects.
Equations
- CategoryTheory.WithInitial.mkCommaMorphism η = { left := η.app CategoryTheory.WithInitial.star, right := CategoryTheory.whiskerLeft CategoryTheory.WithInitial.incl η, w := ⋯ }
An element of the comma category Comma (Functor.const C) (𝟭 (C ⥤ D))
can be seen as a
functor WithInitial C ⥤ D
.
Equations
- CategoryTheory.WithInitial.ofCommaObject c = CategoryTheory.WithInitial.lift c.right (fun (x : C) => c.hom.app x) ⋯
A morphism in Comma (Functor.const C) (𝟭 (C ⥤ D))
gives a morphism between the associated
functors WithInitial C ⥤ D
.
Equations
- One or more equations did not get rendered due to their size.
The category of functors WithInitial C ⥤ D
is equivalent to the category
Comma (const C) (𝟭 (C ⥤ D))
.
Equations
- One or more equations did not get rendered due to their size.
The opposite category of WithTerminal C
is equivalent to WithInitial Cᵒᵖ
.
Equations
- One or more equations did not get rendered due to their size.
The opposite category of WithInitial C
is equivalent to WithTerminal Cᵒᵖ
.
Equations
- One or more equations did not get rendered due to their size.