Use hLevels in Fam

This commit is contained in:
Frederik Hanghøj Iversen 2018-02-23 13:36:54 +01:00
parent 3d0916f448
commit a321a9c8b2

View file

@ -3,9 +3,11 @@ module Cat.Categories.Fam where
open import Agda.Primitive open import Agda.Primitive
open import Data.Product open import Data.Product
open import Cubical
import Function import Function
open import Cubical
open import Cubical.Universe
open import Cat.Category open import Cat.Category
open import Cat.Equality open import Cat.Equality
@ -13,38 +15,35 @@ open Equality.Data.Product
module _ (a b : Level) where module _ (a b : Level) where
private private
Obj' = Σ[ A Set a ] (A Set b) Object = Σ[ hA hSet {a} ] (proj₁ hA hSet {b})
Arr : Obj' Obj' Set (a b) Arr : Object Object Set (a b)
Arr (A , B) (A' , B') = Σ[ f (A A') ] ({x : A} B x B' (f x)) Arr ((A , _) , B) ((A' , _) , B') = Σ[ f (A A') ] ({x : A} proj₁ (B x) proj₁ (B' (f x)))
one : {o : Obj'} Arr o o 𝟙 : {A : Object} Arr A A
proj₁ one = λ x x proj₁ 𝟙 = λ x x
proj₂ one = λ b b proj₂ 𝟙 = λ b b
_∘_ : {a b c : Obj'} Arr b c Arr a b Arr a c _∘_ : {a b c : Object} Arr b c Arr a b Arr a c
(g , g') (f , f') = g Function.∘ f , g' Function.∘ f' (g , g') (f , f') = g Function.∘ f , g' Function.∘ f'
_⟨_∘_⟩ : {a b : Obj'} (c : Obj') Arr b c Arr a b Arr a c
c g f = _∘_ {c = c} g f
module _ {A B C D : Obj'} {f : Arr A B} {g : Arr B C} {h : Arr C D} where
isAssociative : (D h C g f ) D D h g f
isAssociative = Σ≡ refl refl
module _ {A B : Obj'} {f : Arr A B} where
isIdentity : B f one f × B one {B} f f
isIdentity = (Σ≡ refl refl) , Σ≡ refl refl
RawFam : RawCategory (lsuc (a b)) (a b) RawFam : RawCategory (lsuc (a b)) (a b)
RawFam = record RawFam = record
{ Object = Obj' { Object = Object
; Arrow = Arr ; Arrow = Arr
; 𝟙 = one ; 𝟙 = λ { {A} 𝟙 {A = A}}
; _∘_ = λ {a b c} _∘_ {a} {b} {c} ; _∘_ = λ {a b c} _∘_ {a} {b} {c}
} }
open RawCategory RawFam hiding (Object ; 𝟙)
isAssociative : IsAssociative
isAssociative = Σ≡ refl refl
isIdentity : IsIdentity λ { {A} 𝟙 {A} }
isIdentity = (Σ≡ refl refl) , Σ≡ refl refl
instance instance
isCategory : IsCategory RawFam isCategory : IsCategory RawFam
isCategory = record isCategory = record
{ isAssociative = λ {A} {B} {C} {D} {f} {g} {h} isAssociative {D = D} {f} {g} {h} { isAssociative = λ {A} {B} {C} {D} {f} {g} {h} isAssociative {A} {B} {C} {D} {f} {g} {h}
; isIdentity = λ {A} {B} {f} isIdentity {A} {B} {f = f} ; isIdentity = λ {A} {B} {f} isIdentity {A} {B} {f = f}
; arrowsAreSets = {!!} ; arrowsAreSets = {!!}
; univalent = {!!} ; univalent = {!!}