Skip to content

Commit f717d46

Browse files
authored
Basic Order Theory (agda#1154)
* Add inverses to monoids/comm monoids * Add meets and joins to order properties * Rewrite isConnected and rename isStronglyConnected * Decidable total and linear orders imply discrete * Remove discrete requirement * Move decidable->discrete from toset to poset * Define binary meets/joins and prove properties * The negation of a linear order is a poset * Define bounds on a poset * Mild refactoring Rename preorder to proset; rename strict poset to quoset (quasiorder) and add strict orders as quasiorders with weak linearity * Remove unnecessary constructors * Define tight relations * Reintroduce constructors * Lattice basics * Distributive lattices * Replace compEquiv usages * Total orders are distributive pseudolattices * Add pseudolattice assumption to make more useful * Mappings on posets * Downsets and upsets are preserved * Defined complete lattices * Duals and closures * Embeddings form a complete lattice * Dual closures * Bicomplete subsets * Poset equivalences * Galois connections * Fix typo * Fix whitespace * Fix build failures * Move PosetDownset to where principalDownsets are * Fix build failures * Split mappings and subsets * Fix whitespace * Proofs regarding residuals and involutions * Cleaner proof
1 parent 2f085f5 commit f717d46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3900
-890
lines changed

Cubical/Algebra/CommMonoid/Properties.agda

+16
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,19 @@ module CommMonoidTheory (M' : CommMonoid ℓ) where
5757
commAssocSwap : (x y z w : M) (x · y) · (z · w) ≡ (x · z) · (y · w)
5858
commAssocSwap x y z w = ·Assoc (x · y) z w ∙∙ cong (_· w) (commAssocr x y z)
5959
∙∙ sym (·Assoc (x · z) y w)
60+
61+
hasInverse : (x : M) Type ℓ
62+
hasInverse x = Σ[ -x ∈ M ] -x · x ≡ ε
63+
64+
isPropHasInverse : x isProp (hasInverse x)
65+
isPropHasInverse x yinv zinv
66+
= Σ≡Prop (λ a is-set (a · x) ε)
67+
(PathPΣ (MonoidTheory.isPropHasInverse (CommMonoid→Monoid M') x
68+
(hasInverseToMonoid x yinv)
69+
(hasInverseToMonoid x zinv))
70+
.fst)
71+
where
72+
hasInverseToMonoid : x
73+
hasInverse x
74+
MonoidTheory.hasInverse (CommMonoid→Monoid M') x
75+
hasInverseToMonoid x (y , yinv) = y , yinv , ·Comm x y ∙ yinv

Cubical/Algebra/DistLattice/Downset.agda

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ open import Cubical.Algebra.Lattice
1616
open import Cubical.Algebra.DistLattice.Base
1717

1818
open import Cubical.Relation.Binary.Order.Poset
19+
open import Cubical.Relation.Binary.Order.Poset.Subset
1920

2021
open Iso
2122

Cubical/Algebra/Monoid/Base.agda

+10
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,13 @@ module MonoidTheory {ℓ} (M : Monoid ℓ) where
140140
(y · x) · z ≡⟨ congL _·_ left-inverse ⟩
141141
ε · z ≡⟨ ·IdL z ⟩
142142
z ∎
143+
144+
-- Added for its use in division rings
145+
hasInverse : (x : ⟨ M ⟩) Type ℓ
146+
hasInverse x = Σ[ -x ∈ ⟨ M ⟩ ] (-x · x ≡ ε) × (x · -x ≡ ε)
147+
148+
isPropHasInverse : x isProp (hasInverse x)
149+
isPropHasInverse x (y , invly , _) (z , _ , invrz)
150+
= Σ≡Prop (λ a isProp× (is-set (a · x) ε)
151+
(is-set (x · a) ε))
152+
(inv-lemma x y z invly invrz)

Cubical/AlgebraicGeometry/ZariskiLattice/Properties.agda

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ open import Cubical.Data.Nat using (ℕ)
1313
open import Cubical.Data.Sigma.Properties
1414
open import Cubical.Data.FinData
1515
open import Cubical.Relation.Binary.Order.Poset
16+
open import Cubical.Relation.Binary.Order.Poset.Subset
1617

1718
open import Cubical.Algebra.CommRing
1819
open import Cubical.Algebra.CommRing.Localisation

Cubical/Categories/Constructions/SubObject.agda

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ open import Cubical.Categories.Category
1111
open import Cubical.Categories.Functor
1212
open import Cubical.Categories.Morphism
1313

14-
open import Cubical.Relation.Binary.Order.Preorder
14+
open import Cubical.Relation.Binary.Order.Proset
1515

1616
open Category
1717

@@ -83,9 +83,9 @@ SliceHom.S-comm
8383
8484

8585
module _ (isSetCOb : isSet (C .ob)) where
86-
subObjCatPreorderStr : PreorderStr _ (SubObjCat .ob)
87-
PreorderStr._≲_ subObjCatPreorderStr x y = SubObjCat [ x , y ]
88-
IsPreorder.is-set (PreorderStr.isPreorder subObjCatPreorderStr) = isSetΣ (isSetSliceOb isSetCOb) λ x isProp→isSet (∈-isProp isSubObj x)
89-
IsPreorder.is-prop-valued (PreorderStr.isPreorder subObjCatPreorderStr) = isPropSubObjMor
90-
IsPreorder.is-refl (PreorderStr.isPreorder subObjCatPreorderStr) = isReflSubObjMor
91-
IsPreorder.is-trans (PreorderStr.isPreorder subObjCatPreorderStr) = isTransSubObjMor
86+
subObjCatPreorderStr : ProsetStr _ (SubObjCat .ob)
87+
ProsetStr._≲_ subObjCatPreorderStr x y = SubObjCat [ x , y ]
88+
IsProset.is-set (ProsetStr.isProset subObjCatPreorderStr) = isSetΣ (isSetSliceOb isSetCOb) λ x isProp→isSet (∈-isProp isSubObj x)
89+
IsProset.is-prop-valued (ProsetStr.isProset subObjCatPreorderStr) = isPropSubObjMor
90+
IsProset.is-refl (ProsetStr.isProset subObjCatPreorderStr) = isReflSubObjMor
91+
IsProset.is-trans (ProsetStr.isProset subObjCatPreorderStr) = isTransSubObjMor

Cubical/Data/Cardinal/Properties.agda

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ open import Cubical.Data.Sum as ⊎
2525
open import Cubical.Data.Unit
2626
open import Cubical.HITs.PropositionalTruncation as ∥₁
2727
open import Cubical.Relation.Binary.Base
28-
open import Cubical.Relation.Binary.Order.Preorder.Base
29-
open import Cubical.Relation.Binary.Order.Properties
28+
open import Cubical.Relation.Binary.Order.Proset
3029

3130
private
3231
variable
@@ -171,9 +170,9 @@ module _ where
171170
λ (A , _) (B , _) (C , _)
172171
∥₁.map2 λ A↪B B↪C compEmbedding B↪C A↪B
173172

174-
isPreorder≲ : IsPreorder {ℓ-suc ℓ} _≲_
173+
isPreorder≲ : IsProset {ℓ-suc ℓ} _≲_
175174
isPreorder≲
176-
= ispreorder isSetCard isPropValued≲ isRefl≲ isTrans≲
175+
= isproset isSetCard isPropValued≲ isRefl≲ isTrans≲
177176

178177
isLeast𝟘 : {ℓ} isLeast isPreorder≲ (Card {ℓ} , id↪ (Card {ℓ})) (𝟘 {ℓ})
179178
isLeast𝟘 = ∥₂.elim (λ x isProp→isSet (isPropValued≲ 𝟘 x))

Cubical/Data/Ordinal/Properties.agda

+5-5
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ propOrd {ℓ} P prop = P , (wosetstr _<_ (iswoset set prp well weak trans))
6060
𝟘 {ℓ} = propOrd (⊥* {ℓ}) (isProp⊥*)
6161
𝟙 {ℓ} = propOrd (Unit* {ℓ}) (isPropUnit*)
6262

63-
isLeast𝟘 : {ℓ} isLeast (isPoset→isPreorder isPoset≼) ((Ord {ℓ}) , (id↪ (Ord {ℓ}))) (𝟘 {ℓ})
63+
isLeast𝟘 : {ℓ} isLeast (isPoset→isProset isPoset≼) ((Ord {ℓ}) , (id↪ (Ord {ℓ}))) (𝟘 {ℓ})
6464
isLeast𝟘 _ = ⊥.elim* , (⊥.elim* , ⊥.elim*)
6565

6666
-- The successor of 𝟘 is 𝟙
@@ -144,8 +144,8 @@ suc≺ α = (inr tt*) , (eq , makeIsWosetEquiv eq eqsucα eqαsuc)
144144
eq = isoToEquiv rUnit*×Iso
145145

146146
eqα𝟙 : _
147-
eqα𝟙 (x , _) (y , _) (inl tt≺tt) = ⊥.rec (IsStrictPoset.is-irrefl
148-
(isWoset→isStrictPoset
147+
eqα𝟙 (x , _) (y , _) (inl tt≺tt) = ⊥.rec (IsQuoset.is-irrefl
148+
(isWoset→isQuoset
149149
(WosetStr.isWoset (str 𝟙)))
150150
tt* tt≺tt)
151151
eqα𝟙 (x , _) (y , _) (inr (_ , x≺y)) = x≺y
@@ -161,8 +161,8 @@ suc≺ α = (inr tt*) , (eq , makeIsWosetEquiv eq eqsucα eqαsuc)
161161

162162
eq𝟙α : _
163163
eq𝟙α (_ , x) (_ , y) (inr (_ , tt≺tt)) = ⊥.rec
164-
(IsStrictPoset.is-irrefl
165-
(isWoset→isStrictPoset
164+
(IsQuoset.is-irrefl
165+
(isWoset→isQuoset
166166
(WosetStr.isWoset (str 𝟙)))
167167
tt* tt≺tt)
168168
eq𝟙α (_ , x) (_ , y) (inl x≺y) = x≺y

Cubical/Data/Rationals/Order.agda

+34-26
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ module _ where
216216
isAsym< : isAsym _<_
217217
isAsym< = isIrrefl×isTrans→isAsym _<_ (isIrrefl< , isTrans<)
218218

219-
isStronglyConnected: isStronglyConnected _≤_
220-
isStronglyConnected=
219+
isTotal: isTotal _≤_
220+
isTotal=
221221
elimProp2 {P = λ a b (a ≤ b) ⊔′ (b ≤ a)}
222222
(λ _ _ isPropPropTrunc)
223223
λ a b ∣ lem a b ∣₁
@@ -230,12 +230,34 @@ module _ where
230230

231231
isConnected< : isConnected _<_
232232
isConnected< =
233-
elimProp2 {P = λ a b ¬ a ≡ b (a < b) ⊔′ (b < a)}
234-
(λ _ _ isProp→ isPropPropTrunc)
235-
λ a b ¬a≡b lem a b ¬a≡b ∣₁
233+
elimProp2 {P = λ a b (¬ a < b) × (¬ b < a) a ≡ b}
234+
(λ a b isProp→ (isSetℚ a b))
235+
lem
236236
where
237-
-- Agda can't infer the relation involved, so the signature looks a bit weird here
238-
lem : (a b : ℤ.ℤ × ℕ₊₁) ¬ [_] {R = _∼_} a ≡ [ b ] ([ a ] < [ b ]) ⊎ ([ b ] < [ a ])
237+
lem : (a b : ℤ.ℤ × ℕ₊₁) (¬ [ a ] < [ b ]) × (¬ [ b ] < [ a ]) [ a ] ≡ [ b ]
238+
lem (a , b) (c , d) (¬ad<cb , ¬cb<ad) with (a ℤ.· ℕ₊₁→ℤ d) ℤ.≟ (c ℤ.· ℕ₊₁→ℤ b)
239+
... | ℤ.lt ad<cb = ⊥.rec (¬ad<cb ad<cb)
240+
... | ℤ.eq ad≡cb = eq/ (a , b) (c , d) ad≡cb
241+
... | ℤ.gt cb<ad = ⊥.rec (¬cb<ad cb<ad)
242+
243+
isProp# : isPropValued _#_
244+
isProp# x y = isProp⊎ (isProp< x y) (isProp< y x) (isAsym< x y)
245+
246+
isIrrefl# : isIrrefl _#_
247+
isIrrefl# x (inl x<x) = isIrrefl< x x<x
248+
isIrrefl# x (inr x<x) = isIrrefl< x x<x
249+
250+
isSym# : isSym _#_
251+
isSym# _ _ (inl x<y) = inr x<y
252+
isSym# _ _ (inr y<x) = inl y<x
253+
254+
inequalityImplies# : inequalityImplies _#_
255+
inequalityImplies#
256+
= elimProp2 {P = λ a b ¬ a ≡ b a # b}
257+
(λ a b isProp→ (isProp# a b))
258+
lem
259+
where
260+
lem : (a b : ℤ.ℤ × ℕ₊₁) ¬ [_] {R = _∼_} a ≡ [ b ] [ a ] # [ b ]
239261
lem (a , b) (c , d) ¬a≡b with (a ℤ.· ℕ₊₁→ℤ d) ℤ.≟ (c ℤ.· ℕ₊₁→ℤ b)
240262
... | ℤ.lt ad<cb = inl ad<cb
241263
... | ℤ.eq ad≡cb = ⊥.rec (¬a≡b (eq/ (a , b) (c , d) ad≡cb))
@@ -250,20 +272,9 @@ module _ where
250272
lem : (a b c : ℤ.ℤ × ℕ₊₁) [ a ] < [ b ] ([ a ] < [ c ]) ⊔′ ([ c ] < [ b ])
251273
lem a b c a<b with discreteℚ [ a ] [ c ]
252274
... | yes a≡c = ∣ inr (subst (_< [ b ]) a≡c a<b) ∣₁
253-
... | no a≢c = ∥₁.map (⊎.map (λ a<c a<c)
254-
(λ c<a isTrans< [ c ] [ a ] [ b ] c<a a<b))
255-
(isConnected< [ a ] [ c ] a≢c)
256-
257-
isProp# : isPropValued _#_
258-
isProp# x y = isProp⊎ (isProp< x y) (isProp< y x) (isAsym< x y)
259-
260-
isIrrefl# : isIrrefl _#_
261-
isIrrefl# x (inl x<x) = isIrrefl< x x<x
262-
isIrrefl# x (inr x<x) = isIrrefl< x x<x
263-
264-
isSym# : isSym _#_
265-
isSym# _ _ (inl x<y) = inr x<y
266-
isSym# _ _ (inr y<x) = inl y<x
275+
... | no a≢c = ∣ ⊎.map (λ a<c a<c)
276+
(λ c<a isTrans< [ c ] [ a ] [ b ] c<a a<b)
277+
(inequalityImplies# [ a ] [ c ] a≢c) ∣₁
267278

268279
isCotrans# : isCotrans _#_
269280
isCotrans#
@@ -274,10 +285,7 @@ module _ where
274285
lem : (a b c : ℤ.ℤ × ℕ₊₁) [ a ] # [ b ] ([ a ] # [ c ]) ⊔′ ([ b ] # [ c ])
275286
lem a b c a#b with discreteℚ [ b ] [ c ]
276287
... | yes b≡c = ∣ inl (subst ([ a ] #_) b≡c a#b) ∣₁
277-
... | no b≢c = ∥₁.map inr (isConnected< [ b ] [ c ] b≢c)
278-
279-
inequalityImplies# : inequalityImplies _#_
280-
inequalityImplies# a b = ∥₁.rec (isProp# a b) (λ a#b a#b) ∘ (isConnected< a b)
288+
... | no b≢c = ∣ inr (inequalityImplies# [ b ] [ c ] b≢c) ∣₁
281289

282290
≤-+o : m n o m ≤ n m ℚ.+ o ≤ n ℚ.+ o
283291
≤-+o =
@@ -614,7 +622,7 @@ m ≟ n with discreteℚ m n
614622
... | yes m≡n = ≡Weaken≤ n m (sym m≡n)
615623
... | no m≢n = ∥₁.elim (λ _ isProp≤ n m)
616624
(⊎.rec (⊥.rec ∘ m≮n) (<Weaken≤ n m))
617-
(isConnected< m n m≢n)
625+
∣ inequalityImplies# m n m≢n ∣₁
618626

619627
0<+ : m n 0 < m ℚ.+ n (0 < m) ⊎ (0 < n)
620628
0<+ m n 0<m+n with <Dec 0 m | <Dec 0 n

Cubical/Foundations/Transport.agda

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ substSubst⁻ {x = x} {y = y} B p v = transportTransport⁻ {A = B x} {B = B y}
7474
substEquiv : {ℓ ℓ'} {A : Type ℓ} {a a' : A} (P : A Type ℓ') (p : a ≡ a') P a ≃ P a'
7575
substEquiv P p = (subst P p , isEquivTransport (λ i P (p i)))
7676

77+
subst2Equiv : {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {a a' : A} {b b' : B} (P : A B Type ℓ'')
78+
(p : a ≡ a') (q : b ≡ b') P a b ≃ P a' b'
79+
subst2Equiv P p q = (subst2 P p q , isEquivTransport (λ i P (p i) (q i)))
80+
7781
liftEquiv : {ℓ ℓ'} {A B : Type ℓ} (P : Type ℓ Type ℓ') (e : A ≃ B) P A ≃ P B
7882
liftEquiv P e = substEquiv P (ua e)
7983

Cubical/Functions/Embedding.agda

+74-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ open import Cubical.Foundations.Transport
1515
open import Cubical.Foundations.Univalence using (ua; univalence; pathToEquiv)
1616
open import Cubical.Functions.Fibration
1717

18+
open import Cubical.HITs.PropositionalTruncation.Base
19+
1820
open import Cubical.Data.Sigma
21+
open import Cubical.Data.Sum.Base
1922
open import Cubical.Functions.Fibration
2023
open import Cubical.Functions.FunExtEquiv
2124
open import Cubical.Relation.Nullary using (Discrete; yes; no)
@@ -24,11 +27,10 @@ open import Cubical.Structures.Axioms
2427
open import Cubical.Reflection.StrictEquiv
2528

2629
open import Cubical.Data.Nat using (ℕ; zero; suc)
27-
open import Cubical.Data.Sigma
2830

2931
private
3032
variable
31-
ℓ ℓ' ℓ'' : Level
33+
ℓ ℓ' ℓ'' ℓ''' : Level
3234
A B C : Type ℓ
3335
f h : A B
3436
w x : A
@@ -430,6 +432,14 @@ _≃Emb_ = EmbeddingIdentityPrinciple.f≃g
430432
EmbeddingIP : {B : Type ℓ} (f g : Embedding B ℓ') f ≃Emb g ≃ (f ≡ g)
431433
EmbeddingIP = EmbeddingIdentityPrinciple.EmbeddingIP
432434

435+
-- Using the above, we can show that the collection of embeddings forms a set
436+
isSetEmbedding : {B : Type ℓ} {ℓ' : Level} isSet (Embedding B ℓ')
437+
isSetEmbedding M N
438+
= isOfHLevelRespectEquiv 1
439+
(EmbeddingIP M N)
440+
(isProp× (isPropΠ2 (λ b _ isEmbedding→hasPropFibers (N .snd .snd) b))
441+
(isPropΠ2 λ b _ isEmbedding→hasPropFibers (M .snd .snd) b))
442+
433443
-- Cantor's theorem for sets
434444
Set-Embedding-into-Powerset : {A : Type ℓ} isSet A A ↪ ℙ A
435445
Set-Embedding-into-Powerset {A = A} setA
@@ -462,3 +472,65 @@ Set-Embedding-into-Powerset {A = A} setA
462472

463473
EmbeddingΣProp : {A : Type ℓ} {B : A Type ℓ'} ( a isProp (B a)) Σ A B ↪ A
464474
EmbeddingΣProp f = fst , (λ _ _ isEmbeddingFstΣProp f)
475+
476+
-- Since embeddings are equivalent to subsets, we can create some notation around this
477+
_∈ₑ_ : {A : Type ℓ} A Embedding A ℓ' Type (ℓ-max ℓ ℓ')
478+
x ∈ₑ (_ , (f , _)) = fiber f x
479+
480+
isProp∈ₑ : {A : Type ℓ} (x : A) (S : Embedding A ℓ') isProp (x ∈ₑ S)
481+
isProp∈ₑ x S = isEmbedding→hasPropFibers (S .snd .snd) x
482+
483+
_⊆ₑ_ : {A : Type ℓ} Embedding A ℓ' Embedding A ℓ'' Type (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
484+
X ⊆ₑ Y = x x ∈ₑ X x ∈ₑ Y
485+
486+
isProp⊆ₑ : {A : Type ℓ} (X : Embedding A ℓ') (Y : Embedding A ℓ'')
487+
isProp (X ⊆ₑ Y)
488+
isProp⊆ₑ _ Y = isPropΠ2 λ x _ isProp∈ₑ x Y
489+
490+
isRefl⊆ₑ : {A : Type ℓ} (S : Embedding A ℓ') S ⊆ₑ S
491+
isRefl⊆ₑ S x x∈S = x∈S
492+
493+
isAntisym⊆ₑ : {A : Type ℓ}
494+
(X Y : Embedding A ℓ')
495+
X ⊆ₑ Y
496+
Y ⊆ₑ X
497+
X ≡ Y
498+
isAntisym⊆ₑ X Y X⊆Y Y⊆X = equivFun (EmbeddingIP X Y) (X⊆Y , Y⊆X)
499+
500+
isTrans⊆ₑ : {A : Type ℓ}
501+
(X : Embedding A ℓ')
502+
(Y : Embedding A ℓ'')
503+
(Z : Embedding A ℓ''')
504+
X ⊆ₑ Y
505+
Y ⊆ₑ Z
506+
X ⊆ₑ Z
507+
isTrans⊆ₑ X Y Z X⊆Y Y⊆Z x = (Y⊆Z x) ∘ (X⊆Y x)
508+
509+
_∩ₑ_ : {A : Type ℓ}
510+
(X : Embedding A ℓ')
511+
(Y : Embedding A ℓ'')
512+
Embedding A (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
513+
_∩ₑ_ {A = A} X Y = (Σ[ x ∈ A ] x ∈ₑ X × x ∈ₑ Y) ,
514+
EmbeddingΣProp λ x isProp× (isProp∈ₑ x X)
515+
(isProp∈ₑ x Y)
516+
517+
_∪ₑ_ : {A : Type ℓ}
518+
(X : Embedding A ℓ')
519+
(Y : Embedding A ℓ'')
520+
Embedding A (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
521+
_∪ₑ_ {A = A} X Y = (Σ[ x ∈ A ] ∥ (x ∈ₑ X) ⊎ (x ∈ₑ Y) ∥₁) ,
522+
EmbeddingΣProp λ _ squash₁
523+
524+
⋂ₑ_ : {A : Type ℓ}
525+
{I : Type ℓ'}
526+
(P : I Embedding A ℓ'')
527+
Embedding A (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
528+
⋂ₑ_ {A = A} P = (Σ[ x ∈ A ] ( i x ∈ₑ P i)) ,
529+
EmbeddingΣProp λ x isPropΠ λ i isProp∈ₑ x (P i)
530+
531+
⋃ₑ_ : {A : Type ℓ}
532+
{I : Type ℓ'}
533+
(P : I Embedding A ℓ'')
534+
Embedding A (ℓ-max (ℓ-max ℓ ℓ') ℓ'')
535+
⋃ₑ_ {A = A} {I = I} P = (Σ[ x ∈ A ] (∃[ i ∈ I ] x ∈ₑ P i)) ,
536+
EmbeddingΣProp λ _ squash₁

Cubical/Functions/Image.agda

+1-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ module _ (f : A → B) where
3030
Image = Σ[ y ∈ B ] isInImage y
3131

3232
imageInclusion : Image ↪ B
33-
imageInclusion = fst ,
34-
hasPropFibers→isEmbedding {f = fst}
35-
λ y isOfHLevelRetractFromIso 1 (ϕ y) isPropPropTrunc
36-
where
37-
ϕ : (y : B) Iso _ _
38-
ϕ y = invIso (fiberProjIso B isInImage y)
33+
imageInclusion = EmbeddingΣProp isPropIsInImage
3934

4035
restrictToImage : A Image
4136
restrictToImage x = (f x) , ∣ x , refl ∣₁

0 commit comments

Comments
 (0)