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