Skip to content

Commit

Permalink
feat(category_theory/limits/terminal): constructor for is_terminal (#…
Browse files Browse the repository at this point in the history
…6929)




Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
  • Loading branch information
semorrison and semorrison committed Mar 29, 2021
1 parent cf56f88 commit d2e5976
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/category_theory/limits/shapes/terminal.lean
Expand Up @@ -33,6 +33,14 @@ abbreviation is_terminal (X : C) := is_limit (as_empty_cone X)
/-- `X` is initial if the cocone it induces on the empty diagram is colimiting. -/
abbreviation is_initial (X : C) := is_colimit (as_empty_cocone X)

/-- An object `Y` is terminal if for every `X` there is a unique morphism `X ⟶ Y`. -/
def is_terminal.of_unique (Y : C) [h : Π X : C, unique (X ⟶ Y)] : is_terminal Y :=
{ lift := λ s, (h s.X).default }

/-- An object `X` is initial if for every `Y` there is a unique morphism `X ⟶ Y`. -/
def is_initial.of_unique (X : C) [h : Π Y : C, unique (X ⟶ Y)] : is_initial X :=
{ desc := λ s, (h s.X).default }

/-- Give the morphism to a terminal object from any other. -/
def is_terminal.from {X : C} (t : is_terminal X) (Y : C) : Y ⟶ X :=
t.lift (as_empty_cone Y)
Expand Down

0 comments on commit d2e5976

Please sign in to comment.