The cardinality of the reals #
This file shows that the real numbers have cardinality continuum, i.e. #ℝ = 𝔠
.
We show that #ℝ ≤ 𝔠
by noting that every real number is determined by a Cauchy-sequence of the
form ℕ → ℚ
, which has cardinality 𝔠
. To show that #ℝ ≥ 𝔠
we define an injection from
{0, 1} ^ ℕ
to ℝ
with f ↦ Σ n, f n * (1 / 3) ^ n
.
We conclude that all intervals with distinct endpoints have cardinality continuum.
Main definitions #
Cardinal.cantorFunction
is the function that sendsf
in{0, 1} ^ ℕ
toℝ
byf ↦ Σ' n, f n * (1 / 3) ^ n
Main statements #
Cardinal.mk_real : #ℝ = 𝔠
: the reals have cardinality continuum.Cardinal.not_countable_real
: the universal set of real numbers is not countable. We can use this same proof to show that all the other sets in this file are not countable.- 8 lemmas of the form
mk_Ixy_real
forx,y ∈ {i,o,c}
state that intervals on the reals have cardinality continuum.
Notation #
𝔠
: notation forCardinal.Continuum
in localeCardinal
, defined inSetTheory.Continuum
.
Tags #
continuum, cardinality, reals, cardinality of the reals
The body of the sum in cantorFunction
.
cantorFunctionAux c f n = c ^ n
if f n = true
;
cantorFunctionAux c f n = 0
if f n = false
.
Equations
- Cardinal.cantorFunctionAux c f n = bif f n then c ^ n else 0
Instances For
cantorFunction c (f : ℕ → Bool)
is Σ n, f n * c ^ n
, where true
is interpreted as 1
and
false
is interpreted as 0
. It is implemented using cantorFunctionAux
.
Equations
- Cardinal.cantorFunction c f = ∑' (n : ℕ), Cardinal.cantorFunctionAux c f n
Instances For
cantorFunction c
is strictly increasing with if 0 < c < 1/2
, if we endow ℕ → Bool
with a
lexicographic order. The lexicographic order doesn't exist for these infinitary products, so we
explicitly write out what it means.
cantorFunction c
is injective if 0 < c < 1/2
.
The cardinality of the reals, as a type.
The cardinality of the reals, as a set.
Non-Denumerability of the Continuum: The reals are not countable.
Equations
The cardinality of the interval (a, ∞).
The cardinality of the interval [a, ∞).
The cardinality of the interval (-∞, a).
The cardinality of the interval (-∞, a].
The cardinality of the interval (a, b).
The cardinality of the interval [a, b).
The cardinality of the interval [a, b].
The cardinality of the interval (a, b].