feat(hott/algebra) add structure for strict precategories
This commit is contained in:
parent
10c0b3a3ca
commit
4e790057b3
2 changed files with 46 additions and 24 deletions
|
@ -102,6 +102,7 @@ namespace functor
|
||||||
|
|
||||||
set_option apply.class_instance false
|
set_option apply.class_instance false
|
||||||
-- "functor C D" is equivalent to a certain sigma type
|
-- "functor C D" is equivalent to a certain sigma type
|
||||||
|
set_option unifier.max_steps 38500
|
||||||
protected definition sigma_char :
|
protected definition sigma_char :
|
||||||
(Σ (to_fun_ob : C → D)
|
(Σ (to_fun_ob : C → D)
|
||||||
(to_fun_hom : Π ⦃a b : C⦄, hom a b → hom (to_fun_ob a) (to_fun_ob b)),
|
(to_fun_hom : Π ⦃a b : C⦄, hom a b → hom (to_fun_ob a) (to_fun_ob b)),
|
||||||
|
@ -227,27 +228,3 @@ namespace functor
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
end functor
|
end functor
|
||||||
|
|
||||||
namespace category
|
|
||||||
open functor
|
|
||||||
|
|
||||||
--TODO: make this a structure
|
|
||||||
definition precat_strict_precat : precategory (Σ (C : Precategory), is_hset C) :=
|
|
||||||
precategory.mk (λ a b, functor a.1 b.1)
|
|
||||||
(λ a b, @functor.is_hset_functor a.1 b.1 b.2)
|
|
||||||
(λ a b c g f, functor.compose g f)
|
|
||||||
(λ a, functor.id)
|
|
||||||
(λ a b c d h g f, !functor.assoc)
|
|
||||||
(λ a b f, !functor.id_left)
|
|
||||||
(λ a b f, !functor.id_right)
|
|
||||||
|
|
||||||
definition Precat_of_strict_cats := precategory.Mk precat_strict_precat
|
|
||||||
|
|
||||||
namespace ops
|
|
||||||
|
|
||||||
abbreviation SPreCat := Precat_of_strict_cats
|
|
||||||
--attribute precat_strict_precat [instance]
|
|
||||||
|
|
||||||
end ops
|
|
||||||
|
|
||||||
end category
|
|
||||||
|
|
45
hott/algebra/precategory/strict.hlean
Normal file
45
hott/algebra/precategory/strict.hlean
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
import .basic .functor
|
||||||
|
|
||||||
|
open category is_trunc eq function sigma sigma.ops
|
||||||
|
|
||||||
|
namespace category
|
||||||
|
structure strict_precategory[class] (ob : Type) extends precategory ob :=
|
||||||
|
(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 :=
|
||||||
|
Precategory.mk (Strict_precategory.carrier C) C
|
||||||
|
|
||||||
|
open functor
|
||||||
|
|
||||||
|
definition precat_strict_precat : precategory Strict_precategory :=
|
||||||
|
precategory.mk (λ a b, functor a b)
|
||||||
|
(λ a b, @functor.is_hset_functor a b _)
|
||||||
|
(λ a b c g f, functor.compose g f)
|
||||||
|
(λ a, functor.id)
|
||||||
|
(λ a b c d h g f, !functor.assoc)
|
||||||
|
(λ a b f, !functor.id_left)
|
||||||
|
(λ a b f, !functor.id_right)
|
||||||
|
|
||||||
|
definition Precat_of_strict_precats := precategory.Mk precat_strict_precat
|
||||||
|
|
||||||
|
namespace ops
|
||||||
|
|
||||||
|
abbreviation SPreCat := Precat_of_strict_precats
|
||||||
|
--attribute precat_strict_precat [instance]
|
||||||
|
|
||||||
|
end ops
|
||||||
|
|
||||||
|
end category
|
Loading…
Reference in a new issue