Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
(** * Universal objects *)Require Import Basics.Contractible.Require Import Category.Core Category.Morphisms.Set Implicit Arguments.Generalizable All Variables.LocalOpen Scope category_scope.LocalOpen Scope morphism_scope.(** ** Definition of "unique up to unique isomorphism" *)Definitionunique_up_to_unique_isomorphism (C : PreCategory) (P : C -> Type) :=
forallx (_ : P x) x' (_ : P x'),
{ c : Contr (morphism C x x')
| IsIsomorphism (center (morphism C x x')) }.(** ** Terminal objects *)(** A terminal object is an object with a unique morphism from every other object. *)NotationIsTerminalObject C x :=
(forallx' : object C, Contr (morphism C x' x)).ClassTerminalObject (C : PreCategory) :=
{
object_terminal : C;
isterminal_object_terminal :: IsTerminalObject C object_terminal
}.Coercionobject_terminal : TerminalObject >-> object.(** ** Initial objects *)(** An initial object is an object with a unique morphism from every other object. *)NotationIsInitialObject C x :=
(forallx' : object C, Contr (morphism C x x')).ClassInitialObject (C : PreCategory) :=
{
object_initial : C;
isinitial_object_initial :: IsInitialObject C object_initial
}.Coercionobject_initial : InitialObject >-> object.Arguments unique_up_to_unique_isomorphism [C] P.(** ** Canonical morphisms *)(** The unique morphism from an initial object. *)Definitionmorphism_from_initial {C : PreCategory} {I : InitialObject C}
(Y : object C)
: morphism C I Y
:= center (morphism C I Y).(** The unique morphism to a terminal object. *)Definitionmorphism_to_terminal {C : PreCategory} {T : TerminalObject C}
(X : object C)
: morphism C X T
:= center (morphism C X T).(** ** Initial and terminal objects are unique up to unique isomorphism *)SectionCategoryObjectsTheorems.VariableC : PreCategory.Ltacunique :=
repeatfirst [ intro
| exists_
| exists (center (morphism C _ _))
| apply path_contr ].(** The terminal object is unique up to unique isomorphism. *)
C: PreCategory
unique_up_to_unique_isomorphism (funx : C => IsTerminalObject C x)
C: PreCategory
unique_up_to_unique_isomorphism (funx : C => IsTerminalObject C x)
unique.Qed.(** The initial object is unique up to unique isomorphism. *)
C: PreCategory
unique_up_to_unique_isomorphism (funx : C => IsInitialObject C x)
C: PreCategory
unique_up_to_unique_isomorphism (funx : C => IsInitialObject C x)
unique.Qed.(** Any two morphisms from an initial object are equal. *)Definitioninitial_morphism_unique {IX : object C}
`{IsInitialObject C I} (f g : morphism C I X)
: f = g
:= path_contr f g.(** Any two morphisms to a terminal object are equal. *)Definitionterminal_morphism_unique {TX : object C}
`{IsTerminalObject C T} (f g : morphism C X T)
: f = g
:= path_contr f g.EndCategoryObjectsTheorems.