Decrease line-width

This commit is contained in:
Frederik Hanghøj Iversen 2018-05-08 14:50:45 +02:00
parent 10c3c36305
commit 4e7506f06a

View file

@ -658,14 +658,9 @@ module Opposite {a b : Level} where
open IsPreCategory isPreCategory
module _ {A B : .Object} where
k : TypeIsomorphism (.idToIso A B)
k = toIso _ _ .univalent
open Σ k renaming (fst to η ; snd to inv-η)
open AreInverses {f = .idToIso A B} {η} inv-η
genericly : {a b c : Level} {a : Set a} {b : Set b} {c : Set c}
a × b × c b × a × c
genericly (a , b , c) = (b , a , c)
open Σ (toIso _ _ (.univalent {A} {B}))
renaming (fst to idToIso* ; snd to inv*)
open AreInverses {f = .idToIso A B} {idToIso*} inv*
shuffle : A B A .≊ B
shuffle (f , g , inv) = g , f , inv
@ -673,37 +668,38 @@ module Opposite {a b : Level} where
shuffle~ : A .≊ B A B
shuffle~ (f , g , inv) = g , f , inv
-- Shouldn't be necessary to use `arrowsAreSets` here, but we have it,
-- so why not?
lem : (p : A B) idToIso A B p shuffle~ (.idToIso A B p)
lem p = isoEq refl
ζ : A B A B
ζ = η shuffle
isoToId* : A B A B
isoToId* = idToIso* shuffle
-- inv : AreInverses (.idToIso A B) f
inv-ζ : AreInverses (idToIso A B) ζ
-- recto-verso : .idToIso A B <<< f ≡ idFun (A .≊ B)
inv-ζ = record
{ fst = funExt (λ x begin
(ζ idToIso A B) x ≡⟨⟩
(η shuffle idToIso A B) x ≡⟨ cong (λ φ φ x) (cong (λ φ η shuffle φ) (funExt lem))
(η shuffle shuffle~ .idToIso A B) x ≡⟨⟩
(η .idToIso A B) x ≡⟨ (λ i verso-recto i x)
inv : AreInverses (idToIso A B) isoToId*
inv =
( funExt (λ x begin
(isoToId* idToIso A B) x
≡⟨⟩
(idToIso* shuffle idToIso A B) x
≡⟨ cong (λ φ φ x) (cong (λ φ idToIso* shuffle φ) (funExt lem))
(idToIso* shuffle shuffle~ .idToIso A B) x
≡⟨⟩
(idToIso* .idToIso A B) x
≡⟨ (λ i verso-recto i x)
x )
; snd = funExt (λ x begin
(idToIso A B η shuffle) x ≡⟨ cong (λ φ φ x) (cong (λ φ φ η shuffle) (funExt lem))
(shuffle~ .idToIso A B η shuffle) x ≡⟨ cong (λ φ φ x) (cong (λ φ shuffle~ φ shuffle) recto-verso)
(shuffle~ shuffle) x ≡⟨⟩
, funExt (λ x begin
(idToIso A B idToIso* shuffle) x
≡⟨ cong (λ φ φ x) (cong (λ φ φ idToIso* shuffle) (funExt lem))
(shuffle~ .idToIso A B idToIso* shuffle) x
≡⟨ cong (λ φ φ x) (cong (λ φ shuffle~ φ shuffle) recto-verso)
(shuffle~ shuffle) x
≡⟨⟩
x )
}
h : TypeIsomorphism (idToIso A B)
h = ζ , inv-ζ
)
isCategory : IsCategory opRaw
IsCategory.isPreCategory isCategory = isPreCategory
IsCategory.univalent isCategory = univalenceFromIsomorphism h
IsCategory.univalent isCategory
= univalenceFromIsomorphism (isoToId* , inv)
opposite : Category a b
Category.raw opposite = opRaw