Skip to content

Dedekind finiteness of various notions of finite type #1422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ @online{100theorems
url = {https://www.cs.ru.nl/~freek/100/}
}

@article{ABFJ20,
author = {Anel, Mathieu and Biedermann, Georg and Finster, Eric and
Joyal, Andr\'e},
title = {A generalized {B}lakers-{M}assey theorem},
journal = {J. Topol.},
fjournal = {Journal of Topology},
volume = {13},
year = {2020},
number = {4},
pages = {1521--1553},
issn = {1753-8416,1753-8424},
mrclass = {18N20 (18B25 18N45 55U35)},
mrnumber = {4186137},
mrreviewer = {Charles Rezk},
doi = {10.1112/topo.12163}
}

@article{AKS15,
title = {Univalent Categories and the {{Rezk}} Completion},
author = {Ahrens, Benedikt and Kapulkin, Krzysztof and Shulman, Michael},
Expand Down
2 changes: 1 addition & 1 deletion src/category-theory/terminal-category.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ is-category-terminal-Category x y =
is-equiv-is-contr
( iso-eq-Precategory terminal-Precategory x y)
( is-prop-unit x y)
( is-contr-Σ is-contr-unit star
( is-contr-Σ-unit
( is-proof-irrelevant-is-prop
( is-prop-is-iso-Precategory terminal-Precategory star)
( star , refl , refl)))
Expand Down
31 changes: 28 additions & 3 deletions src/elementary-number-theory/distance-natural-numbers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module elementary-number-theory.distance-natural-numbers where
```agda
open import elementary-number-theory.addition-natural-numbers
open import elementary-number-theory.inequality-natural-numbers
open import elementary-number-theory.maximum-natural-numbers
open import elementary-number-theory.minimum-natural-numbers
open import elementary-number-theory.multiplication-natural-numbers
open import elementary-number-theory.natural-numbers
open import elementary-number-theory.strict-inequality-natural-numbers
Expand All @@ -19,6 +21,8 @@ open import foundation.coproduct-types
open import foundation.dependent-pair-types
open import foundation.function-types
open import foundation.identity-types
open import foundation.negated-equality
open import foundation.negation
open import foundation.transport-along-identifications
open import foundation.unit-type
open import foundation.universe-levels
Expand Down Expand Up @@ -66,6 +70,12 @@ dist-eq-ℕ' (succ-ℕ n) = dist-eq-ℕ' n
dist-eq-ℕ : (m n : ℕ) → m = n → is-zero-ℕ (dist-ℕ m n)
dist-eq-ℕ m .m refl = dist-eq-ℕ' m

dist-neq-ℕ : (m n : ℕ) → m ≠ n → is-nonzero-ℕ (dist-ℕ m n)
dist-neq-ℕ m n = map-neg (eq-dist-ℕ m n)

dist-neq-ℕ' : (m n : ℕ) → m ≠ n → is-successor-ℕ (dist-ℕ m n)
dist-neq-ℕ' m n np = is-successor-is-nonzero-ℕ (dist-neq-ℕ m n np)

is-one-dist-succ-ℕ : (x : ℕ) → is-one-ℕ (dist-ℕ x (succ-ℕ x))
is-one-dist-succ-ℕ zero-ℕ = refl
is-one-dist-succ-ℕ (succ-ℕ x) = is-one-dist-succ-ℕ x
Expand Down Expand Up @@ -283,7 +293,7 @@ leq-dist-ℕ (succ-ℕ x) (succ-ℕ y) H =

```agda
strict-upper-bound-dist-ℕ :
(b x y : ℕ) → le-ℕ x b → le-ℕ y b → le-ℕ (dist-ℕ x y) b
(b x y : ℕ) → x <-ℕ b → y <-ℕ b → dist-ℕ x y <-ℕ b
strict-upper-bound-dist-ℕ (succ-ℕ b) zero-ℕ y H K = K
strict-upper-bound-dist-ℕ (succ-ℕ b) (succ-ℕ x) zero-ℕ H K = H
strict-upper-bound-dist-ℕ (succ-ℕ b) (succ-ℕ x) (succ-ℕ y) H K =
Expand All @@ -294,14 +304,14 @@ strict-upper-bound-dist-ℕ (succ-ℕ b) (succ-ℕ x) (succ-ℕ y) H K =

```agda
right-successor-law-dist-ℕ :
(x y : ℕ) → leq-ℕ x y → dist-ℕ x (succ-ℕ y) = succ-ℕ (dist-ℕ x y)
(x y : ℕ) → x ≤-ℕ y → dist-ℕ x (succ-ℕ y) = succ-ℕ (dist-ℕ x y)
right-successor-law-dist-ℕ zero-ℕ zero-ℕ star = refl
right-successor-law-dist-ℕ zero-ℕ (succ-ℕ y) star = refl
right-successor-law-dist-ℕ (succ-ℕ x) (succ-ℕ y) H =
right-successor-law-dist-ℕ x y H

left-successor-law-dist-ℕ :
(x y : ℕ) → leq-ℕ y x → dist-ℕ (succ-ℕ x) y = succ-ℕ (dist-ℕ x y)
(x y : ℕ) → y ≤-ℕ x → dist-ℕ (succ-ℕ x) y = succ-ℕ (dist-ℕ x y)
left-successor-law-dist-ℕ zero-ℕ zero-ℕ star = refl
left-successor-law-dist-ℕ (succ-ℕ x) zero-ℕ star = refl
left-successor-law-dist-ℕ (succ-ℕ x) (succ-ℕ y) H =
Expand Down Expand Up @@ -368,3 +378,18 @@ right-distributive-mul-dist-ℕ x y k =
( ( left-distributive-mul-dist-ℕ x y k) ∙
( ap-dist-ℕ (commutative-mul-ℕ k x) (commutative-mul-ℕ k y)))
```

### The distance is the difference between the maximum and the minimum

```agda
eq-max-dist-min-ℕ : (x y : ℕ) → dist-ℕ x y +ℕ min-ℕ x y = max-ℕ x y
eq-max-dist-min-ℕ zero-ℕ y = refl
eq-max-dist-min-ℕ (succ-ℕ x) zero-ℕ = refl
eq-max-dist-min-ℕ (succ-ℕ x) (succ-ℕ y) = ap succ-ℕ (eq-max-dist-min-ℕ x y)

dist-max-min-ℕ : (x y : ℕ) → dist-ℕ x y = dist-ℕ (max-ℕ x y) (min-ℕ x y)
dist-max-min-ℕ zero-ℕ zero-ℕ = refl
dist-max-min-ℕ zero-ℕ (succ-ℕ y) = refl
dist-max-min-ℕ (succ-ℕ x) zero-ℕ = refl
dist-max-min-ℕ (succ-ℕ x) (succ-ℕ y) = dist-max-min-ℕ x y
```
23 changes: 22 additions & 1 deletion src/elementary-number-theory/maximum-natural-numbers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module elementary-number-theory.maximum-natural-numbers where
open import elementary-number-theory.addition-natural-numbers
open import elementary-number-theory.inequality-natural-numbers
open import elementary-number-theory.natural-numbers
open import elementary-number-theory.strict-inequality-natural-numbers

open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
Expand Down Expand Up @@ -40,7 +41,7 @@ max-ℕ (succ-ℕ m) 0 = succ-ℕ m
max-ℕ (succ-ℕ m) (succ-ℕ n) = succ-ℕ (max-ℕ m n)

ap-max-ℕ : {x x' y y' : ℕ} → x = x' → y = y' → max-ℕ x y = max-ℕ x' y'
ap-max-ℕ p q = ap-binary max-ℕ p q
ap-max-ℕ p = ap-binary max-ℕ p

max-ℕ' : ℕ → (ℕ → ℕ)
max-ℕ' x y = max-ℕ y x
Expand Down Expand Up @@ -103,6 +104,26 @@ is-least-upper-bound-max-ℕ m n =
( λ x (H , K) → leq-max-ℕ x m n H K)
```

### The maximum computes to the greater of the two numbers

```agda
abstract
leq-left-max-ℕ : (m n : ℕ) → n ≤-ℕ m → max-ℕ m n = m
leq-left-max-ℕ zero-ℕ zero-ℕ p = refl
leq-left-max-ℕ (succ-ℕ m) zero-ℕ p = refl
leq-left-max-ℕ (succ-ℕ m) (succ-ℕ n) p = ap succ-ℕ (leq-left-max-ℕ m n p)

le-left-max-ℕ : (m n : ℕ) → n <-ℕ m → max-ℕ m n = m
le-left-max-ℕ m n p = leq-left-max-ℕ m n (leq-le-ℕ n m p)

leq-right-max-ℕ : (m n : ℕ) → m ≤-ℕ n → max-ℕ m n = n
leq-right-max-ℕ zero-ℕ n p = refl
leq-right-max-ℕ (succ-ℕ m) (succ-ℕ n) p = ap succ-ℕ (leq-right-max-ℕ m n p)

le-right-max-ℕ : (m n : ℕ) → m <-ℕ n → max-ℕ m n = n
le-right-max-ℕ m n p = leq-right-max-ℕ m n (leq-le-ℕ m n p)
```

### Associativity of `max-ℕ`

```agda
Expand Down
21 changes: 21 additions & 0 deletions src/elementary-number-theory/minimum-natural-numbers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module elementary-number-theory.minimum-natural-numbers where
open import elementary-number-theory.addition-natural-numbers
open import elementary-number-theory.inequality-natural-numbers
open import elementary-number-theory.natural-numbers
open import elementary-number-theory.strict-inequality-natural-numbers

open import foundation.action-on-identifications-binary-functions
open import foundation.action-on-identifications-functions
Expand Down Expand Up @@ -87,6 +88,26 @@ is-greatest-lower-bound-min-ℕ l m =
( λ x (H , K) → leq-min-ℕ x l m H K)
```

### The minimum computes to the lesser of the two numbers

```agda
abstract
leq-left-min-ℕ : (m n : ℕ) → m ≤-ℕ n → min-ℕ m n = m
leq-left-min-ℕ zero-ℕ n p = refl
leq-left-min-ℕ (succ-ℕ m) (succ-ℕ n) p = ap succ-ℕ (leq-left-min-ℕ m n p)

le-left-min-ℕ : (m n : ℕ) → m <-ℕ n → min-ℕ m n = m
le-left-min-ℕ m n p = leq-left-min-ℕ m n (leq-le-ℕ m n p)

leq-right-min-ℕ : (m n : ℕ) → n ≤-ℕ m → min-ℕ m n = n
leq-right-min-ℕ zero-ℕ zero-ℕ p = refl
leq-right-min-ℕ (succ-ℕ m) zero-ℕ p = refl
leq-right-min-ℕ (succ-ℕ m) (succ-ℕ n) p = ap succ-ℕ (leq-right-min-ℕ m n p)

le-right-min-ℕ : (m n : ℕ) → n <-ℕ m → min-ℕ m n = n
le-right-min-ℕ m n p = leq-right-min-ℕ m n (leq-le-ℕ n m p)
```

### Associativity of `min-ℕ`

```agda
Expand Down
18 changes: 13 additions & 5 deletions src/elementary-number-theory/nonzero-natural-numbers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ one-ℕ⁺ = one-nonzero-ℕ

```agda
succ-nonzero-ℕ : nonzero-ℕ → nonzero-ℕ
pr1 (succ-nonzero-ℕ (pair x _)) = succ-ℕ x
pr2 (succ-nonzero-ℕ (pair x _)) = is-nonzero-succ-ℕ x
pr1 (succ-nonzero-ℕ (x , _)) = succ-ℕ x
pr2 (succ-nonzero-ℕ (x , _)) = is-nonzero-succ-ℕ x
```

### The successor function from the natural numbers to the nonzero natural numbers
Expand Down Expand Up @@ -116,8 +116,8 @@ is-section-pred-nonzero-ℕ n = refl
```agda
quotient-div-nonzero-ℕ :
(d : ℕ) (x : nonzero-ℕ) (H : div-ℕ d (pr1 x)) → nonzero-ℕ
pr1 (quotient-div-nonzero-ℕ d (pair x K) H) = quotient-div-ℕ d x H
pr2 (quotient-div-nonzero-ℕ d (pair x K) H) = is-nonzero-quotient-div-ℕ H K
pr1 (quotient-div-nonzero-ℕ d (x , K) H) = quotient-div-ℕ d x H
pr2 (quotient-div-nonzero-ℕ d (x , K) H) = is-nonzero-quotient-div-ℕ H K
```

### Addition of nonzero natural numbers
Expand Down Expand Up @@ -152,13 +152,21 @@ _*ℕ⁺_ = mul-nonzero-ℕ
```agda
le-ℕ⁺ : ℕ⁺ → ℕ⁺ → UU lzero
le-ℕ⁺ (p , _) (q , _) = le-ℕ p q

infix 30 _<-ℕ⁺_
_<-ℕ⁺_ : ℕ⁺ → ℕ⁺ → UU lzero
_<-ℕ⁺_ = le-ℕ⁺
```

### Inequality on nonzero natural numbers

```agda
leq-ℕ⁺ : ℕ⁺ → ℕ⁺ → UU lzero
leq-ℕ⁺ (p , _) (q , _) = leq-ℕ p q

infix 30 _≤-ℕ⁺_
_≤-ℕ⁺_ : ℕ⁺ → ℕ⁺ → UU lzero
_≤-ℕ⁺_ = leq-ℕ⁺
```

### Addition of nonzero natural numbers is a strictly inflationary map
Expand All @@ -169,7 +177,7 @@ le-left-add-nat-ℕ⁺ m (n , n≠0) =
tr
( λ p → le-ℕ p (m +ℕ n))
( right-unit-law-add-ℕ m)
( preserves-le-left-add-ℕ m zero-ℕ n (le-is-nonzero-ℕ n n≠0))
( preserves-le-left-add-ℕ m 0 n (le-is-nonzero-ℕ n n≠0))
```

### The predecessor function from the nonzero natural numbers reflects inequality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ abstract
trichotomy-sign-ℚ :
{l : Level} {A : UU l} (x : ℚ) →
( is-negative-ℚ x → A) →
( Id x zero-ℚ → A) →
( x = zero-ℚ → A) →
( is-positive-ℚ x → A) →
A
trichotomy-sign-ℚ x neg zero pos =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ not-leq-le-ℚ x y H K =
trichotomy-le-ℚ :
{l : Level} {A : UU l} (x y : ℚ) →
( le-ℚ x y → A) →
( Id x y → A) →
( x = y → A) →
( le-ℚ y x → A) →
A
trichotomy-le-ℚ x y left eq right with decide-le-leq-ℚ x y | decide-le-leq-ℚ y x
Expand Down
4 changes: 4 additions & 0 deletions src/foundation-core/injective-maps.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ module _

is-injective-emb : (e : A ↪ B) → is-injective (map-emb e)
is-injective-emb e {x} {y} = map-inv-is-equiv (is-emb-map-emb e x y)

injection-emb : (A ↪ B) → injection A B
injection-emb e = (map-emb e , is-injective-emb e)
```

### Any map out of a contractible type is injective
Expand All @@ -164,3 +167,4 @@ is-injective-is-contr f H p = eq-is-contr H

- [Embeddings](foundation-core.embeddings.md)
- [Path-cosplit maps](foundation.path-cosplit-maps.md)
- [Noninjective maps](foundation.noninjective-maps.md)
1 change: 1 addition & 0 deletions src/foundation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ open import foundation.multivariable-sections public
open import foundation.negated-equality public
open import foundation.negation public
open import foundation.noncontractible-types public
open import foundation.noninjective-maps public
open import foundation.null-homotopic-maps public
open import foundation.operations-span-diagrams public
open import foundation.operations-spans public
Expand Down
12 changes: 10 additions & 2 deletions src/foundation/axiom-of-choice.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ AC0 = {l1 l2 : Level} → level-AC0 l1 l2
```agda
is-set-projective-AC0 :
{l1 l2 l3 : Level} → level-AC0 l2 (l1 ⊔ l2) →
(X : UU l3) → is-set-projective l1 l2 X
(X : UU l3) → is-set-projective-Level l1 l2 X
is-set-projective-AC0 ac X A B f h =
map-trunc-Prop
( ( map-Σ
Expand All @@ -100,7 +100,7 @@ is-set-projective-AC0 ac X A B f h =

AC0-is-set-projective :
{l1 l2 : Level} →
({l : Level} (X : UU l) → is-set-projective (l1 ⊔ l2) l1 X) →
({l : Level} (X : UU l) → is-set-projective-Level (l1 ⊔ l2) l1 X) →
level-AC0 l1 l2
AC0-is-set-projective H A B K =
map-trunc-Prop
Expand All @@ -112,6 +112,14 @@ AC0-is-set-projective H A B K =
( id))
```

## Comments

The axiom of choice fails to hold for arbitrary types. Indeed, it already fails
to hold for the 0-connected 1-type $\operatorname{B}ℤ₂$ as demonstrated in
Corollary 17.5.3 of {{#cite Rij22}}. Hence it is both incompatible with
univalence and with the existence of higher inductive types to assume the axiom
of choice for all types.

## See also

- [Diaconescu's theorem](foundation.diaconescus-theorem.md), which states that
Expand Down
11 changes: 11 additions & 0 deletions src/foundation/cantor-schroder-bernstein-escardo.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,14 @@ Cantor-Schröder-Bernstein lem A B f g =
{{#cite TypeTopology}}

{{#bibliography}}

## See also

The Cantor–Schröder–Bernstein–Escardó theorem holds constructively for many
notions of finite type, including

- [Finite types](univalent-combinatorics.finite-types.md)
- [Subfinite types](univalent-combinatorics.subfinite-types.md)
- [Kuratowski finite sets](univalent-combinatorics.kuratowski-finite-sets.md)
- [Subfinitely indexed types](univalent-combinatorics.subfinitely-indexed-types.md)
- [Dedekind finite types](univalent-combinatorics.dedekind-finite-types.md)
14 changes: 14 additions & 0 deletions src/foundation/connected-maps.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,20 @@ module _
( is-connected-map-connected-map f)
```

### Right cancellation of connected maps

```agda
is-connected-map-left-factor :
{l1 l2 l3 : Level} (k : 𝕋)
{A : UU l1} {B : UU l2} {C : UU l3}
{g : B → C} {h : A → B} →
is-connected-map k h → is-connected-map k (g ∘ h) → is-connected-map k g
is-connected-map-left-factor k {g = g} {h} H GH z =
is-connected-base k
( H ∘ pr1)
( is-connected-equiv' (compute-fiber-comp g h z) (GH z))
```

### The total map induced by a family of maps is `k`-connected if and only if all maps in the family are `k`-connected

```agda
Expand Down
Loading