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
|
|
|
|
|
|
|
|
Initial category
|
|
|
|
-/
|
|
|
|
|
|
|
|
import .indiscrete
|
|
|
|
|
|
|
|
open functor is_trunc eq
|
|
|
|
|
|
|
|
namespace category
|
|
|
|
|
|
|
|
definition initial_precategory [constructor] : precategory empty :=
|
|
|
|
indiscrete_precategory empty
|
|
|
|
|
|
|
|
definition Initial_precategory [constructor] : Precategory :=
|
|
|
|
precategory.Mk initial_precategory
|
|
|
|
|
|
|
|
notation 0 := Initial_precategory
|
|
|
|
definition zero_op : 0ᵒᵖ = 0 := idp
|
|
|
|
|
|
|
|
definition initial_functor [constructor] (C : Precategory) : 0 ⇒ C :=
|
|
|
|
functor.mk (λx, empty.elim x)
|
|
|
|
(λx y f, empty.elim x)
|
|
|
|
(λx, empty.elim x)
|
|
|
|
(λx y z g f, empty.elim x)
|
|
|
|
|
2015-10-02 23:54:27 +00:00
|
|
|
definition is_contr_initial_functor [instance] (C : Precategory) : is_contr (0 ⇒ C) :=
|
2015-09-22 17:11:33 +00:00
|
|
|
is_contr.mk (initial_functor C)
|
|
|
|
begin
|
|
|
|
intro F, fapply functor_eq,
|
|
|
|
{ intro x, exact empty.elim x},
|
|
|
|
{ intro x y f, exact empty.elim x}
|
|
|
|
end
|
|
|
|
|
|
|
|
definition initial_functor_op (C : Precategory)
|
2015-10-23 05:12:34 +00:00
|
|
|
: (initial_functor C)ᵒᵖᶠ = initial_functor Cᵒᵖ :=
|
2015-09-22 17:11:33 +00:00
|
|
|
by apply @is_hprop.elim (0 ⇒ Cᵒᵖ)
|
|
|
|
|
|
|
|
definition initial_functor_comp {C D : Precategory} (F : C ⇒ D)
|
|
|
|
: F ∘f initial_functor C = initial_functor D :=
|
|
|
|
by apply @is_hprop.elim (0 ⇒ D)
|
|
|
|
|
|
|
|
end category
|