Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 34b9933

Browse files
committed
feat(number_theory/liouville): the set of Liouville numbers has measure zero (#9702)
As a corollary, the filters `residual ℝ` and `volume.ae` are disjoint.
1 parent c363ad6 commit 34b9933

File tree

4 files changed

+471
-0
lines changed

4 files changed

+471
-0
lines changed
Lines changed: 330 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,330 @@
1+
/-
2+
Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Yury G. Kudryashov
5+
-/
6+
import analysis.special_functions.pow
7+
import number_theory.liouville.basic
8+
import topology.instances.irrational
9+
10+
/-!
11+
# Liouville numbers with a given exponent
12+
13+
We say that a real number `x` is a Liouville number with exponent `p : ℝ` if there exists a real
14+
number `C` such that for infinitely many denominators `n` there exists a numerator `m` such that
15+
`x ≠ m / n` and `|x - m / n| < C / n ^ p`. A number is a Liouville number in the sense of
16+
`liouville` if it is `liouville_with` any real exponent, see `forall_liouville_with_iff`.
17+
18+
* If `p ≤ 1`, then this condition is trivial.
19+
20+
* If `1 < p ≤ 2`, then this condition is equivalent to `irrational x`. The forward implication
21+
does not require `p ≤ 2` and is formalized as `liouville_with.irrational`; the other implication
22+
follows from approximations by continued fractions and is not formalized yet.
23+
24+
* If `p > 2`, then this is a non-trivial condition on irrational numbers. In particular,
25+
[Thue–Siegel–Roth theorem](https://en.wikipedia.org/wiki/Roth's_theorem) states that such numbers
26+
must be transcendental.
27+
28+
In this file we define the predicate `liouville_with` and prove some basic facts about this
29+
predicate.
30+
31+
## Tags
32+
33+
Liouville number, irrational, irrationality exponent
34+
-/
35+
36+
open filter metric real set
37+
open_locale filter topological_space
38+
39+
/-- We say that a real number `x` is a Liouville number with exponent `p : ℝ` if there exists a real
40+
number `C` such that for infinitely many denominators `n` there exists a numerator `m` such that
41+
`x ≠ m / n` and `|x - m / n| < C / n ^ p`.
42+
43+
A number is a Liouville number in the sense of `liouville` if it is `liouville_with` any real
44+
exponent. -/
45+
def liouville_with (p x : ℝ) : Prop :=
46+
∃ C, ∃ᶠ n : ℕ in at_top, ∃ m : ℤ, x ≠ m / n ∧ |x - m / n| < C / n ^ p
47+
48+
/-- For `p = 1` (hence, for any `p ≤ 1`), the condition `liouville_with p x` is trivial. -/
49+
lemma liouville_with_one (x : ℝ) : liouville_with 1 x :=
50+
begin
51+
use 2,
52+
refine ((eventually_gt_at_top 0).mono $ λ n hn, _).frequently,
53+
have hn' : (0 : ℝ) < n, by simpa,
54+
have : x < ↑(⌊x * ↑n⌋ + 1) / ↑n,
55+
{ rw [lt_div_iff hn', int.cast_add, int.cast_one], exact int.lt_floor_add_one _ },
56+
refine ⟨⌊x * n⌋ + 1, this.ne, _⟩,
57+
rw [abs_sub_comm, abs_of_pos (sub_pos.2 this), rpow_one, sub_lt_iff_lt_add',
58+
add_div_eq_mul_add_div _ _ hn'.ne', div_lt_div_right hn'],
59+
simpa [bit0, ← add_assoc] using (int.floor_le (x * n)).trans_lt (lt_add_one _)
60+
end
61+
62+
namespace liouville_with
63+
64+
variables {p q x y : ℝ} {r : ℚ} {m : ℤ} {n : ℕ}
65+
66+
/-- The constant `C` provided by the definition of `liouville_with` can be made positive.
67+
We also add `1 ≤ n` to the list of assumptions about the denominator. While it is equivalent to
68+
the original statement, the case `n = 0` breaks many arguments. -/
69+
lemma exists_pos (h : liouville_with p x) :
70+
∃ (C : ℝ) (h₀ : 0 < C),
71+
∃ᶠ n : ℕ in at_top, 1 ≤ n ∧ ∃ m : ℤ, x ≠ m / n ∧ |x - m / n| < C / n ^ p :=
72+
begin
73+
rcases h with ⟨C, hC⟩,
74+
refine ⟨max C 1, zero_lt_one.trans_le $ le_max_right _ _, _⟩,
75+
refine ((eventually_ge_at_top 1).and_frequently hC).mono _,
76+
rintro n ⟨hle, m, hne, hlt⟩,
77+
refine ⟨hle, m, hne, hlt.trans_le _⟩,
78+
exact div_le_div_of_le (rpow_nonneg_of_nonneg n.cast_nonneg _) (le_max_left _ _)
79+
end
80+
81+
/-- If a number is Liouville with exponent `p`, then it is Liouville with any smaller exponent. -/
82+
lemma mono (h : liouville_with p x) (hle : q ≤ p) : liouville_with q x :=
83+
begin
84+
rcases h.exists_pos with ⟨C, hC₀, hC⟩,
85+
refine ⟨C, hC.mono _⟩, rintro n ⟨hn, m, hne, hlt⟩,
86+
refine ⟨m, hne, hlt.trans_le $ div_le_div_of_le_left hC₀.le _ _⟩,
87+
exacts [rpow_pos_of_pos (nat.cast_pos.2 hn) _,
88+
rpow_le_rpow_of_exponent_le (nat.one_le_cast.2 hn) hle]
89+
end
90+
91+
/-- If `x` satisfies Liouville condition with exponent `p` and `q < p`, then `x`
92+
satisfies Liouville condition with exponent `q` and constant `1`. -/
93+
lemma frequently_lt_rpow_neg (h : liouville_with p x) (hlt : q < p) :
94+
∃ᶠ n : ℕ in at_top, ∃ m : ℤ, x ≠ m / n ∧ |x - m / n| < n ^ (-q) :=
95+
begin
96+
rcases h.exists_pos with ⟨C, hC₀, hC⟩,
97+
have : ∀ᶠ n : ℕ in at_top, C < n ^ (p - q),
98+
by simpa only [(∘), neg_sub, one_div] using ((tendsto_rpow_at_top (sub_pos.2 hlt)).comp
99+
tendsto_coe_nat_at_top_at_top).eventually (eventually_gt_at_top C),
100+
refine (this.and_frequently hC).mono _,
101+
rintro n ⟨hnC, hn, m, hne, hlt⟩,
102+
replace hn : (0 : ℝ) < n := nat.cast_pos.2 hn,
103+
refine ⟨m, hne, hlt.trans $ (div_lt_iff $ rpow_pos_of_pos hn _).2 _⟩,
104+
rwa [mul_comm, ← rpow_add hn, ← sub_eq_add_neg]
105+
end
106+
107+
/-- The product of a Liouville number and a nonzero rational number is again a Liouville number. -/
108+
lemma mul_rat (h : liouville_with p x) (hr : r ≠ 0) : liouville_with p (x * r) :=
109+
begin
110+
rcases h.exists_pos with ⟨C, hC₀, hC⟩,
111+
refine ⟨r.denom ^ p * (|r| * C), (tendsto_id.nsmul_at_top r.pos).frequently (hC.mono _)⟩,
112+
rintro n ⟨hn, m, hne, hlt⟩,
113+
have A : (↑(r.num * m) : ℝ) / ↑(r.denom • id n) = (m / n) * r,
114+
by simp [← div_mul_div, ← r.cast_def, mul_comm],
115+
refine ⟨r.num * m, _, _⟩,
116+
{ rw A, simp [hne, hr] },
117+
{ rw [A, ← sub_mul, abs_mul],
118+
simp only [smul_eq_mul, id.def, nat.cast_mul],
119+
refine (mul_lt_mul_of_pos_right hlt $ abs_pos.2 $ rat.cast_ne_zero.2 hr).trans_le _,
120+
rw [mul_rpow, mul_div_mul_left, mul_comm, mul_div_assoc],
121+
exacts [(rpow_pos_of_pos (nat.cast_pos.2 r.pos) _).ne', nat.cast_nonneg _, nat.cast_nonneg _] }
122+
end
123+
124+
/-- The product `x * r`, `r : ℚ`, `r ≠ 0`, is a Liouville number with exponent `p` if and only if
125+
`x` satisfies the same condition. -/
126+
lemma mul_rat_iff (hr : r ≠ 0) : liouville_with p (x * r) ↔ liouville_with p x :=
127+
⟨λ h, by simpa only [mul_assoc, ← rat.cast_mul, mul_inv_cancel hr, rat.cast_one, mul_one]
128+
using h.mul_rat (inv_ne_zero hr), λ h, h.mul_rat hr⟩
129+
130+
/-- The product `r * x`, `r : ℚ`, `r ≠ 0`, is a Liouville number with exponent `p` if and only if
131+
`x` satisfies the same condition. -/
132+
lemma rat_mul_iff (hr : r ≠ 0) : liouville_with p (r * x) ↔ liouville_with p x :=
133+
by rw [mul_comm, mul_rat_iff hr]
134+
135+
lemma rat_mul (h : liouville_with p x) (hr : r ≠ 0) : liouville_with p (r * x) :=
136+
(rat_mul_iff hr).2 h
137+
138+
lemma mul_int_iff (hm : m ≠ 0) : liouville_with p (x * m) ↔ liouville_with p x :=
139+
by rw [← rat.cast_coe_int, mul_rat_iff (int.cast_ne_zero.2 hm)]
140+
141+
lemma mul_int (h : liouville_with p x) (hm : m ≠ 0) : liouville_with p (x * m) :=
142+
(mul_int_iff hm).2 h
143+
144+
lemma int_mul_iff (hm : m ≠ 0) : liouville_with p (m * x) ↔ liouville_with p x :=
145+
by rw [mul_comm, mul_int_iff hm]
146+
147+
lemma int_mul (h : liouville_with p x) (hm : m ≠ 0) : liouville_with p (m * x) :=
148+
(int_mul_iff hm).2 h
149+
150+
lemma mul_nat_iff (hn : n ≠ 0) : liouville_with p (x * n) ↔ liouville_with p x :=
151+
by rw [← rat.cast_coe_nat, mul_rat_iff (nat.cast_ne_zero.2 hn)]
152+
153+
lemma mul_nat (h : liouville_with p x) (hn : n ≠ 0) : liouville_with p (x * n) :=
154+
(mul_nat_iff hn).2 h
155+
156+
lemma nat_mul_iff (hn : n ≠ 0) : liouville_with p (n * x) ↔ liouville_with p x:=
157+
by rw [mul_comm, mul_nat_iff hn]
158+
159+
lemma nat_mul (h : liouville_with p x) (hn : n ≠ 0) : liouville_with p (n * x) :=
160+
by { rw mul_comm, exact h.mul_nat hn }
161+
162+
lemma add_rat (h : liouville_with p x) (r : ℚ) : liouville_with p (x + r) :=
163+
begin
164+
rcases h.exists_pos with ⟨C, hC₀, hC⟩,
165+
refine ⟨r.denom ^ p * C, (tendsto_id.nsmul_at_top r.pos).frequently (hC.mono _)⟩,
166+
rintro n ⟨hn, m, hne, hlt⟩,
167+
have hr : (0 : ℝ) < r.denom, from nat.cast_pos.2 r.pos,
168+
have hn' : (n : ℝ) ≠ 0, from nat.cast_ne_zero.2 (zero_lt_one.trans_le hn).ne',
169+
have : (↑(r.denom * m + r.num * n : ℤ) / ↑(r.denom • id n) : ℝ) = m / n + r,
170+
by simp [add_div, hr.ne', mul_div_mul_left, mul_div_mul_right, hn', ← rat.cast_def],
171+
refine ⟨r.denom * m + r.num * n, _⟩, rw [this, add_sub_add_right_eq_sub],
172+
refine ⟨by simpa, hlt.trans_le (le_of_eq _)⟩,
173+
have : (r.denom ^ p : ℝ) ≠ 0, from (rpow_pos_of_pos hr _).ne',
174+
simp [mul_rpow, nat.cast_nonneg, mul_div_mul_left, this]
175+
end
176+
177+
@[simp] lemma add_rat_iff : liouville_with p (x + r) ↔ liouville_with p x :=
178+
⟨λ h, by simpa using h.add_rat (-r), λ h, h.add_rat r⟩
179+
180+
@[simp] lemma rat_add_iff : liouville_with p (r + x) ↔ liouville_with p x :=
181+
by rw [add_comm, add_rat_iff]
182+
183+
lemma rat_add (h : liouville_with p x) (r : ℚ) : liouville_with p (r + x) :=
184+
add_comm x r ▸ h.add_rat r
185+
186+
@[simp] lemma add_int_iff : liouville_with p (x + m) ↔ liouville_with p x :=
187+
by rw [← rat.cast_coe_int m, add_rat_iff]
188+
189+
@[simp] lemma int_add_iff : liouville_with p (m + x) ↔ liouville_with p x :=
190+
by rw [add_comm, add_int_iff]
191+
192+
@[simp] lemma add_nat_iff : liouville_with p (x + n) ↔ liouville_with p x :=
193+
by rw [← rat.cast_coe_nat n, add_rat_iff]
194+
195+
@[simp] lemma nat_add_iff : liouville_with p (n + x) ↔ liouville_with p x :=
196+
by rw [add_comm, add_nat_iff]
197+
198+
lemma add_int (h : liouville_with p x) (m : ℤ) : liouville_with p (x + m) := add_int_iff.2 h
199+
200+
lemma int_add (h : liouville_with p x) (m : ℤ) : liouville_with p (m + x) := int_add_iff.2 h
201+
202+
lemma add_nat (h : liouville_with p x) (n : ℕ) : liouville_with p (x + n) := h.add_int n
203+
204+
lemma nat_add (h : liouville_with p x) (n : ℕ) : liouville_with p (n + x) := h.int_add n
205+
206+
protected lemma neg (h : liouville_with p x) : liouville_with p (-x) :=
207+
begin
208+
rcases h with ⟨C, hC⟩,
209+
refine ⟨C, hC.mono _⟩,
210+
rintro n ⟨m, hne, hlt⟩,
211+
use (-m), simp [neg_div, abs_sub_comm _ x, *]
212+
end
213+
214+
@[simp] lemma neg_iff : liouville_with p (-x) ↔ liouville_with p x :=
215+
⟨λ h, neg_neg x ▸ h.neg, liouville_with.neg⟩
216+
217+
@[simp] lemma sub_rat_iff : liouville_with p (x - r) ↔ liouville_with p x :=
218+
by rw [sub_eq_add_neg, ← rat.cast_neg, add_rat_iff]
219+
220+
lemma sub_rat (h : liouville_with p x) (r : ℚ) : liouville_with p (x - r) :=
221+
sub_rat_iff.2 h
222+
223+
@[simp] lemma sub_int_iff : liouville_with p (x - m) ↔ liouville_with p x :=
224+
by rw [← rat.cast_coe_int, sub_rat_iff]
225+
226+
lemma sub_int (h : liouville_with p x) (m : ℤ) : liouville_with p (x - m) := sub_int_iff.2 h
227+
228+
@[simp] lemma sub_nat_iff : liouville_with p (x - n) ↔ liouville_with p x :=
229+
by rw [← rat.cast_coe_nat, sub_rat_iff]
230+
231+
lemma sub_nat (h : liouville_with p x) (n : ℕ) : liouville_with p (x - n) := sub_nat_iff.2 h
232+
233+
@[simp] lemma rat_sub_iff : liouville_with p (r - x) ↔ liouville_with p x :=
234+
by simp [sub_eq_add_neg]
235+
236+
lemma rat_sub (h : liouville_with p x) (r : ℚ) : liouville_with p (r - x) := rat_sub_iff.2 h
237+
238+
@[simp] lemma int_sub_iff : liouville_with p (m - x) ↔ liouville_with p x :=
239+
by simp [sub_eq_add_neg]
240+
241+
lemma int_sub (h : liouville_with p x) (m : ℤ) : liouville_with p (m - x) := int_sub_iff.2 h
242+
243+
@[simp] lemma nat_sub_iff : liouville_with p (n - x) ↔ liouville_with p x :=
244+
by simp [sub_eq_add_neg]
245+
246+
lemma nat_sub (h : liouville_with p x) (n : ℕ) : liouville_with p (n - x) := nat_sub_iff.2 h
247+
248+
lemma ne_cast_int (h : liouville_with p x) (hp : 1 < p) (m : ℤ) : x ≠ m :=
249+
begin
250+
rintro rfl, rename m M,
251+
rcases ((eventually_gt_at_top 0).and_frequently (h.frequently_lt_rpow_neg hp)).exists
252+
with ⟨n : ℕ, hn : 0 < n, m : ℤ, hne : (M : ℝ) ≠ m / n, hlt : |(M - m / n : ℝ)| < n ^ (-1 : ℝ)⟩,
253+
refine hlt.not_le _,
254+
have hn' : (0 : ℝ) < n, by simpa,
255+
rw [rpow_neg_one, ← one_div, sub_div' _ _ _ hn'.ne', abs_div, nat.abs_cast, div_le_div_right hn'],
256+
norm_cast,
257+
rw [← zero_add (1 : ℤ), int.add_one_le_iff, abs_pos, sub_ne_zero],
258+
rw [ne.def, eq_div_iff hn'.ne'] at hne,
259+
exact_mod_cast hne
260+
end
261+
262+
/-- A number satisfying the Liouville condition with exponent `p > 1` is an irrational number. -/
263+
protected lemma irrational (h : liouville_with p x) (hp : 1 < p) : irrational x :=
264+
begin
265+
rintro ⟨r, rfl⟩,
266+
rcases eq_or_ne r 0 with (rfl|h0),
267+
{ refine h.ne_cast_int hp 0 _, rw [rat.cast_zero, int.cast_zero] },
268+
{ refine (h.mul_rat (inv_ne_zero h0)).ne_cast_int hp 1 _,
269+
simp [rat.cast_ne_zero.2 h0] }
270+
end
271+
272+
end liouville_with
273+
274+
namespace liouville
275+
276+
variables {x : ℝ}
277+
278+
/-- If `x` is a Liouville number, then for any `n`, for infinitely many denominators `b` there
279+
exists a numerator `a` such that `x ≠ a / b` and `|x - a / b| < 1 / b ^ n`. -/
280+
lemma frequently_exists_num (hx : liouville x) (n : ℕ) :
281+
∃ᶠ b : ℕ in at_top, ∃ a : ℤ, x ≠ a / b ∧ |x - a / b| < 1 / b ^ n :=
282+
begin
283+
refine not_not.1 (λ H, _),
284+
simp only [liouville, not_forall, not_exists, not_frequently, not_and, not_lt,
285+
eventually_at_top] at H,
286+
rcases H with ⟨N, hN⟩,
287+
have : ∀ b > (1 : ℕ), ∀ᶠ m : ℕ in at_top, ∀ a : ℤ, (1 / b ^ m : ℝ) ≤ |x - a / b|,
288+
{ intros b hb,
289+
have hb0' : (b : ℚ) ≠ 0 := (zero_lt_one.trans (nat.one_lt_cast.2 hb)).ne',
290+
replace hb : (1 : ℝ) < b := nat.one_lt_cast.2 hb,
291+
have hb0 : (0 : ℝ) < b := zero_lt_one.trans hb,
292+
have H : tendsto (λ m, 1 / b ^ m : ℕ → ℝ) at_top (𝓝 0),
293+
{ simp only [one_div],
294+
exact tendsto_inv_at_top_zero.comp (tendsto_pow_at_top_at_top_of_one_lt hb) },
295+
refine (H.eventually (hx.irrational.eventually_forall_le_dist_cast_div b)).mono _,
296+
exact λ m hm a, hm a },
297+
have : ∀ᶠ m : ℕ in at_top, ∀ b < N, 1 < b → ∀ a : ℤ, (1 / b ^ m : ℝ) ≤ |x - a / b|,
298+
from (finite_lt_nat N).eventually_all.2 (λ b hb, eventually_imp_distrib_left.2 (this b)),
299+
rcases (this.and (eventually_ge_at_top n)).exists with ⟨m, hm, hnm⟩,
300+
rcases hx m with ⟨a, b, hb, hne, hlt⟩,
301+
lift b to ℕ using zero_le_one.trans hb.le, norm_cast at hb, push_cast at hne hlt,
302+
cases le_or_lt N b,
303+
{ refine (hN b h a hne).not_lt (hlt.trans_le _),
304+
replace hb : (1 : ℝ) < b := nat.one_lt_cast.2 hb,
305+
have hb0 : (0 : ℝ) < b := zero_lt_one.trans hb,
306+
exact one_div_le_one_div_of_le (pow_pos hb0 _) (pow_le_pow hb.le hnm) },
307+
{ exact (hm b h hb _).not_lt hlt }
308+
end
309+
310+
/-- A Liouville number is a Liouville number with any real exponent. -/
311+
protected lemma liouville_with (hx : liouville x) (p : ℝ) : liouville_with p x :=
312+
begin
313+
suffices : liouville_with ⌈p⌉₊ x, from this.mono (nat.le_ceil p),
314+
refine ⟨1, ((eventually_gt_at_top 1).and_frequently (hx.frequently_exists_num ⌈p⌉₊)).mono _⟩,
315+
rintro b ⟨hb, a, hne, hlt⟩,
316+
refine ⟨a, hne, _⟩,
317+
rwa rpow_nat_cast
318+
end
319+
320+
end liouville
321+
322+
/-- A number satisfies the Liouville condition with any exponent if and only if it is a Liouville
323+
number. -/
324+
lemma forall_liouville_with_iff {x : ℝ} : (∀ p, liouville_with p x) ↔ liouville x :=
325+
begin
326+
refine ⟨λ H n, _, liouville.liouville_with⟩,
327+
rcases ((eventually_gt_at_top 1).and_frequently
328+
((H (n + 1)).frequently_lt_rpow_neg (lt_add_one n))).exists with ⟨b, hb, a, hne, hlt⟩,
329+
exact ⟨a, b, by exact_mod_cast hb, hne, by simpa [rpow_neg] using hlt⟩,
330+
end

0 commit comments

Comments
 (0)