Skip to content
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

Cantor's theorem and diagonal argument #1185

Merged
merged 25 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a22aa53
Cantor's theorem
fredrik-bakke Sep 17, 2024
05c9b85
Merge branch 'master' into cantor
fredrik-bakke Sep 17, 2024
e74192e
module name
fredrik-bakke Sep 17, 2024
05fab47
pre-commit
fredrik-bakke Sep 17, 2024
90fd6aa
links and WDID's `set-theory`
fredrik-bakke Sep 17, 2024
889ce2b
formatting cantors theorem
fredrik-bakke Sep 17, 2024
fcb12de
fix link
fredrik-bakke Sep 17, 2024
61ffbbe
Merge branch 'master' into cantor
fredrik-bakke Sep 17, 2024
e319c35
lavwere's fixed point theorem generalizes cantor's theorem
fredrik-bakke Sep 17, 2024
4b46966
correction: `Maybe` is not a modality
fredrik-bakke Sep 17, 2024
e324564
further corrections: `Maybe` is not a modality
fredrik-bakke Sep 17, 2024
cc8a5f9
Cantor's theorem for the set of decidable subtypes
fredrik-bakke Sep 17, 2024
6c1b393
more additions and a correction `set-theory`
fredrik-bakke Sep 17, 2024
23bc6f4
more fixes
fredrik-bakke Sep 17, 2024
84c213b
langid Cantor1890/91
fredrik-bakke Sep 17, 2024
4c0b466
cantor space is uncountable
fredrik-bakke Sep 18, 2024
fbe1e66
Cantor's diagonal argument
fredrik-bakke Sep 18, 2024
ae548c3
informal proof Cantor's theorem
fredrik-bakke Sep 18, 2024
967b6cd
self review
fredrik-bakke Sep 18, 2024
3a2ae5f
fix link baire-space.lagda.md
fredrik-bakke Sep 18, 2024
84c05ae
fix link cantors-diagonal-argument.lagda.md
fredrik-bakke Sep 18, 2024
2b258ab
pre-commit
fredrik-bakke Sep 18, 2024
093d0e4
another link
fredrik-bakke Sep 18, 2024
e057436
a typo
fredrik-bakke Sep 23, 2024
a9b62a4
final fix
fredrik-bakke Sep 23, 2024
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
85 changes: 48 additions & 37 deletions references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,24 @@ @article{BW23
keywords = {03B38 18N60 18N45 18D30 18N55 55U35 18N50 18D40 18D70,Computer Science - Logic in Computer Science,Mathematics - Algebraic Topology,Mathematics - Category Theory,Mathematics - Logic}
}

@article{Cantor1890/91,
author = {Cantor, Georg},
journal = {Jahresbericht der Deutschen Mathematiker-Vereinigung},
pages = {72--78},
title = {Über eine elementare Frage der Mannigfaltigketislehre},
url = {http://eudml.org/doc/144383},
volume = {1},
year = {1890/91},
langid = {german}
}

@unpublished{Cisinski24,
title = {Formalization of higher categories},
title = {Formalization of higher categories},
author = {Denis-Charles Cisinski, Bastiaan Cnossen, Kim Nguyen and Tashi Walde},
date = {2024-08-10},
year = {2024},
month = {08},
note = {\url{https://drive.google.com/file/d/1lKaq7watGGl3xvjqw9qHjm6SDPFJ2-0o/view}},
date = {2024-08-10},
year = {2024},
month = {08},
note = {\url{https://drive.google.com/file/d/1lKaq7watGGl3xvjqw9qHjm6SDPFJ2-0o/view}},
annote = {}
}

Expand Down Expand Up @@ -296,21 +307,21 @@ @inproceedings{KvR19
eprintclass = {cs, math}
}

@incollection {Makkai98,
AUTHOR = {Makkai, M.},
TITLE = {Towards a categorical foundation of mathematics},
BOOKTITLE = {Logic {C}olloquium '95 ({H}aifa)},
SERIES = {Lecture Notes Logic},
VOLUME = {11},
PAGES = {153--190},
PUBLISHER = {Springer, Berlin},
YEAR = {1998},
ISBN = {3-540-63994-2},
MRCLASS = {03B15 (00A30 03A05 03G30 18A15 18D05)},
MRNUMBER = {1678360},
MRREVIEWER = {Peter\ Johnstone},
DOI = {10.1007/978-3-662-22108-2\_11},
URL = {https://doi.org/10.1007/978-3-662-22108-2_11},
@incollection{Makkai98,
author = {Makkai, M.},
title = {Towards a categorical foundation of mathematics},
booktitle = {Logic {C}olloquium '95 ({H}aifa)},
series = {Lecture Notes Logic},
volume = {11},
pages = {153--190},
publisher = {Springer, Berlin},
year = {1998},
isbn = {3-540-63994-2},
mrclass = {03B15 (00A30 03A05 03G30 18A15 18D05)},
mrnumber = {1678360},
mrreviewer = {Peter\ Johnstone},
doi = {10.1007/978-3-662-22108-2\_11},
url = {https://doi.org/10.1007/978-3-662-22108-2_11}
}

@book{May12,
Expand Down Expand Up @@ -558,23 +569,23 @@ @online{Shu14UniversalProperties
}

@article{Shu15,
title = {Univalence for inverse diagrams and homotopy canonicity},
author = {Shulman, Michael},
date = {2015-06},
year = {2015},
month = {06},
volume = {25},
rights = {https://www.cambridge.org/core/terms},
issn = {0960-1295, 1469-8072},
doi = {10.1017/S0960129514000565},
abstract = {We describe a homotopical version of the relational and gluing models of type theory, and generalize it to inverse diagrams and oplax limits. Our method uses the Reedy homotopy theory on inverse diagrams, and relies on the fact that Reedy fibrant diagrams correspond to contexts of a certain shape in type theory. This has two main applications. First, by considering inverse diagrams in Voevodsky's univalent model in simplicial sets, we obtain new models of univalence in a number of (∞, 1)-toposes; this answers a question raised at the Oberwolfach workshop on homotopical type theory. Second, by gluing the syntactic category of univalent type theory along its global sections functor to groupoids, we obtain a partial answer to Voevodsky's homotopy-canonicity conjecture: in 1-truncated type theory with one univalent universe of sets, any closed term of natural number type is homotopic to a numeral.},
pages = {1203--1277},
number = {5},
journal = {Mathematical Structures in Computer Science},
langid = {english},
eprinttype = {arxiv},
eprintclass = {math},
eprint = {1203.3253},
title = {Univalence for inverse diagrams and homotopy canonicity},
author = {Shulman, Michael},
date = {2015-06},
year = {2015},
month = {06},
volume = {25},
rights = {https://www.cambridge.org/core/terms},
issn = {0960-1295, 1469-8072},
doi = {10.1017/S0960129514000565},
abstract = {We describe a homotopical version of the relational and gluing models of type theory, and generalize it to inverse diagrams and oplax limits. Our method uses the Reedy homotopy theory on inverse diagrams, and relies on the fact that Reedy fibrant diagrams correspond to contexts of a certain shape in type theory. This has two main applications. First, by considering inverse diagrams in Voevodsky's univalent model in simplicial sets, we obtain new models of univalence in a number of (∞, 1)-toposes; this answers a question raised at the Oberwolfach workshop on homotopical type theory. Second, by gluing the syntactic category of univalent type theory along its global sections functor to groupoids, we obtain a partial answer to Voevodsky's homotopy-canonicity conjecture: in 1-truncated type theory with one univalent universe of sets, any closed term of natural number type is homotopic to a numeral.},
pages = {1203--1277},
number = {5},
journal = {Mathematical Structures in Computer Science},
langid = {english},
eprinttype = {arxiv},
eprintclass = {math},
eprint = {1203.3253}
}

@article{Shu17,
Expand Down
5 changes: 3 additions & 2 deletions src/elementary-number-theory/divisibility-integers.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ open import foundation.universe-levels
## Idea

An integer `m` is said to **divide** an integer `n` if there exists an integer
`k` equipped with an identification `km = n`. Using the Curry-Howard
interpretation of logic into type theory, we express divisibility as follows:
`k` equipped with an identification `km = n`. Using the
[Curry–Howard interpretation](https://en.wikipedia.org/wiki/Curry–Howard_correspondence)
of logic into type theory, we express divisibility as follows:

```text
div-ℤ m n := Σ (k : ℤ), k *ℤ m = n.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ open import foundation.universe-levels

A natural number `m` is said to **divide** a natural number `n` if there exists
a natural number `k` equipped with an identification `km = n`. Using the
Curry-Howard interpretation of logic into type theory, we express divisibility
as follows:
[CurryHoward interpretation](https://en.wikipedia.org/wiki/Curry–Howard_correspondence)
of logic into type theory, we express divisibility as follows:

```text
div-ℕ m n := Σ (k : ℕ), k *ℕ m = n.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ open import foundation.unit-type
open import foundation.universe-levels

open import foundation-core.decidable-propositions
open import foundation-core.discrete-types
open import foundation-core.torsorial-type-families
```

Expand Down Expand Up @@ -117,6 +118,9 @@ has-decidable-equality-ℕ : has-decidable-equality ℕ
has-decidable-equality-ℕ x y =
is-decidable-iff (eq-Eq-ℕ x y) Eq-eq-ℕ (is-decidable-Eq-ℕ x y)

ℕ-Discrete-Type : Discrete-Type lzero
ℕ-Discrete-Type = (ℕ , has-decidable-equality-ℕ)

decidable-eq-ℕ : ℕ → ℕ → Decidable-Prop lzero
pr1 (decidable-eq-ℕ m n) = (m = n)
pr1 (pr2 (decidable-eq-ℕ m n)) = is-set-ℕ m n
Expand Down
25 changes: 25 additions & 0 deletions src/foundation-core/decidable-propositions.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,31 @@ module _
pr2 product-Decidable-Prop = is-decidable-prop-product-Decidable-Prop
```

### The negation operation on decidable propositions

```agda
is-decidable-prop-neg :
{l1 : Level} {A : UU l1} → is-decidable A → is-decidable-prop (¬ A)
is-decidable-prop-neg is-decidable-A =
( is-prop-neg , is-decidable-neg is-decidable-A)

neg-type-Decidable-Prop :
{l1 : Level} (A : UU l1) → is-decidable A → Decidable-Prop l1
neg-type-Decidable-Prop A is-decidable-A =
( ¬ A , is-decidable-prop-neg is-decidable-A)

neg-Decidable-Prop :
{l1 : Level} → Decidable-Prop l1 → Decidable-Prop l1
neg-Decidable-Prop P =
neg-type-Decidable-Prop
( type-Decidable-Prop P)
( is-decidable-Decidable-Prop P)

type-neg-Decidable-Prop :
{l1 : Level} → Decidable-Prop l1 → UU l1
type-neg-Decidable-Prop P = type-Decidable-Prop (neg-Decidable-Prop P)
```

### Decidability of a propositional truncation

```agda
Expand Down
9 changes: 8 additions & 1 deletion src/foundation-core/discrete-types.lagda.md
fredrik-bakke marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ open import foundation-core.sets

## Idea

A discrete type is a type that has decidable equality.
A {{#concept "discrete type" Agda=Discrete-Type}} is a type that has
[decidable equality](foundation.decidable-equality.md). Consequently, discrete
types are [sets](foundation-core.sets.md) by Hedberg's theorem.

## Definition

Expand All @@ -45,3 +47,8 @@ module _
pr1 set-Discrete-Type = type-Discrete-Type
pr2 set-Discrete-Type = is-set-type-Discrete-Type
```

## External links

- [classical set](https://ncatlab.org/nlab/show/classical+set) at $n$Lab
- [decidable object](https://ncatlab.org/nlab/show/decidable+object) at $n$Lab
6 changes: 4 additions & 2 deletions src/foundation-core/negation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ open import foundation-core.empty-types

## Idea

The Curry-Howard interpretation of _negation_ in type theory is the
interpretation of the proposition `P ⇒ ⊥` using propositions as types. Thus, the
The
[Curry–Howard interpretation](https://en.wikipedia.org/wiki/Curry–Howard_correspondence)
of _negation_ in type theory is the interpretation of the proposition `P ⇒ ⊥`
using propositions as types. Thus, the
{{#concept "negation" Disambiguation="of a type" WDID=Q190558 WD="logical negation" Agda=¬_}}
of a type `A` is the type `A → empty`.

Expand Down
4 changes: 2 additions & 2 deletions src/foundation-core/subtypes.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ equiv-type-subtype :
( Σ A P) ≃ (Σ A Q)
pr1 (equiv-type-subtype is-subtype-P is-subtype-Q f g) = tot f
pr2 (equiv-type-subtype is-subtype-P is-subtype-Q f g) =
is-equiv-tot-is-fiberwise-equiv {f = f}
is-equiv-tot-is-fiberwise-equiv
( λ x →
is-equiv-has-converse-is-prop
( is-subtype-P x)
Expand Down Expand Up @@ -359,7 +359,7 @@ abstract
(is-subtype-P : is-subtype P) (is-subtype-Q : is-subtype Q)
(f : A → B) (g : (x : A) → P x → Q (f x)) →
(is-equiv-f : is-equiv f) →
((y : B) → (Q y) → P (map-inv-is-equiv is-equiv-f y)) →
((y : B) → Q y → P (map-inv-is-equiv is-equiv-f y)) →
is-equiv (map-Σ Q f g)
is-equiv-subtype-is-equiv' {P = P} {Q}
is-subtype-P is-subtype-Q f g is-equiv-f h =
Expand Down
13 changes: 10 additions & 3 deletions src/foundation-core/type-theoretic-principle-of-choice.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ A dependent function taking values in a
[dependent pair type](foundation.dependent-pair-types.md) is
[equivalently](foundation-core.equivalences.md) described as a pair of dependent
functions. This equivalence, which gives the distributivity of Π over Σ, is also
known as the **type theoretic principle of choice**. Indeed, it is the
Curry-Howard interpretation of (one formulation of) the
[axiom of choice](foundation.axiom-of-choice.md).
known as the
{{#concept "type theoretic principle of choice" Agda=distributive-Π-Σ}}. Indeed,
it is the
[Curry–Howard interpretation](https://en.wikipedia.org/wiki/Curry–Howard_correspondence)
of (one formulation of) the [axiom of choice](foundation.axiom-of-choice.md).

We establish this equivalence both for explicit and implicit function types.

Expand Down Expand Up @@ -188,3 +190,8 @@ module _
pr1 equiv-mapping-into-Σ = mapping-into-Σ
pr2 equiv-mapping-into-Σ = is-equiv-mapping-into-Σ
```

## External links

- [type theoretic axiom of choice](https://ncatlab.org/nlab/show/type+theoretic+axiom+of+choice)
at $n$Lab
2 changes: 1 addition & 1 deletion src/foundation.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ open import foundation.binary-transport public
open import foundation.binary-type-duality public
open import foundation.booleans public
open import foundation.cantor-schroder-bernstein-escardo public
open import foundation.cantors-diagonal-argument public
open import foundation.cantors-theorem public
open import foundation.cartesian-morphisms-arrows public
open import foundation.cartesian-morphisms-span-diagrams public
open import foundation.cartesian-product-types public
Expand Down
3 changes: 3 additions & 0 deletions src/foundation/booleans.lagda.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ pr2 bool-𝔽 = is-finite-bool
neq-neg-bool : (b : bool) → b ≠ neg-bool b
neq-neg-bool true ()
neq-neg-bool false ()

neq-neg-bool' : (b : bool) → neg-bool b ≠ b
neq-neg-bool' b = neq-neg-bool b ∘ inv
```

### Boolean negation is an involution
Expand Down
52 changes: 0 additions & 52 deletions src/foundation/cantors-diagonal-argument.lagda.md

This file was deleted.

Loading
Loading