The areas / V15. Real analysis in one variable
Mathlib.Analysis.Real.Cardinality
30 declarations. Mathlib docs Β· Source
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.cantorFunctionis the function that sendsfin{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_realforx,y β {i,o,c}state that intervals on the reals have cardinality continuum.
Notation
π: notation forCardinal.continuumin scopeCardinal, defined inSetTheory.Continuum.
Tags
continuum, cardinality, reals, cardinality of the reals
def Cardinal.cantorFunctionAux E0 #
β β (β β Bool) β β β β
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.
theorem Cardinal.cantorFunctionAux_true E0 #
β {c : β} {f : β β Bool} {n : β}, f n = true β Cardinal.cantorFunctionAux c f n = c ^ n
theorem Cardinal.cantorFunctionAux_false E0 #
β {c : β} {f : β β Bool} {n : β}, f n = false β Cardinal.cantorFunctionAux c f n = 0
theorem Cardinal.cantorFunctionAux_nonneg E1 #
β {c : β} {f : β β Bool} {n : β}, 0 β€ c β 0 β€ Cardinal.cantorFunctionAux c f n
theorem Cardinal.cantorFunctionAux_eq E0 #
β {c : β} {f g : β β Bool} {n : β}, f n = g n β Cardinal.cantorFunctionAux c f n = Cardinal.cantorFunctionAux c g n
theorem Cardinal.cantorFunctionAux_zero E1 #
β {c : β} (f : β β Bool), Cardinal.cantorFunctionAux c f 0 = bif f 0 then 1 else 0
theorem Cardinal.cantorFunctionAux_succ E1 #
β {c : β} (f : β β Bool),
(fun n β¦ Cardinal.cantorFunctionAux c f (n + 1)) = fun n β¦ c * Cardinal.cantorFunctionAux c (fun n β¦ f (n + 1)) n
theorem Cardinal.summable_cantor_function E1 #
β {c : β} (f : β β Bool), 0 β€ c β c < 1 β Summable (Cardinal.cantorFunctionAux c f)
def Cardinal.cantorFunction E3 #
β β (β β Bool) β β
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.
theorem Cardinal.cantorFunction_le E1 #
β {c : β} {f g : β β Bool},
0 β€ c β c < 1 β (β (n : β), f n = true β g n = true) β Cardinal.cantorFunction c f β€ Cardinal.cantorFunction c g
theorem Cardinal.cantorFunction_succ E1 #
β {c : β} (f : β β Bool),
0 β€ c β
c < 1 β Cardinal.cantorFunction c f = (bif f 0 then 1 else 0) + c * Cardinal.cantorFunction c fun n β¦ f (n + 1)
theorem Cardinal.increasing_cantorFunction E1 #
β {c : β},
0 < c β
c < 1 / 2 β
β {n : β} {f g : β β Bool},
(β k < n, f k = g k) β f n = false β g n = true β Cardinal.cantorFunction c f < Cardinal.cantorFunction c g
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.
theorem Cardinal.cantorFunction_injective E1 #
β {c : β}, 0 < c β c < 1 / 2 β Function.Injective (Cardinal.cantorFunction c)
cantorFunction c is injective if 0 < c < 1/2.
theorem Cardinal.mk_real E1 #
Cardinal.mk β = Cardinal.continuum
The cardinality of the reals, as a type.
theorem Cardinal.mk_univ_real E1 #
Cardinal.mk βSet.univ = Cardinal.continuum
The cardinality of the reals, as a set.
instance Cardinal.instUncountableReal E0 #
Uncountable β
Non-Denumerability of the Continuum: The reals are not countable.
theorem Cardinal.not_countable_real E3 #
Β¬Set.univ.Countable
theorem Cardinal.mk_Ioi_real E1 #
β (a : β), Cardinal.mk β(Set.Ioi a) = Cardinal.continuum
The cardinality of the interval $(a, β)$.
theorem Cardinal.mk_Ici_real E1 #
β (a : β), Cardinal.mk β(Set.Ici a) = Cardinal.continuum
The cardinality of the interval $[a, β)$.
theorem Cardinal.mk_Iio_real E1 #
β (a : β), Cardinal.mk β(Set.Iio a) = Cardinal.continuum
The cardinality of the interval $(-β, a)$.
theorem Cardinal.mk_Iic_real E1 #
β (a : β), Cardinal.mk β(Set.Iic a) = Cardinal.continuum
The cardinality of the interval $(-β, a]$.
theorem Cardinal.mk_Ioo_real E1 #
β {a b : β}, a < b β Cardinal.mk β(Set.Ioo a b) = Cardinal.continuum
The cardinality of the interval $(a, b)$.
theorem Cardinal.mk_Ico_real E1 #
β {a b : β}, a < b β Cardinal.mk β(Set.Ico a b) = Cardinal.continuum
The cardinality of the interval $[a, b)$.
theorem Cardinal.mk_Icc_real E1 #
β {a b : β}, a < b β Cardinal.mk β(Set.Icc a b) = Cardinal.continuum
The cardinality of the interval $[a, b]$.
theorem Cardinal.mk_Ioc_real E1 #
β {a b : β}, a < b β Cardinal.mk β(Set.Ioc a b) = Cardinal.continuum
The cardinality of the interval $(a, b]$.
theorem Cardinal.mk_unitInterval E0 #
Cardinal.mk βunitInterval = Cardinal.continuum
theorem Cardinal.Real.Ioo_countable_iff E0 #
β {x y : β}, (Set.Ioo x y).Countable β y β€ x
theorem Cardinal.Real.Ico_countable_iff E0 #
β {x y : β}, (Set.Ico x y).Countable β y β€ x
theorem Cardinal.Real.Ioc_countable_iff E0 #
β {x y : β}, (Set.Ioc x y).Countable β y β€ x
theorem Cardinal.Real.Icc_countable_iff E0 #
β {x y : β}, (Set.Icc x y).Countable β y β€ x