Minimize dependency on category of categories

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-05 10:35:33 +01:00
parent 8f8800cb67
commit 77006011d3

View file

@ -65,7 +65,6 @@ module _ ( ' : Level) where
module _ { ' : Level} (unprovable : IsCategory (RawCat ')) where module _ { ' : Level} (unprovable : IsCategory (RawCat ')) where
module _ ( 𝔻 : Category ') where module _ ( 𝔻 : Category ') where
private private
Catt = Cat ' unprovable
:Object: = Object × Object 𝔻 :Object: = Object × Object 𝔻
:Arrow: : :Object: :Object: Set ' :Arrow: : :Object: :Object: Set '
:Arrow: (c , d) (c' , d') = [ c , c' ] × 𝔻 [ d , d' ] :Arrow: (c , d) (c' , d') = [ c , c' ] × 𝔻 [ d , d' ]
@ -105,19 +104,19 @@ module _ { ' : Level} (unprovable : IsCategory (RawCat ')) where
:product: : Category ' :product: : Category '
Category.raw :product: = :rawProduct: Category.raw :product: = :rawProduct:
proj₁ : Catt [ :product: , ] proj₁ : Functor :product:
proj₁ = record proj₁ = record
{ raw = record { func* = fst ; func→ = fst } { raw = record { func* = fst ; func→ = fst }
; isFunctor = record { isIdentity = refl ; isDistributive = refl } ; isFunctor = record { isIdentity = refl ; isDistributive = refl }
} }
proj₂ : Catt [ :product: , 𝔻 ] proj₂ : Functor :product: 𝔻
proj₂ = record proj₂ = record
{ raw = record { func* = snd ; func→ = snd } { raw = record { func* = snd ; func→ = snd }
; isFunctor = record { isIdentity = refl ; isDistributive = refl } ; isFunctor = record { isIdentity = refl ; isDistributive = refl }
} }
module _ {X : Object Catt} (x₁ : Catt [ X , ]) (x₂ : Catt [ X , 𝔻 ]) where module _ {X : Category '} (x₁ : Functor X ) (x₂ : Functor X 𝔻) where
x : Functor X :product: x : Functor X :product:
x = record x = record
{ raw = record { raw = record
@ -133,29 +132,31 @@ module _ { ' : Level} (unprovable : IsCategory (RawCat ')) where
open module x = Functor x₁ open module x = Functor x₁
open module x = Functor x₂ open module x = Functor x₂
isUniqL : Catt [ proj₁ x ] x₁ isUniqL : F[ proj₁ x ] x₁
isUniqL = Functor≡ eq* eq→ isUniqL = Functor≡ eq* eq→
where where
eq* : (Catt [ proj₁ x ]) .func* x₁ .func* eq* : (F[ proj₁ x ]) .func* x₁ .func*
eq* = refl eq* = refl
eq→ : (λ i {A : Object X} {B : Object X} X [ A , B ] [ eq* i A , eq* i B ]) eq→ : (λ i {A : Object X} {B : Object X} X [ A , B ] [ eq* i A , eq* i B ])
[ (Catt [ proj₁ x ]) .func→ x₁ .func→ ] [ (F[ proj₁ x ]) .func→ x₁ .func→ ]
eq→ = refl eq→ = refl
isUniqR : Catt [ proj₂ x ] x₂ isUniqR : F[ proj₂ x ] x₂
isUniqR = Functor≡ refl refl isUniqR = Functor≡ refl refl
isUniq : Catt [ proj₁ x ] x₁ × Catt [ proj₂ x ] x₂ isUniq : F[ proj₁ x ] x₁ × F[ proj₂ x ] x₂
isUniq = isUniqL , isUniqR isUniq = isUniqL , isUniqR
uniq : ∃![ x ] (Catt [ proj₁ x ] x₁ × Catt [ proj₂ x ] x₂) uniq : ∃![ x ] (F[ proj₁ x ] x₁ × F[ proj₂ x ] x₂)
uniq = x , isUniq uniq = x , isUniq
Cat = Cat ' unprovable
instance instance
isProduct : IsProduct Catt proj₁ proj₂ isProduct : IsProduct Cat proj₁ proj₂
isProduct = uniq isProduct = uniq
product : Product { = Catt} 𝔻 product : Product { = Cat} 𝔻
product = record product = record
{ obj = :product: { obj = :product:
; proj₁ = proj₁ ; proj₁ = proj₁