Make the category an index of PreCategory
This commit is contained in:
parent
23b562a873
commit
36d92c7ceb
|
@ -163,6 +163,5 @@ IsPreCategory.isAssociative isPreCategory = funExt is-isAssociative
|
||||||
IsPreCategory.isIdentity isPreCategory = funExt ident-l , funExt ident-r
|
IsPreCategory.isIdentity isPreCategory = funExt ident-l , funExt ident-r
|
||||||
IsPreCategory.arrowsAreSets isPreCategory = {!!}
|
IsPreCategory.arrowsAreSets isPreCategory = {!!}
|
||||||
|
|
||||||
Rel : PreCategory _ _
|
Rel : PreCategory RawRel
|
||||||
PreCategory.raw Rel = RawRel
|
|
||||||
PreCategory.isPreCategory Rel = isPreCategory
|
PreCategory.isPreCategory Rel = isPreCategory
|
||||||
|
|
|
@ -142,16 +142,8 @@ record RawCategory (ℓa ℓb : Level) : Set (lsuc (ℓa ⊔ ℓb)) where
|
||||||
-- This is not so straight-forward so you can assume it
|
-- This is not so straight-forward so you can assume it
|
||||||
postulate from[Contr] : Univalent[Contr] → Univalent
|
postulate from[Contr] : Univalent[Contr] → Univalent
|
||||||
|
|
||||||
-- | The mere proposition of being a category.
|
module _ {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) where
|
||||||
--
|
record IsPreCategory : Set (lsuc (ℓa ⊔ ℓb)) where
|
||||||
-- Also defines a few lemmas:
|
|
||||||
--
|
|
||||||
-- iso-is-epi : Isomorphism f → Epimorphism {X = X} f
|
|
||||||
-- iso-is-mono : Isomorphism f → Monomorphism {X = X} f
|
|
||||||
--
|
|
||||||
-- Sans `univalent` this would be what is referred to as a pre-category in
|
|
||||||
-- [HoTT].
|
|
||||||
record IsPreCategory {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) : Set (lsuc (ℓa ⊔ ℓb)) where
|
|
||||||
open RawCategory ℂ public
|
open RawCategory ℂ public
|
||||||
field
|
field
|
||||||
isAssociative : IsAssociative
|
isAssociative : IsAssociative
|
||||||
|
@ -281,23 +273,22 @@ record IsPreCategory {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) : Set (ls
|
||||||
preorder≅ : Preorder _ _ _
|
preorder≅ : Preorder _ _ _
|
||||||
preorder≅ = record { Carrier = Object ; _≈_ = _≡_ ; _∼_ = _≅_ ; isPreorder = isPreorder }
|
preorder≅ = record { Carrier = Object ; _≈_ = _≡_ ; _∼_ = _≅_ ; isPreorder = isPreorder }
|
||||||
|
|
||||||
record PreCategory (ℓa ℓb : Level) : Set (lsuc (ℓa ⊔ ℓb)) where
|
record PreCategory : Set (lsuc (ℓa ⊔ ℓb)) where
|
||||||
field
|
field
|
||||||
raw : RawCategory ℓa ℓb
|
isPreCategory : IsPreCategory
|
||||||
isPreCategory : IsPreCategory raw
|
|
||||||
open IsPreCategory isPreCategory public
|
open IsPreCategory isPreCategory public
|
||||||
|
|
||||||
-- Definition 9.6.1 in [HoTT]
|
-- Definition 9.6.1 in [HoTT]
|
||||||
record StrictCategory (ℓa ℓb : Level) : Set (lsuc (ℓa ⊔ ℓb)) where
|
record StrictCategory : Set (lsuc (ℓa ⊔ ℓb)) where
|
||||||
field
|
field
|
||||||
preCategory : PreCategory ℓa ℓb
|
preCategory : PreCategory
|
||||||
open PreCategory preCategory
|
open PreCategory preCategory
|
||||||
field
|
field
|
||||||
objectsAreSets : isSet Object
|
objectsAreSets : isSet Object
|
||||||
|
|
||||||
record IsCategory {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) : Set (lsuc (ℓa ⊔ ℓb)) where
|
record IsCategory : Set (lsuc (ℓa ⊔ ℓb)) where
|
||||||
field
|
field
|
||||||
isPreCategory : IsPreCategory ℂ
|
isPreCategory : IsPreCategory
|
||||||
open IsPreCategory isPreCategory public
|
open IsPreCategory isPreCategory public
|
||||||
field
|
field
|
||||||
univalent : Univalent
|
univalent : Univalent
|
||||||
|
@ -387,7 +378,6 @@ record IsCategory {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) : Set (lsuc
|
||||||
res : Xi ≡ Yi
|
res : Xi ≡ Yi
|
||||||
res i = p0 i , p1 i
|
res i = p0 i , p1 i
|
||||||
|
|
||||||
-- | Propositionality of being a category
|
|
||||||
module _ {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) where
|
module _ {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) where
|
||||||
open RawCategory ℂ
|
open RawCategory ℂ
|
||||||
open Univalence
|
open Univalence
|
||||||
|
@ -442,10 +432,6 @@ module _ {ℓa ℓb : Level} (ℂ : RawCategory ℓa ℓb) where
|
||||||
IsCategory.isPreCategory (done i)
|
IsCategory.isPreCategory (done i)
|
||||||
= propIsPreCategory X.isPreCategory Y.isPreCategory i
|
= propIsPreCategory X.isPreCategory Y.isPreCategory i
|
||||||
IsCategory.univalent (done i) = eqUni i
|
IsCategory.univalent (done i) = eqUni i
|
||||||
-- IsCategory.isAssociative (done i) = Prop.propIsAssociative X.isAssociative Y.isAssociative i
|
|
||||||
-- IsCategory.isIdentity (done i) = isIdentity i
|
|
||||||
-- IsCategory.arrowsAreSets (done i) = Prop.propArrowIsSet X.arrowsAreSets Y.arrowsAreSets i
|
|
||||||
-- IsCategory.univalent (done i) = eqUni i
|
|
||||||
|
|
||||||
propIsCategory : isProp (IsCategory ℂ)
|
propIsCategory : isProp (IsCategory ℂ)
|
||||||
propIsCategory = done
|
propIsCategory = done
|
||||||
|
|
Loading…
Reference in a new issue