Skip to content

Commit e6e22bc

Browse files
authored
get rid of biimp (#476)
Just gets rid of the biimplication type since it's now basically needless verbosity
1 parent 50c4193 commit e6e22bc

File tree

15 files changed

+28
-190
lines changed

15 files changed

+28
-190
lines changed

src/1Lab/Biimp.lagda.md

Lines changed: 0 additions & 143 deletions
This file was deleted.

src/1Lab/Equiv.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ for which constructing equivalences is easy are the [[propositions]]. If
846846
$P$ and $Q$ are propositions, then any map $P \to P$ (resp. $Q \to Q$)
847847
must be homotopic to the identity, and consequently any pair of
848848
functions $P \to Q$ and $Q \to P$ is a pair of inverses. Put another
849-
way, any [[biimplication]] between propositions is an equivalence.
849+
way, any biimplication between propositions is an equivalence.
850850

851851
```agda
852852
biimp-is-equiv : (f : P → Q) → (Q → P) → is-equiv f

src/1Lab/Prelude.agda

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ open import 1Lab.Function.Embedding public
3030
open import 1Lab.Function.Reasoning public
3131
open import 1Lab.Equiv.HalfAdjoint public
3232

33-
open import 1Lab.Biimp public
34-
3533
open import 1Lab.Function.Surjection public
3634

3735
open import 1Lab.Univalence public

src/1Lab/Resizing.lagda.md

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ open import 1Lab.Reflection using (arg ; typeError)
1111
open import 1Lab.Univalence
1212
open import 1Lab.Inductive
1313
open import 1Lab.HLevel
14-
open import 1Lab.Biimp
1514
open import 1Lab.Equiv
1615
open import 1Lab.Path
1716
open import 1Lab.Type
@@ -93,36 +92,25 @@ instance
9392
```
9493
-->
9594

96-
We can also prove a univalence principle for `Ω`{.Agda}: if
97-
$A, B : \Omega$ are [[logically equivalent|logical-equivalence]],
98-
then they are equal.
95+
We can also prove a univalence principle for `Ω`{.Agda}: if $A, B :
96+
\Omega$ are logically equivalent, then they are equal.
9997

10098
```agda
101-
Ω-ua : {A B : Ω} → ∣ A ∣ ∣ B ∣ → A ≡ B
102-
Ω-ua {A} {B} f i .∣_∣ = ua (prop-ext! (Biimp.to f) (Biimp.from f)) i
103-
Ω-ua {A} {B} f i .is-tr =
104-
is-prop→pathp (λ i → is-prop-is-prop {A = ua (prop-ext! (Biimp.to f) (Biimp.from f)) i})
99+
Ω-ua : {A B : Ω} → (∣ A ∣ ∣ B ∣) → (∣ B ∣ → ∣ A ∣) → A ≡ B
100+
Ω-ua {A} {B} f g i .∣_∣ = ua (prop-ext! f g) i
101+
Ω-ua {A} {B} f g i .is-tr =
102+
is-prop→pathp (λ i → is-prop-is-prop {A = ua (prop-ext! f g) i})
105103
(A .is-tr) (B .is-tr) i
106104
107105
instance abstract
108106
H-Level-Ω : ∀ {n} → H-Level Ω (2 + n)
109107
H-Level-Ω = basic-instance 2 $ retract→is-hlevel 2
110108
(λ r → el ∣ r ∣ (r .is-tr))
111109
(λ r → el ∣ r ∣ (r .is-tr))
112-
(λ x → Ω-ua id)
110+
(λ x → Ω-ua id id)
113111
(n-Type-is-hlevel {lzero} 1)
114112
```
115113

116-
<!--
117-
```agda
118-
instance
119-
Extensionality-Ω : Extensional Ω lzero
120-
Extensionality-Ω .Pathᵉ A B = ∣ A ∣ ↔ ∣ B ∣
121-
Extensionality-Ω .reflᵉ A = id↔
122-
Extensionality-Ω .idsᵉ = set-identity-system (λ _ _ → hlevel 1) Ω-ua
123-
```
124-
-->
125-
126114
The ``{.Agda} type former is a functor (in the handwavy sense that it
127115
supports a "map" operation), and can be projected from into propositions
128116
of any universe. These functions compute on `inc`{.Agda}s, as usual.
@@ -222,7 +210,7 @@ to-is-true
222210
: ∀ {P Q : Ω} ⦃ _ : H-Level ∣ Q ∣ 0 ⦄
223211
→ ∣ P ∣
224212
→ P ≡ Q
225-
to-is-true prf = Ω-ua (biimp (λ _ → hlevel 0 .centre) λ _ → prf)
213+
to-is-true prf = Ω-ua (λ _ → hlevel 0 .centre) λ _ → prf
226214
227215
tr-□ : ∀ {ℓ} {A : Type ℓ} → ∥ A ∥ → □ A
228216
tr-□ (inc x) = inc x
@@ -268,10 +256,6 @@ _→Ω_ : Ω → Ω → Ω
268256
∣ P →Ω Q ∣ = ∣ P ∣ → ∣ Q ∣
269257
(P →Ω Q) .is-tr = hlevel 1
270258
271-
_↔Ω_ : Ω → Ω → Ω
272-
∣ P ↔Ω Q ∣ = ∣ P ∣ ↔ ∣ Q ∣
273-
(P ↔Ω Q) .is-tr = hlevel 1
274-
275259
¬Ω_ : Ω → Ω
276260
¬Ω P = P →Ω ⊥Ω
277261
```

src/Cat/Allegory/Base.lagda.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ to show $R(x, y)$! Fortunately if we we set $\Id(x, a)$, then $R(x,
219219
y) \simeq R(a, y)$, and we're done.
220220

221221
```agda
222-
Rel ℓ .cat .idr {A} {B} R = ext λ x y → biimp
222+
Rel ℓ .cat .idr {A} {B} R = ext λ x y → Ω-ua
223223
(rec! (λ a b w → subst (λ e → ∣ R e y ∣) (sym b) w))
224224
(λ w → inc (x , inc refl , w))
225225
```
@@ -251,24 +251,24 @@ automatic proof search: that speaks to how contentful it is.</summary>
251251

252252
```agda
253253
Rel ℓ .cat .Hom-set x y = hlevel 2
254-
Rel ℓ .cat .idl R = ext λ x y → biimp
254+
Rel ℓ .cat .idl R = ext λ x y → Ω-ua
255255
(rec! λ z x~z z=y → subst (λ e → ∣ R x e ∣) z=y x~z)
256256
(λ w → inc (y , w , inc refl))
257257
258-
Rel ℓ .cat .assoc T S R = ext λ x y → biimp
258+
Rel ℓ .cat .assoc T S R = ext λ x y → Ω-ua
259259
(rec! λ a b r s t → inc (b , r , inc (a , s , t)))
260260
(rec! λ a r b s t → inc (b , inc (a , r , s) , t))
261261
262262
Rel ℓ .≤-thin = hlevel 1
263263
Rel ℓ .≤-refl x y w = w
264264
Rel ℓ .≤-trans x y p q z = y p q (x p q z)
265-
Rel ℓ .≤-antisym p q = ext λ x y → biimp (p x y) (q x y)
265+
Rel ℓ .≤-antisym p q = ext λ x y → Ω-ua (p x y) (q x y)
266266
267267
Rel ℓ ._◆_ f g a b = □-map (λ { (x , y , w) → x , g a x y , f x b w })
268268
269269
-- This is nice:
270270
Rel ℓ .dual R = refl
271-
Rel ℓ .dual-∘ = ext λ x y → biimp
271+
Rel ℓ .dual-∘ = ext λ x y → Ω-ua
272272
(□-map λ { (a , b , c) → a , c , b })
273273
(□-map λ { (a , b , c) → a , c , b })
274274
Rel ℓ .dual-≤ f≤g x y w = f≤g y x w

src/Cat/Diagram/Sieve.lagda.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,14 @@ contravariant, this means that the assignment $U \mapsto
163163
```agda
164164
abstract
165165
pullback-id : ∀ {c} {s : Sieve C c} → pullback C.id s ≡ s
166-
pullback-id {s = s} = ext λ h → biimp
166+
pullback-id {s = s} = ext λ h → Ω-ua
167167
(subst (_∈ s) (C.idl h))
168168
(subst (_∈ s) (sym (C.idl h)))
169169
170170
pullback-∘
171171
: ∀ {u v w} {f : C.Hom w v} {g : C.Hom v u} {R : Sieve C u}
172172
→ pullback (g C.∘ f) R ≡ pullback f (pullback g R)
173-
pullback-∘ {f = f} {g} {R = R} = ext λ h → biimp
173+
pullback-∘ {f = f} {g} {R = R} = ext λ h → Ω-ua
174174
(subst (_∈ R) (sym (C.assoc g f h)))
175175
(subst (_∈ R) (C.assoc g f h))
176176
```

src/Cat/Instances/Sheaves/Omega.lagda.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ actually agree on their intersection with $R$:
8282
sep {U} R {S , cS} {T , cT} α = ext λ {V} h →
8383
let
8484
rem₁ : S ∩S ⟦ R ⟧ ≡ T ∩S ⟦ R ⟧
85-
rem₁ = ext λ {V} h → biimp
85+
rem₁ = ext λ {V} h → Ω-ua
8686
(λ (h∈S , h∈R) → cT h (subst (J ∋_) (ap fst (α h h∈R)) (max (S .closed h∈S id))) , h∈R)
8787
(λ (h∈T , h∈R) → cS h (subst (J ∋_) (ap fst (sym (α h h∈R))) (max (T .closed h∈T id))) , h∈R)
8888
```
@@ -115,7 +115,7 @@ We omit the symmetric converse for brevity.
115115
-->
116116

117117
```agda
118-
in biimp (λ h∈S → cT h (rem₂' h∈S)) (λ h∈T → cS h (rem₃ h∈T))
118+
in Ω-ua (λ h∈S → cT h (rem₂' h∈S)) (λ h∈T → cS h (rem₃ h∈T))
119119
```
120120

121121
Now we have to show that a family $S$ of compatible closed sieves over a
@@ -152,7 +152,7 @@ are painful --- and entirely mechanical --- calculations.
152152

153153
```agda
154154
restrict : ∀ {V} (f : Hom V U) (hf : f ∈ R) → pullback f S' ≡ S .part f hf .fst
155-
restrict f hf = ext λ {V} h → biimp
155+
restrict f hf = ext λ {V} h → Ω-ua
156156
(rec! λ α →
157157
let
158158
step₁ : id ∈ S .part (f ∘ h ∘ id) (⟦ R ⟧ .closed hf (h ∘ id)) .fst

src/Cat/Site/Closure.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ sieve belongs to the saturation in at most one way.
280280
: ∀ {J : Coverage C ℓs} {U} {R S : Sieve C U}
281281
→ J ∋ R → J ∋ S → J ∋ (R ∩S S)
282282
∋-intersect {J = J} {R = R} {S = S} α β = local β
283-
(λ {V} f hf → subst (J ∋_) (ext (λ h → biimp (λ fhR → fhR , S .closed hf _) fst)) (pull f α))
283+
(λ {V} f hf → subst (J ∋_) (ext (λ h → Ω-ua (λ fhR → fhR , S .closed hf _) fst)) (pull f α))
284284
```
285285
-->
286286

src/Cat/Site/Instances/Atomic.lagda.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ proposition $P$ to the sieve which contains any $h$ iff $P$.
360360

361361
<!--
362362
```agda
363-
m1 .is-natural x y f = ext λ S cl → biimp
363+
m1 .is-natural x y f = ext λ S cl → Ω-ua
364364
(λ hf → cl id (inc (pullback id S , inc (y , f , subst (_∈ S) id-comm hf))))
365365
(λ hid → subst (_∈ S) id-comm-sym (S .closed hid f))
366366
@@ -377,7 +377,7 @@ direction is definitional, and the other is not much more complicated.
377377
ΩJ-is-constant : ΩJ cov Sh.≅ ΩJ'
378378
ΩJ-is-constant =
379379
let
380-
q = ext λ i X cl → Σ-prop-path! $ ext λ x → biimp
380+
q = ext λ i X cl → Σ-prop-path! $ ext λ x → Ω-ua
381381
(λ p → subst (_∈ X) (idl _) (X .closed p _))
382382
(λ p → cl id (inc (_ , inc (_ , _ , subst (_∈ X) id-comm (X .closed p id)))))
383383
in Sh.make-iso m1 m2 trivial! q

src/Cat/Site/Instances/Frame.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ computed *is* the pullback sieve.
8383
generate-∩
8484
: ∀ {U V} (h : V ≤ U) (S : Covering U)
8585
→ generate (∩-covering h S) ≡ pullback h (generate S)
86-
generate-∩ V≤U (I , f , p) = ext λ {W} W≤V → biimp
86+
generate-∩ V≤U (I , f , p) = ext λ {W} W≤V → Ω-ua
8787
(rec! λ i W≤fi∩V → inc (i , ≤-trans W≤fi∩V ∩≤l))
8888
(rec! λ i W≤fi → inc (i , ∩-universal _ W≤fi W≤V))
8989

src/Data/Partial/Base.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ part-ext
9090
→ (∀ xd yd → x .elt xd ≡ y .elt yd)
9191
→ x ≡ y
9292
part-ext to from p = Part-pathp refl
93-
(Ω-ua (biimp to from)) (funext-dep λ _ → p _ _)
93+
(Ω-ua to from) (funext-dep λ _ → p _ _)
9494
```
9595

9696
To close the initial definitions, if we have a partial element $x : \zap

src/Data/Power.lagda.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ propositions to each inhabitant of $X$.
6060
```agda
6161
ℙ-ext : {A B : ℙ X}
6262
→ A ⊆ B → B ⊆ A → A ≡ B
63-
ℙ-ext {A = A} {B = B} A⊆B B⊂A = funext λ x →
64-
Ω-ua (biimp (A⊆B x) (B⊂A x))
63+
ℙ-ext {A = A} {B = B} A⊆B B⊂A = funext λ x → Ω-ua (A⊆B x) (B⊂A x)
6564
```
6665

6766
## Lattice structure

src/Order/Frame.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Power-frame A .snd .has-top =
303303
Power-frame A .snd .⋃ k i = ∃Ω _ (λ j → k j i)
304304
Power-frame A .snd .⋃-lubs k = is-lub-pointwise _ _ λ _ →
305305
Props-has-lubs λ i → k i _
306-
Power-frame A .snd .⋃-distribl x f = ext λ i → biimp
306+
Power-frame A .snd .⋃-distribl x f = ext λ i → Ω-ua
307307
(rec! λ xi j j~i → inc (j , xi , j~i))
308308
(rec! λ j xi j~i → xi , inc (j , j~i))
309309
```

src/Order/Frame/Free.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Lower-sets-frame (P , L) = Lower-sets P , L↓-frame where
7979
L↓-frame .is-frame.has-top = Lower-sets-top P
8080
L↓-frame .is-frame.⋃ k = Lower-sets-cocomplete P k .Lub.lub
8181
L↓-frame .is-frame.⋃-lubs k = Lower-sets-cocomplete P k .Lub.has-lub
82-
L↓-frame .is-frame.⋃-distribl x f = ext λ arg → biimp
82+
L↓-frame .is-frame.⋃-distribl x f = ext λ arg → Ω-ua
8383
(rec! λ x≤a i fi≤a → inc (i , x≤a , fi≤a))
8484
(rec! λ i x≤a fi≤a → x≤a , inc (i , fi≤a))
8585
```

src/Order/Instances/Props.lagda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Props .Poset._≤_ P Q = ∣ P ∣ → ∣ Q ∣
4444
Props .Poset.≤-thin = hlevel 1
4545
Props .Poset.≤-refl x = x
4646
Props .Poset.≤-trans g f x = f (g x)
47-
Props .Poset.≤-antisym p q = ext (biimp p q)
47+
Props .Poset.≤-antisym p q = ext (Ω-ua p q)
4848
```
4949

5050
The poset of propositions a top and bottom element, as well as

0 commit comments

Comments
 (0)