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 / V12. Number theory

Mathlib.NumberTheory.WellApproximable

21 declarations. Mathlib docs · Source

Well-approximable numbers and Gallagher's ergodic theorem

Gallagher's ergodic theorem is a result in metric number theory. It thus belongs to that branch of mathematics concerning arithmetic properties of real numbers which hold almost everywhere with respect to the Lebesgue measure.

Gallagher's theorem concerns the approximation of real numbers by rational numbers. The input is a sequence of distances δ₁, δ₂, ..., and the theorem concerns the set of real numbers x for which there are infinitely many solutions to: $$ |x - m/n| < δₙ, $$ where the rational number m/n is in lowest terms. The result is that for any δ, this set is either almost all x or almost no x.

This result was proved by Gallagher in 1959 [P. Gallagher, Approximation by reduced fractions][Gallagher1961]. It is formalised here as AddCircle.addWellApproximable_ae_empty_or_univ except with x belonging to the circle ℝ ⧸ ℤ since this turns out to be more natural.

Given a particular δ, the Duffin-Schaeffer conjecture (now a theorem) gives a criterion for deciding which of the two cases in the conclusion of Gallagher's theorem actually occurs. It was proved by Koukoulopoulos and Maynard in 2019 [D. Koukoulopoulos, J. Maynard, On the Duffin-Schaeffer conjecture][KoukoulopoulosMaynard2020]. We do not include a formalisation of the Koukoulopoulos-Maynard result here.

Main definitions and results:

  • approxOrderOf: in a seminormed group A, given n : ℕ and δ : ℝ, approxOrderOf A n δ is the set of elements within a distance δ of a point of order n.
  • wellApproximable: in a seminormed group A, given a sequence of distances δ₁, δ₂, ..., wellApproximable A δ is the limsup as n → ∞ of the sets approxOrderOf A n δₙ. Thus, it is the set of points that lie in infinitely many of the sets approxOrderOf A n δₙ.
  • AddCircle.addWellApproximable_ae_empty_or_univ: Gallagher's ergodic theorem says that for the (additive) circle 𝕊, for any sequence of distances δ, the set addWellApproximable 𝕊 δ is almost empty or almost full.
  • NormedAddCommGroup.exists_norm_nsmul_le: a general version of Dirichlet's approximation theorem
  • AddCircle.exists_norm_nsmul_le: Dirichlet's approximation theorem

TODO

The hypothesis hδ in AddCircle.addWellApproximable_ae_empty_or_univ can be dropped. An elementary (non-measure-theoretic) argument shows that if ¬ hδ holds then addWellApproximable 𝕊 δ = univ (provided δ is non-negative).

Use AddCircle.exists_norm_nsmul_le to prove: addWellApproximable 𝕊 (fun n ↦ 1 / n^2) = { ξ | ¬ IsOfFinAddOrder ξ } (which is equivalent to Real.infinite_rat_abs_sub_lt_one_div_den_sq_iff_irrational).

def approxOrderOf E1 #

(A : Type u_1) → [SeminormedGroup A] → ℕ → ℝ → Set A

In a seminormed group A, given n : ℕ and δ : ℝ, approxOrderOf A n δ is the set of elements within a distance δ of a point of order n.

def approxAddOrderOf E1 #

(A : Type u_1) → [SeminormedAddGroup A] → ℕ → ℝ → Set A

In a seminormed additive group A, given n : ℕ and δ : ℝ, approxAddOrderOf A n δ is the set of elements within a distance δ of a point of order n.

theorem mem_approxOrderOf_iff E0 #

∀ {A : Type u_1} [inst : SeminormedGroup A] {n : ℕ} {δ : ℝ} {a : A},
  a ∈ approxOrderOf A n δ ↔ ∃ b, orderOf b = n ∧ a ∈ Metric.ball b δ

theorem mem_approx_add_orderOf_iff E0 #

∀ {A : Type u_1} [inst : SeminormedAddGroup A] {n : ℕ} {δ : ℝ} {a : A},
  a ∈ approxAddOrderOf A n δ ↔ ∃ b, addOrderOf b = n ∧ a ∈ Metric.ball b δ

def wellApproximable E1 #

(A : Type u_1) → [SeminormedGroup A] → (ℕ → ℝ) → Set A

In a seminormed group A, given a sequence of distances δ₁, δ₂, ..., wellApproximable A δ is the limsup as n → ∞ of the sets approxOrderOf A n δₙ. Thus, it is the set of points that lie in infinitely many of the sets approxOrderOf A n δₙ.

def addWellApproximable E1 #

(A : Type u_1) → [SeminormedAddGroup A] → (ℕ → ℝ) → Set A

In a seminormed additive group A, given a sequence of distances δ₁, δ₂, ..., addWellApproximable A δ is the limsup as n → ∞ of the sets approxAddOrderOf A n δₙ. Thus, it is the set of points that lie in infinitely many of the sets approxAddOrderOf A n δₙ.

theorem mem_add_wellApproximable_iff E0 #

∀ {A : Type u_1} [inst : SeminormedAddGroup A] {δ : ℕ → ℝ} {a : A},
  a ∈ addWellApproximable A δ ↔ a ∈ Filter.blimsup (fun n ↦ approxAddOrderOf A n (δ n)) Filter.atTop fun n ↦ 0 < n

theorem mem_wellApproximable_iff E0 #

∀ {A : Type u_1} [inst : SeminormedGroup A] {δ : ℕ → ℝ} {a : A},
  a ∈ wellApproximable A δ ↔ a ∈ Filter.blimsup (fun n ↦ approxOrderOf A n (δ n)) Filter.atTop fun n ↦ 0 < n

theorem approxOrderOf.image_pow_subset_of_coprime E1 #

∀ {A : Type u_1} [inst : SeminormedCommGroup A] {m n : ℕ} (δ : ℝ),
  0 < m → n.Coprime m → (fun y ↦ y ^ m) '' approxOrderOf A n δ ⊆ approxOrderOf A n (↑m * δ)

theorem approxAddOrderOf.image_nsmul_subset_of_coprime E1 #

∀ {A : Type u_1} [inst : SeminormedAddCommGroup A] {m n : ℕ} (δ : ℝ),
  0 < m → n.Coprime m → (fun y ↦ m • y) '' approxAddOrderOf A n δ ⊆ approxAddOrderOf A n (↑m * δ)

theorem approxAddOrderOf.image_nsmul_subset E1 #

∀ {A : Type u_1} [inst : SeminormedAddCommGroup A] {m : ℕ} (δ : ℝ) (n : ℕ),
  0 < m → (fun y ↦ m • y) '' approxAddOrderOf A (n * m) δ ⊆ approxAddOrderOf A n (↑m * δ)

theorem approxOrderOf.image_pow_subset E1 #

∀ {A : Type u_1} [inst : SeminormedCommGroup A] {m : ℕ} (δ : ℝ) (n : ℕ),
  0 < m → (fun y ↦ y ^ m) '' approxOrderOf A (n * m) δ ⊆ approxOrderOf A n (↑m * δ)

theorem approxOrderOf.smul_subset_of_coprime E1 #

∀ {A : Type u_1} [inst : SeminormedCommGroup A] {a : A} {n : ℕ} (δ : ℝ),
  (orderOf a).Coprime n → a • approxOrderOf A n δ ⊆ approxOrderOf A (orderOf a * n) δ

theorem approxAddOrderOf.vadd_subset_of_coprime E1 #

∀ {A : Type u_1} [inst : SeminormedAddCommGroup A] {a : A} {n : ℕ} (δ : ℝ),
  (addOrderOf a).Coprime n → a +ᵥ approxAddOrderOf A n δ ⊆ approxAddOrderOf A (addOrderOf a * n) δ

theorem approxAddOrderOf.vadd_eq_of_mul_dvd E1 #

∀ {A : Type u_1} [inst : SeminormedAddCommGroup A] {a : A} {n : ℕ} (δ : ℝ),
  0 < n → addOrderOf a ^ 2 ∣ n → a +ᵥ approxAddOrderOf A n δ = approxAddOrderOf A n δ

theorem approxOrderOf.smul_eq_of_mul_dvd E1 #

∀ {A : Type u_1} [inst : SeminormedCommGroup A] {a : A} {n : ℕ} (δ : ℝ),
  0 < n → orderOf a ^ 2 ∣ n → a • approxOrderOf A n δ = approxOrderOf A n δ

theorem UnitAddCircle.mem_approxAddOrderOf_iff E0 #

∀ {δ : ℝ} {x : UnitAddCircle} {n : ℕ},
  0 < n → (x ∈ approxAddOrderOf UnitAddCircle n δ ↔ ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ)

theorem UnitAddCircle.mem_addWellApproximable_iff E0 #

∀ (δ : ℕ → ℝ) (x : UnitAddCircle),
  x ∈ addWellApproximable UnitAddCircle δ ↔ {n | ∃ m < n, gcd m n = 1 ∧ ‖x - ↑(↑m / ↑n)‖ < δ n}.Infinite

theorem AddCircle.addWellApproximable_ae_empty_or_univ E1 #

∀ {T : ℝ} [hT : Fact (0 < T)] (δ : ℕ → ℝ),
  Filter.Tendsto δ Filter.atTop (nhds 0) →
    (∀ᵐ (x : AddCircle T), x ∉ addWellApproximable (AddCircle T) δ) ∨
      ∀ᵐ (x : AddCircle T), x ∈ addWellApproximable (AddCircle T) δ

Gallagher's ergodic theorem on Diophantine approximation.

theorem NormedAddCommGroup.exists_norm_nsmul_le E1 #

∀ {A : Type u_1} [inst : NormedAddCommGroup A] [CompactSpace A] [PreconnectedSpace A] [inst_3 : MeasurableSpace A]
  [BorelSpace A] {μ : MeasureTheory.Measure A} [μ.IsAddHaarMeasure] (ξ : A) {n : ℕ},
  0 < n → ∀ (δ : ℝ), μ Set.univ ≤ (n + 1) • μ (Metric.closedBall 0 (δ / 2)) → ∃ j ∈ Set.Icc 1 n, ‖j • ξ‖ ≤ δ

A general version of Dirichlet's approximation theorem.

See also AddCircle.exists_norm_nsmul_le.

theorem AddCircle.exists_norm_nsmul_le E3 #

∀ {T : ℝ} [hT : Fact (0 < T)] (ξ : AddCircle T) {n : ℕ}, 0 < n → ∃ j ∈ Set.Icc 1 n, ‖j • ξ‖ ≤ T / ↑(n + 1)

Dirichlet's approximation theorem

See also Real.exists_rat_abs_sub_le_and_den_le.