The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V13. General topology

Mathlib.Topology.UniformSpace.CompareReals

14 declarations. Mathlib docs · Source

Comparison of Cauchy reals and Bourbaki reals

In Data.Real.Basic real numbers are defined using the so called Cauchy construction (although it is due to Georg Cantor). More precisely, this construction applies to commutative rings equipped with an absolute value with values in a linear ordered field.

On the other hand, in the UniformSpace folder, we construct completions of general uniform spaces, which allows to construct the Bourbaki real numbers. In this file we build uniformly continuous bijections from Cauchy reals to Bourbaki reals and back. This is a cross sanity check of both constructions. Of course those two constructions are variations on the completion idea, simply with different level of generality. Comparing with Dedekind cuts or quasi-morphisms would be of a completely different nature.

Note that MetricSpace/cau_seq_filter also relates the notions of Cauchy sequences in metric spaces and Cauchy filters in general uniform spaces, and MetricSpace/Completion makes sure the completion (as a uniform space) of a metric space is a metric space.

Historical note: mathlib used to define real numbers in an intermediate way, using completion of uniform spaces but extending multiplication in an ad-hoc way.

TODO:

  • Upgrade this isomorphism to a topological ring isomorphism.
  • Do the same comparison for p-adic numbers

Implementation notes

The heavy work is done in Topology/UniformSpace/AbstractCompletion which provides an abstract characterization of completions of uniform spaces, and isomorphisms between them. The only work left here is to prove the uniform space structure coming from the absolute value on ℚ (with values in ℚ, not referring to ℝ) coincides with the one coming from the metric space structure (which of course does use ℝ).

References

  • [N. Bourbaki, Topologie générale][bourbaki1966]

Tags

real numbers, completion, uniform spaces

theorem AbsoluteValue.abs.congr_simp E1 #

∀ {S : Type u_4} [inst : Ring S] [inst_1 : LinearOrder S] [inst_2 : IsStrictOrderedRing S],
  AbsoluteValue.abs = AbsoluteValue.abs

theorem Rat.uniformSpace_eq E0 #

AbsoluteValue.abs.uniformSpace = PseudoMetricSpace.toUniformSpace

The metric space uniform structure on ℚ (which presupposes the existence of real numbers) agrees with the one coming directly from (abs : ℚ → ℚ).

def rationalCauSeqPkg E1 #

AbstractCompletion.{0, 0} ℚ

Cauchy reals packaged as a completion of ℚ using the absolute value route.

def CompareReals.Q E1 #

Type

Type wrapper around ℚ to make sure the absolute value uniform space instance is picked up instead of the metric space one. We proved in Rat.uniformSpace_eq that they are equal, but they are not definitionally equal, so it would confuse the type class system (and probably also human readers).

instance CompareReals.instInhabitedQ E0 #

Inhabited CompareReals.Q

instance CompareReals.instCommRingQ E0 #

CommRing CompareReals.Q

instance CompareReals.uniformSpace E0 #

UniformSpace CompareReals.Q

def CompareReals.Bourbakiℝ E1 #

Type

Real numbers constructed as in Bourbaki.

instance CompareReals.instInhabitedBourbakiℝ E0 #

Inhabited CompareReals.Bourbakiℝ

instance CompareReals.Bourbaki.uniformSpace E0 #

UniformSpace CompareReals.Bourbakiℝ

def CompareReals.bourbakiPkg E1 #

AbstractCompletion.{0, 0} CompareReals.Q

Bourbaki reals packaged as a completion of Q using the general theory.

def CompareReals.compareEquiv E1 #

CompareReals.Bourbakiℝ ≃ᵤ ℝ

The uniform bijection between Bourbaki and Cauchy reals.

theorem CompareReals.compare_uc E1 #

UniformContinuous ⇑CompareReals.compareEquiv

theorem CompareReals.compare_uc_symm E1 #

UniformContinuous ⇑CompareReals.compareEquiv.symm