Skip to content

Commit 30658a5

Browse files
authored
fix whitespace, add more lemmas for univalence
1 parent 35c2601 commit 30658a5

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

Cubical/Categories/Dagger/Properties.agda

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ private variable
1717
ℓ ℓ' : Level
1818

1919
module _ (CDagCat : DagCat ℓ ℓ') where
20-
open DagCat CDagCat
21-
open Category C
20+
open DagCat CDagCat renaming (cat to C)
2221
open areInv
23-
22+
2423
private variable
2524
x y z w : ob
2625

@@ -48,7 +47,7 @@ module _ (CDagCat : DagCat ℓ ℓ') where
4847
†IsosAreIsos fiso = isiso (f †) (fiso .sec) (fiso .ret)
4948

5049
†Of†MonIs†Epi : is†Monic f is†Epic (f †)
51-
†Of†MonIs†Epi fmon =
50+
†Of†MonIs†Epi fmon =
5251
f † † ⋆ f † ≡⟨ congL _⋆_ (†-invol f) ⟩
5352
f ⋆ f † ≡⟨ fmon ⟩
5453
id ∎
@@ -60,7 +59,7 @@ module _ (CDagCat : DagCat ℓ ℓ') where
6059
id ∎
6160

6261
†Pres†Iso : is†Iso f is†Iso (f †)
63-
†Pres†Iso fiso .sec = †Of†MonIs†Epi (fiso .ret)
62+
†Pres†Iso fiso .sec = †Of†MonIs†Epi (fiso .ret)
6463
†Pres†Iso fiso .ret = †Of†EpiIs†Mon (fiso .sec)
6564

6665
†MonicsArePIsos : is†Monic f is†PIso f
@@ -75,9 +74,9 @@ module _ (CDagCat : DagCat ℓ ℓ') where
7574
f ⋆ f † ⋆ f ≡⟨ congR _⋆_ fepi ⟩
7675
f ⋆ id ≡⟨ ⋆IdR f ⟩
7776
f ∎
78-
77+
7978
†PresPIso : is†PIso f is†PIso (f †)
80-
†PresPIso fp =
79+
†PresPIso fp =
8180
f † ⋆ f † † ⋆ f † ≡⟨ congR _⋆_ (sym (†-seq f (f †))) ⟩
8281
f † ⋆ (f ⋆ f †) † ≡⟨ sym (†-seq (f ⋆ (f †)) f) ⟩
8382
((f ⋆ f †) ⋆ f) † ≡⟨ cong _† (⋆Assoc f (f †) f) ⟩
@@ -97,13 +96,13 @@ module _ (CDagCat : DagCat ℓ ℓ') where
9796
†CatIso x y = Σ[ f ∈ Hom[ x , y ] ] is†Iso f
9897

9998
idIs†Mon : is†Monic (id {x = x})
100-
idIs†Mon =
99+
idIs†Mon =
101100
id ⋆ id † ≡⟨ ⋆IdL (id †) ⟩
102101
id † ≡⟨ †-id ⟩
103102
id ∎
104103

105104
seqIs†Mon : (f : Hom[ x , y ]) (g : Hom[ y , z ]) is†Monic f is†Monic g is†Monic (f ⋆ g)
106-
seqIs†Mon f g fmon gmon =
105+
seqIs†Mon f g fmon gmon =
107106
(f ⋆ g) ⋆ (f ⋆ g) † ≡⟨ congR _⋆_ (†-seq f g) ⟩
108107
(f ⋆ g) ⋆ g † ⋆ f † ≡⟨ ⋆Assoc f g ((g †) ⋆ (f †)) ⟩
109108
f ⋆ g ⋆ g † ⋆ f † ≡⟨ congR _⋆_ (sym (⋆Assoc g (g †) (f †))) ⟩
@@ -113,7 +112,7 @@ module _ (CDagCat : DagCat ℓ ℓ') where
113112
id ∎
114113

115114
idIs†Epi : is†Epic (id {x = x})
116-
idIs†Epi =
115+
idIs†Epi =
117116
id † ⋆ id ≡⟨ ⋆IdR (id †) ⟩
118117
id † ≡⟨ †-id ⟩
119118
id ∎
@@ -154,10 +153,19 @@ module _ (CDagCat : DagCat ℓ ℓ') where
154153
record is†Univalent : Type (ℓ-max ℓ ℓ') where
155154
field
156155
univ : isEquiv (pathTo†Iso {x} {y})
157-
156+
157+
univEquiv : (x ≡ y) ≃ †CatIso x y
158+
univEquiv = pathTo†Iso , univ
159+
158160
†IsoToPath : †CatIso x y x ≡ y
159161
†IsoToPath = invIsEq univ
160162

163+
†IsoToPath-id : †IsoToPath id†Iso ≡ refl {x = x}
164+
†IsoToPath-id =
165+
†IsoToPath id†Iso ≡⟨ cong †IsoToPath (sym pathTo†Iso-refl) ⟩
166+
†IsoToPath (pathTo†Iso refl) ≡⟨ retIsEq univ refl ⟩
167+
refl ∎
168+
161169
makeIs†Univalent : (†IsoToPath : {x y} †CatIso x y x ≡ y)
162170
( {x} †IsoToPath id†Iso ≡ refl {x = x})
163171
( {x y} (f : †CatIso x y) pathTo†Iso (†IsoToPath f) .fst ≡ f .fst)
@@ -167,7 +175,7 @@ module _ (CDagCat : DagCat ℓ ℓ') where
167175
private -- This should be in the library
168176
isPropAreInv : {f} {g : Hom[ y , x ]} isProp (areInv C f g)
169177
isPropAreInv a b i .sec = isSetHom _ _ (a .sec) (b .sec) i
170-
isPropAreInv a b i .ret = isSetHom _ _ (a .ret) (b .ret) i
178+
isPropAreInv a b i .ret = isSetHom _ _ (a .ret) (b .ret) i
171179

172180
iso : TypeIso.Iso (x ≡ y) (†CatIso x y)
173181
iso .TypeIso.Iso.fun = pathTo†Iso
@@ -178,5 +186,5 @@ module _ (CDagCat : DagCat ℓ ℓ') where
178186
†IsoToPath id†Iso ≡⟨ †IsoToPath-id ⟩
179187
refl ∎
180188
)
181-
189+
182190

0 commit comments

Comments
 (0)