Factor out objects
This commit is contained in:
parent
181bd1af53
commit
4e7b350188
|
@ -156,7 +156,7 @@ module _ {ℓ ℓ' : Level} (unprovable : IsCategory (RawCat ℓ ℓ')) where
|
||||||
RawProduct.proj₁ rawProduct = P.proj₁
|
RawProduct.proj₁ rawProduct = P.proj₁
|
||||||
RawProduct.proj₂ rawProduct = P.proj₂
|
RawProduct.proj₂ rawProduct = P.proj₂
|
||||||
|
|
||||||
isProduct : IsProduct Catℓ rawProduct
|
isProduct : IsProduct Catℓ _ _ rawProduct
|
||||||
IsProduct.isProduct isProduct = P.isProduct
|
IsProduct.isProduct isProduct = P.isProduct
|
||||||
|
|
||||||
product : Product Catℓ ℂ 𝔻
|
product : Product Catℓ ℂ 𝔻
|
||||||
|
|
|
@ -70,7 +70,7 @@ module _ {ℓ : Level} where
|
||||||
RawProduct.proj₁ rawProduct = Data.Product.proj₁
|
RawProduct.proj₁ rawProduct = Data.Product.proj₁
|
||||||
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
|
IsProduct.isProduct isProduct {X = X} f g
|
||||||
= (f &&& g) , lem {0X = X} f g
|
= (f &&& g) , lem {0X = X} f g
|
||||||
|
|
||||||
|
|
|
@ -10,14 +10,15 @@ module _ {ℓa ℓb : Level} (ℂ : Category ℓa ℓb) where
|
||||||
|
|
||||||
open Category ℂ
|
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
|
no-eta-equality
|
||||||
field
|
field
|
||||||
obj : Object
|
obj : Object
|
||||||
proj₁ : ℂ [ obj , A ]
|
proj₁ : ℂ [ obj , A ]
|
||||||
proj₂ : ℂ [ obj , B ]
|
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
|
open RawProduct raw public
|
||||||
field
|
field
|
||||||
isProduct : ∀ {X : Object} (x₁ : ℂ [ X , A ]) (x₂ : ℂ [ X , B ])
|
isProduct : ∀ {X : Object} (x₁ : ℂ [ X , A ]) (x₂ : ℂ [ X , B ])
|
||||||
|
@ -28,10 +29,10 @@ module _ {ℓa ℓb : Level} (ℂ : Category ℓa ℓb) where
|
||||||
→ ℂ [ X , obj ]
|
→ ℂ [ X , obj ]
|
||||||
_P[_×_] π₁ π₂ = P.proj₁ (isProduct π₁ π₂)
|
_P[_×_] π₁ π₂ = P.proj₁ (isProduct π₁ π₂)
|
||||||
|
|
||||||
record Product (A B : Object) : Set (ℓa ⊔ ℓb) where
|
record Product : Set (ℓa ⊔ ℓb) where
|
||||||
field
|
field
|
||||||
raw : RawProduct A B
|
raw : RawProduct
|
||||||
isProduct : IsProduct {A} {B} raw
|
isProduct : IsProduct raw
|
||||||
|
|
||||||
open IsProduct isProduct public
|
open IsProduct isProduct public
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue