Make parameters explicit

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-08 10:22:21 +01:00
parent fae492a1e3
commit faf4c54188
3 changed files with 11 additions and 9 deletions

View file

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

View file

@ -64,15 +64,17 @@ module _ { : Level} where
lem : proj₁ Function.∘′ (f &&& g) f × proj₂ Function.∘′ (f &&& g) g
proj₁ lem = refl
proj₂ lem = refl
rawProduct : RawProduct { = 𝓢} 0A 0B
rawProduct : RawProduct 𝓢 0A 0B
RawProduct.obj rawProduct = 0A×0B
RawProduct.proj₁ rawProduct = Data.Product.proj₁
RawProduct.proj₂ rawProduct = Data.Product.proj₂
isProduct : IsProduct 𝓢 rawProduct
IsProduct.isProduct isProduct {X = X} f g
= (f &&& g) , lem {0X = X} f g
product : Product { = 𝓢} 0A 0B
product : Product 𝓢 0A 0B
Product.raw product = rawProduct
Product.isProduct product = isProduct

View file

@ -9,14 +9,14 @@ open import Cat.Category hiding (module Propositionality)
open Category
module _ {a b : Level} where
record RawProduct { : Category a b} (A B : Object ) : Set (a b) where
record RawProduct ( : Category a b) (A B : Object ) : Set (a b) where
no-eta-equality
field
obj : Object
proj₁ : [ obj , A ]
proj₂ : [ obj , B ]
record IsProduct ( : Category a b) {A B : Object } (raw : RawProduct { = } A B) : Set (a b) where
record IsProduct ( : Category a b) {A B : Object } (raw : RawProduct A B) : Set (a b) where
open RawProduct raw public
field
isProduct : {X : Object } (x₁ : [ X , A ]) (x₂ : [ X , B ])
@ -27,16 +27,16 @@ module _ {a b : Level} where
[ X , obj ]
_P[_×_] π₁ π₂ = P.proj₁ (isProduct π₁ π₂)
record Product { : Category a b} (A B : Object ) : Set (a b) where
record Product ( : Category a b) (A B : Object ) : Set (a b) where
field
raw : RawProduct { = } A B
raw : RawProduct A B
isProduct : IsProduct {A} {B} raw
open IsProduct isProduct public
record HasProducts ( : Category a b) : Set (a b) where
field
product : (A B : Object ) Product { = } A B
product : (A B : Object ) Product A B
module _ (A B : Object ) where
open Product (product A B)