2015-09-22 17:11:33 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2015 Floris van Doorn. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Authors: Floris van Doorn
|
|
|
|
|
|
|
|
Terminal category
|
|
|
|
-/
|
|
|
|
|
|
|
|
import .indiscrete
|
|
|
|
|
|
|
|
open functor is_trunc unit eq
|
|
|
|
|
|
|
|
namespace category
|
|
|
|
|
|
|
|
definition terminal_precategory [constructor] : precategory unit :=
|
|
|
|
indiscrete_precategory unit
|
|
|
|
|
|
|
|
definition Terminal_precategory [constructor] : Precategory :=
|
|
|
|
precategory.Mk terminal_precategory
|
|
|
|
|
|
|
|
notation 1 := Terminal_precategory
|
|
|
|
definition one_op : 1ᵒᵖ = 1 := idp
|
|
|
|
|
|
|
|
definition terminal_functor [constructor] (C : Precategory) : C ⇒ 1 :=
|
|
|
|
functor.mk (λx, star)
|
|
|
|
(λx y f, star)
|
|
|
|
(λx, idp)
|
|
|
|
(λx y z g f, idp)
|
|
|
|
|
|
|
|
definition is_contr_functor_one [instance] (C : Precategory) : is_contr (C ⇒ 1) :=
|
|
|
|
is_contr.mk (terminal_functor C)
|
|
|
|
begin
|
|
|
|
intro F, fapply functor_eq,
|
|
|
|
{ intro x, apply @is_hprop.elim unit},
|
|
|
|
{ intro x y f, apply @is_hprop.elim unit}
|
|
|
|
end
|
|
|
|
|
|
|
|
definition terminal_functor_op (C : Precategory)
|
2015-10-23 05:12:34 +00:00
|
|
|
: (terminal_functor C)ᵒᵖᶠ = terminal_functor Cᵒᵖ := idp
|
2015-09-22 17:11:33 +00:00
|
|
|
|
|
|
|
definition terminal_functor_comp {C D : Precategory} (F : C ⇒ D)
|
|
|
|
: (terminal_functor D) ∘f F = terminal_functor C := idp
|
|
|
|
|
2015-10-22 22:41:55 +00:00
|
|
|
definition point [constructor] (C : Precategory) (c : C) : 1 ⇒ C :=
|
2015-09-22 17:11:33 +00:00
|
|
|
functor.mk (λx, c)
|
|
|
|
(λx y f, id)
|
|
|
|
(λx, idp)
|
|
|
|
(λx y z g f, !id_id⁻¹)
|
|
|
|
|
|
|
|
-- we need id_id in the declaration of precategory to make this to hold definitionally
|
2015-10-23 05:12:34 +00:00
|
|
|
definition point_op (C : Precategory) (c : C) : (point C c)ᵒᵖᶠ = point Cᵒᵖ c := idp
|
2015-09-22 17:11:33 +00:00
|
|
|
|
|
|
|
definition point_comp {C D : Precategory} (F : C ⇒ D) (c : C)
|
|
|
|
: F ∘f point C c = point D (F c) := idp
|
|
|
|
|
|
|
|
end category
|