More stuff about opposite being an involution

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-05 16:10:27 +01:00
parent b26ea18257
commit 7f4a8a65b8

View file

@ -155,7 +155,7 @@ module Univalence {a b : Level} ( : RawCategory a b) where
-- --
record IsCategory {a b : Level} ( : RawCategory a b) : Set (lsuc (a b)) where record IsCategory {a b : Level} ( : RawCategory a b) : Set (lsuc (a b)) where
open RawCategory public open RawCategory public
open Univalence public open Univalence public
field field
isAssociative : IsAssociative isAssociative : IsAssociative
isIdentity : IsIdentity 𝟙 isIdentity : IsIdentity 𝟙
@ -301,23 +301,42 @@ module _ {a b : Level} ( : Category a b) where
-- flipped. -- flipped.
module Opposite {a b : Level} where module Opposite {a b : Level} where
module _ ( : Category a b) where module _ ( : Category a b) where
open Category
private private
module = Category
opRaw : RawCategory a b opRaw : RawCategory a b
RawCategory.Object opRaw = Object RawCategory.Object opRaw = .Object
RawCategory.Arrow opRaw = Function.flip Arrow RawCategory.Arrow opRaw = Function.flip .Arrow
RawCategory.𝟙 opRaw = 𝟙 RawCategory.𝟙 opRaw = .𝟙
RawCategory._∘_ opRaw = Function.flip _∘_ RawCategory._∘_ opRaw = Function.flip ._∘_
opIsCategory : IsCategory opRaw open RawCategory opRaw
IsCategory.isAssociative opIsCategory = sym isAssociative open Univalence opRaw
IsCategory.isIdentity opIsCategory = swap isIdentity
IsCategory.arrowsAreSets opIsCategory = arrowsAreSets isIdentity : IsIdentity 𝟙
IsCategory.univalent opIsCategory = {!!} isIdentity = swap .isIdentity
module _ {A B : .Object} where
univalent : isEquiv (A B) (A B)
(id-to-iso (swap .isIdentity) A B)
fst (univalent iso) = flipFiber (fst (.univalent (flipIso iso)))
where
flipIso : A B B .≅ A
flipIso (f , f~ , iso) = f , f~ , swap iso
flipFiber
: fiber (.id-to-iso .isIdentity B A) (flipIso iso)
fiber ( id-to-iso isIdentity A B) iso
flipFiber (eq , eqIso) = sym eq , {!!}
snd (univalent iso) = {!!}
isCategory : IsCategory opRaw
IsCategory.isAssociative isCategory = sym .isAssociative
IsCategory.isIdentity isCategory = isIdentity
IsCategory.arrowsAreSets isCategory = .arrowsAreSets
IsCategory.univalent isCategory = univalent
opposite : Category a b opposite : Category a b
raw opposite = opRaw Category.raw opposite = opRaw
Category.isCategory opposite = opIsCategory Category.isCategory opposite = isCategory
-- As demonstrated here a side-effect of having no-eta-equality on constructors -- As demonstrated here a side-effect of having no-eta-equality on constructors
-- means that we need to pick things apart to show that things are indeed -- means that we need to pick things apart to show that things are indeed