The cardinality of the reals #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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.cantor_function
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 inset_theory.continuum
.
Tags #
continuum, cardinality, reals, cardinality of the reals
cantor_function c (f : ℕ → bool)
is Σ n, f n * c ^ n
, where tt
is interpreted as 1
and
ff
is interpreted as 0
. It is implemented using cantor_function_aux
.
Equations
- cardinal.cantor_function c f = ∑' (n : ℕ), cardinal.cantor_function_aux c f n
cantor_function 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.
cantor_function 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.
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].