Factor out objects

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-08 10:28:05 +01:00
parent 181bd1af53
commit 4e7b350188
3 changed files with 23 additions and 22 deletions

View file

@ -156,7 +156,7 @@ module _ { ' : Level} (unprovable : IsCategory (RawCat ')) where
RawProduct.proj₁ rawProduct = P.proj₁
RawProduct.proj₂ rawProduct = P.proj₂
isProduct : IsProduct Cat rawProduct
isProduct : IsProduct Cat _ _ rawProduct
IsProduct.isProduct isProduct = P.isProduct
product : Product Cat 𝔻

View file

@ -70,7 +70,7 @@ module _ { : Level} where
RawProduct.proj₁ rawProduct = Data.Product.proj₁
RawProduct.proj₂ rawProduct = Data.Product.proj₂
isProduct : IsProduct 𝓢 rawProduct
isProduct : IsProduct 𝓢 _ _ rawProduct
IsProduct.isProduct isProduct {X = X} f g
= (f &&& g) , lem {0X = X} f g

View file

@ -10,14 +10,15 @@ module _ {a b : Level} ( : Category a b) where
open Category
record RawProduct (A B : Object) : Set (a b) where
module _ (A B : Object) where
record RawProduct : Set (a b) where
no-eta-equality
field
obj : Object
proj₁ : [ obj , A ]
proj₂ : [ obj , B ]
record IsProduct {A B : Object} (raw : RawProduct A B) : Set (a b) where
record IsProduct (raw : RawProduct) : Set (a b) where
open RawProduct raw public
field
isProduct : {X : Object} (x₁ : [ X , A ]) (x₂ : [ X , B ])
@ -28,10 +29,10 @@ module _ {a b : Level} ( : Category a b) where
[ X , obj ]
_P[_×_] π₁ π₂ = P.proj₁ (isProduct π₁ π₂)
record Product (A B : Object) : Set (a b) where
record Product : Set (a b) where
field
raw : RawProduct A B
isProduct : IsProduct {A} {B} raw
raw : RawProduct
isProduct : IsProduct raw
open IsProduct isProduct public