2015-04-25 04:20:59 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2015 Jakob von Raumer. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Authors: Floris van Doorn, Jakob von Raumer
|
|
|
|
-/
|
|
|
|
|
2015-10-23 05:12:34 +00:00
|
|
|
import .functor.basic
|
2015-04-25 04:20:59 +00:00
|
|
|
|
|
|
|
open is_trunc eq
|
|
|
|
|
|
|
|
namespace category
|
|
|
|
structure strict_precategory [class] (ob : Type) extends precategory ob :=
|
|
|
|
mk' :: (is_hset_ob : is_hset ob)
|
|
|
|
|
|
|
|
attribute strict_precategory.is_hset_ob [instance]
|
|
|
|
|
|
|
|
definition strict_precategory.mk [reducible] {ob : Type} (C : precategory ob)
|
|
|
|
(H : is_hset ob) : strict_precategory ob :=
|
|
|
|
precategory.rec_on C strict_precategory.mk' H
|
|
|
|
|
|
|
|
structure Strict_precategory : Type :=
|
|
|
|
(carrier : Type)
|
|
|
|
(struct : strict_precategory carrier)
|
|
|
|
|
|
|
|
attribute Strict_precategory.struct [instance] [coercion]
|
|
|
|
|
|
|
|
definition Strict_precategory.to_Precategory [coercion] [reducible]
|
|
|
|
(C : Strict_precategory) : Precategory :=
|
2015-11-11 19:32:05 +00:00
|
|
|
Precategory.mk (Strict_precategory.carrier C) _
|
2015-04-25 04:20:59 +00:00
|
|
|
|
|
|
|
open functor
|
|
|
|
|
2015-10-02 23:54:27 +00:00
|
|
|
-- TODO: move to constructions.cat?
|
|
|
|
definition precategory_strict_precategory [constructor] : precategory Strict_precategory :=
|
|
|
|
precategory.mk (λ A B, A ⇒ B)
|
|
|
|
(λ A B C G F, G ∘f F)
|
|
|
|
(λ A, 1)
|
|
|
|
(λ A B C D, functor.assoc)
|
|
|
|
(λ A B, functor.id_left)
|
|
|
|
(λ A B, functor.id_right)
|
2015-04-25 04:20:59 +00:00
|
|
|
|
2015-10-02 23:54:27 +00:00
|
|
|
definition Precategory_strict_precategory [constructor] := precategory.Mk precategory_strict_precategory
|
2015-04-25 04:20:59 +00:00
|
|
|
|
|
|
|
namespace ops
|
2015-10-02 23:54:27 +00:00
|
|
|
abbreviation Cat := Precategory_strict_precategory
|
2015-04-25 04:20:59 +00:00
|
|
|
end ops
|
|
|
|
|
|
|
|
end category
|