Rename IsProduct.isProduct to IsProduct.ump

[WIP]: Also some stuff about propositionality for products.
This commit is contained in:
Frederik Hanghøj Iversen 2018-03-14 10:23:23 +01:00
parent 7065455712
commit 091e77b583
3 changed files with 64 additions and 9 deletions

View file

@ -167,7 +167,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 IsProduct.ump isProduct = P.isProduct
product : Product Cat 𝔻 product : Product Cat 𝔻
Product.raw product = rawProduct Product.raw product = rawProduct

View file

@ -208,7 +208,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 IsProduct.ump isProduct {X = X} f g
= (f &&& g) , lem {0X = X} f g = (f &&& g) , lem {0X = X} f g
product : Product 𝓢 0A 0B product : Product 𝓢 0A 0B

View file

@ -3,6 +3,8 @@ module Cat.Category.Product where
open import Agda.Primitive open import Agda.Primitive
open import Cubical open import Cubical
open import Cubical.NType.Properties using (lemPropF)
open import Data.Product as P hiding (_×_ ; proj₁ ; proj₂) open import Data.Product as P hiding (_×_ ; proj₁ ; proj₂)
open import Cat.Category hiding (module Propositionality) open import Cat.Category hiding (module Propositionality)
@ -24,13 +26,13 @@ module _ {a b : Level} ( : Category a b) where
record IsProduct (raw : RawProduct) : 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} (f : [ X , A ]) (g : [ X , B ]) ump : {X : Object} (f : [ X , A ]) (g : [ X , B ])
∃![ f×g ] ( [ proj₁ f×g ] f P.× [ proj₂ f×g ] g) ∃![ f×g ] ( [ proj₁ f×g ] f P.× [ proj₂ f×g ] g)
-- | Arrow product -- | Arrow product
_P[_×_] : {X} (π₁ : [ X , A ]) (π₂ : [ X , B ]) _P[_×_] : {X} (π₁ : [ X , A ]) (π₂ : [ X , B ])
[ X , object ] [ X , object ]
_P[_×_] π₁ π₂ = P.proj₁ (isProduct π₁ π₂) _P[_×_] π₁ π₂ = P.proj₁ (ump π₁ π₂)
record Product : Set (a b) where record Product : Set (a b) where
field field
@ -59,10 +61,63 @@ module _ {a b : Level} ( : Category a b) where
× [ g snd ] × [ g snd ]
] ]
module Propositionality {a b : Level} { : Category a b} {A B : Category.Object } where module _ {a b : Level} { : Category a b} {A B : Category.Object } where
-- TODO I'm not sure this is actually provable. Check with Thierry. private
propProduct : isProp (Product A B) open Category
propProduct = {!!} module _ (raw : RawProduct A B) where
module _ (x y : IsProduct A B raw) where
private
module x = IsProduct x
module y = IsProduct y
module _ {X : Object} (f : [ X , A ]) (g : [ X , B ]) where
prodAux : x.ump f g y.ump f g
prodAux = {!!}
propIsProduct' : x y
propIsProduct' i = record { ump = λ f g prodAux f g i }
propIsProduct : isProp (IsProduct A B raw)
propIsProduct = propIsProduct'
Product≡ : {x y : Product A B} (Product.raw x Product.raw y) x y
Product≡ {x} {y} p i = record { raw = p i ; isProduct = q i }
where
q : (λ i IsProduct A B (p i)) [ Product.isProduct x Product.isProduct y ]
q = lemPropF propIsProduct p
module _ {a b : Level} { : Category a b} {A B : Category.Object } where
open Category
private
module _ (x y : HasProducts ) where
private
module x = HasProducts x
module y = HasProducts y
module _ (A B : Object) where
module pX = Product (x.product A B)
module pY = Product (y.product A B)
objEq : pX.object pY.object
objEq = {!!}
proj₁Eq : (λ i [ objEq i , A ]) [ pX.proj₁ pY.proj₁ ]
proj₁Eq = {!!}
proj₂Eq : (λ i [ objEq i , B ]) [ pX.proj₂ pY.proj₂ ]
proj₂Eq = {!!}
rawEq : pX.raw pY.raw
RawProduct.object (rawEq i) = objEq i
RawProduct.proj₁ (rawEq i) = {!!}
RawProduct.proj₂ (rawEq i) = {!!}
isEq : (λ i IsProduct A B (rawEq i)) [ pX.isProduct pY.isProduct ]
isEq = {!!}
appEq : x.product A B y.product A B
appEq = Product≡ rawEq
productEq : x.product y.product
productEq i = λ A B appEq A B i
propHasProducts' : x y
propHasProducts' i = record { product = productEq i }
propHasProducts : isProp (HasProducts ) propHasProducts : isProp (HasProducts )
propHasProducts = {!!} propHasProducts = propHasProducts'