Prove propositionality for IsMonad

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-02 13:31:46 +01:00
parent c4e3625746
commit b079f5e426
2 changed files with 11 additions and 6 deletions

View file

@ -194,7 +194,7 @@ record IsCategory {a b : Level} ( : RawCategory a b) : Set (lsuc
--
-- Proves that all projections of `IsCategory` are mere propositions as well as
-- `IsCategory` itself being a mere proposition.
module _ {a b : Level} {C : RawCategory a b} where
module Propositionality {a b : Level} {C : RawCategory a b} where
open RawCategory C
module _ ( : IsCategory C) where
open IsCategory using (isAssociative ; arrowsAreSets ; isIdentity ; Univalent)

View file

@ -8,7 +8,7 @@ open import Data.Product
open import Cubical
open import Cubical.NType.Properties using (lemPropF)
open import Cat.Category hiding (propIsAssociative ; propIsIdentity)
open import Cat.Category
open import Cat.Category.Functor as F
open import Cat.Category.NaturalTransformation
open import Cat.Categories.Fun
@ -375,10 +375,15 @@ module Kleisli {a b : Level} ( : Category a b) where
module _ (raw : RawMonad) where
open RawMonad raw
postulate
propIsIdentity : isProp IsIdentity
propIsIdentity x y i = .arrowsAreSets _ _ x y i
propIsNatural : isProp IsNatural
propIsNatural x y i = λ f
.arrowsAreSets _ _ (x f) (y f) i
propIsDistributive : isProp IsDistributive
propIsDistributive x y i = λ g f
.arrowsAreSets _ _ (x g f) (y g f) i
open IsMonad
propIsMonad : (raw : _) isProp (IsMonad raw)
IsMonad.isIdentity (propIsMonad raw x y i)