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

Commit ded0d64

Browse files
committed
feat(number_theory): define "admissible" absolute values (#8964)
We say an absolute value `abv : absolute_value R ℤ` is admissible if it agrees with the Euclidean domain structure on R (see also `is_euclidean` in #8949), and large enough sets of elements in `R^n` contain two elements whose remainders are close together. Examples include `abs : ℤ → ℤ` and `card_pow_degree := λ (p : polynomial Fq), (q ^ p.degree : ℤ)`, where `Fq` is a finite field with `q` elements. (These two correspond to the number field and function field case respectively, in our proof that the class number of a global field is finite.) Proving these two are indeed admissible involves a lot of pushing values between `ℤ` and `ℝ`, but is otherwise not so exciting. Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
1 parent ec51460 commit ded0d64

File tree

5 files changed

+466
-0
lines changed

5 files changed

+466
-0
lines changed

src/algebra/euclidean_absolute_value.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ local infix ` ≺ `:50 := euclidean_domain.r
2323

2424
namespace absolute_value
2525

26+
section ordered_semiring
27+
2628
variables {R S : Type*} [euclidean_domain R] [ordered_semiring S]
2729
variables (abv : absolute_value R S)
2830

@@ -48,6 +50,8 @@ h.map_lt_map_iff.mpr (euclidean_domain.mod_lt a hb)
4850

4951
end is_euclidean
5052

53+
end ordered_semiring
54+
5155
section int
5256

5357
open int

src/data/polynomial/degree/lemmas.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,14 @@ lemma degree_pos_of_eval₂_root {p : polynomial R} (hp : p ≠ 0) (f : R →+*
144144
0 < degree p :=
145145
nat_degree_pos_iff_degree_pos.mp (nat_degree_pos_of_eval₂_root hp f hz inj)
146146

147+
@[simp] lemma coe_lt_degree {p : polynomial R} {n : ℕ} :
148+
((n : with_bot ℕ) < degree p) ↔ n < nat_degree p :=
149+
begin
150+
by_cases h : p = 0,
151+
{ simp [h] },
152+
rw [degree_eq_nat_degree h, with_bot.coe_lt_coe],
153+
end
154+
147155
end degree
148156
end semiring
149157

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/-
2+
Copyright (c) 2021 Anne Baanen. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Anne Baanen
5+
-/
6+
import number_theory.class_number.admissible_absolute_value
7+
8+
/-!
9+
# Admissible absolute value on the integers
10+
This file defines an admissible absolute value `absolute_value.abs_is_admissible`
11+
which we use to show the class number of the ring of integers of a number field
12+
is finite.
13+
14+
## Main results
15+
16+
* `absolute_value.abs_is_admissible` shows the "standard" absolute value on `ℤ`,
17+
mapping negative `x` to `-x`, is admissible.
18+
-/
19+
20+
namespace absolute_value
21+
22+
open int
23+
24+
/-- We can partition a finite family into `partition_card ε` sets, such that the remainders
25+
in each set are close together. -/
26+
lemma exists_partition_int (n : ℕ) {ε : ℝ} (hε : 0 < ε) {b : ℤ} (hb : b ≠ 0) (A : fin n → ℤ) :
27+
∃ (t : fin n → fin (nat_ceil (1 / ε))),
28+
∀ i₀ i₁, t i₀ = t i₁ → ↑(abs (A i₁ % b - A i₀ % b)) < abs b • ε :=
29+
begin
30+
have hb' : (0 : ℝ) < ↑(abs b) := int.cast_pos.mpr (abs_pos.mpr hb),
31+
have hbε : 0 < abs b • ε,
32+
{ rw algebra.smul_def,
33+
exact mul_pos hb' hε },
34+
have hfloor : ∀ i, 0 ≤ floor ((A i % b : ℤ) / (abs b • ε) : ℝ),
35+
{ intro i,
36+
exact floor_nonneg.mpr (div_nonneg (cast_nonneg.mpr (mod_nonneg _ hb)) hbε.le) },
37+
refine ⟨λ i, ⟨nat_abs (floor ((A i % b : ℤ) / (abs b • ε) : ℝ)), _⟩, _⟩,
38+
{ rw [← coe_nat_lt, nat_abs_of_nonneg (hfloor i), floor_lt],
39+
apply lt_of_lt_of_le _ (le_nat_ceil _),
40+
rw [algebra.smul_def, ring_hom.eq_int_cast, ← div_div_eq_div_mul, div_lt_div_right hε,
41+
div_lt_iff hb', one_mul, cast_lt],
42+
exact int.mod_lt _ hb },
43+
intros i₀ i₁ hi,
44+
have hi : (⌊↑(A i₀ % b) / abs b • ε⌋.nat_abs : ℤ) = ⌊↑(A i₁ % b) / abs b • ε⌋.nat_abs :=
45+
congr_arg (coe : ℕ → ℤ) (subtype.mk_eq_mk.mp hi),
46+
rw [nat_abs_of_nonneg (hfloor i₀), nat_abs_of_nonneg (hfloor i₁)] at hi,
47+
have hi := abs_sub_lt_one_of_floor_eq_floor hi,
48+
rw [abs_sub_comm, ← sub_div, abs_div, abs_of_nonneg hbε.le, div_lt_iff hbε, one_mul] at hi,
49+
rwa [int.cast_abs, int.cast_sub]
50+
end
51+
52+
/-- `abs : ℤ → ℤ` is an admissible absolute value -/
53+
noncomputable def abs_is_admissible : is_admissible absolute_value.abs :=
54+
{ card := λ ε, nat_ceil (1 / ε),
55+
exists_partition' := λ n ε hε b hb, exists_partition_int n hε hb,
56+
.. absolute_value.abs_is_euclidean }
57+
58+
noncomputable instance : inhabited (is_admissible absolute_value.abs) :=
59+
⟨abs_is_admissible⟩
60+
61+
end absolute_value
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/-
2+
Copyright (c) 2021 Anne Baanen. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Anne Baanen
5+
-/
6+
import algebra.euclidean_absolute_value
7+
import analysis.special_functions.pow
8+
import combinatorics.pigeonhole
9+
10+
/-!
11+
# Admissible absolute values
12+
This file defines a structure `absolute_value.is_admissible` which we use to show the class number
13+
of the ring of integers of a global field is finite.
14+
15+
## Main definitions
16+
17+
* `absolute_value.is_admissible abv` states the absolute value `abv : R → ℤ`
18+
respects the Euclidean domain structure on `R`, and that a large enough set
19+
of elements of `R^n` contains a pair of elements whose remainders are
20+
pointwise close together.
21+
22+
## Main results
23+
24+
* `absolute_value.abs_is_admissible` shows the "standard" absolute value on `ℤ`,
25+
mapping negative `x` to `-x`, is admissible.
26+
* `polynomial.card_pow_degree_is_admissible` shows `card_pow_degree`,
27+
mapping `p : polynomial 𝔽_q` to `q ^ degree p`, is admissible
28+
-/
29+
30+
local infix ` ≺ `:50 := euclidean_domain.r
31+
32+
namespace absolute_value
33+
34+
variables {R : Type*} [euclidean_domain R]
35+
variables (abv : absolute_value R ℤ)
36+
37+
/-- An absolute value `R → ℤ` is admissible if it respects the Euclidean domain
38+
structure and a large enough set of elements in `R^n` will contain a pair of
39+
elements whose remainders are pointwise close together. -/
40+
structure is_admissible extends is_euclidean abv :=
41+
(card : ℝ → ℕ)
42+
(exists_partition' : ∀ (n : ℕ) {ε : ℝ} (hε : 0 < ε) {b : R} (hb : b ≠ 0) (A : fin n → R),
43+
∃ (t : fin n → fin (card ε)),
44+
∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ % b - A i₀ % b) : ℝ) < abv b • ε)
45+
46+
attribute [protected] is_admissible.card
47+
48+
namespace is_admissible
49+
50+
variables {abv}
51+
52+
/-- For all `ε > 0` and finite families `A`, we can partition the remainders of `A` mod `b`
53+
into `abv.card ε` sets, such that all elements in each part of remainders are close together. -/
54+
lemma exists_partition {ι : Type*} [fintype ι] {ε : ℝ} (hε : 0 < ε) {b : R} (hb : b ≠ 0)
55+
(A : ι → R) (h : abv.is_admissible) :
56+
∃ (t : ι → fin (h.card ε)),
57+
∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ % b - A i₀ % b) : ℝ) < abv b • ε :=
58+
begin
59+
let e := fintype.equiv_fin ι,
60+
obtain ⟨t, ht⟩ := h.exists_partition' (fintype.card ι) hε hb (A ∘ e.symm),
61+
refine ⟨t ∘ e, λ i₀ i₁ h, _⟩,
62+
convert ht (e i₀) (e i₁) h; simp only [e.symm_apply_apply]
63+
end
64+
65+
/-- Any large enough family of vectors in `R^n` has a pair of elements
66+
whose remainders are close together, pointwise. -/
67+
lemma exists_approx_aux (n : ℕ) (h : abv.is_admissible) :
68+
∀ {ε : ℝ} (hε : 0 < ε) {b : R} (hb : b ≠ 0) (A : fin (h.card ε ^ n).succ → (fin n → R)),
69+
∃ (i₀ i₁), (i₀ ≠ i₁) ∧ ∀ k, (abv (A i₁ k % b - A i₀ k % b) : ℝ) < abv b • ε :=
70+
begin
71+
haveI := classical.dec_eq R,
72+
induction n with n ih,
73+
{ intros ε hε b hb A,
74+
refine ⟨0, 1, _, _⟩,
75+
{ simp },
76+
rintros ⟨i, ⟨⟩⟩ },
77+
intros ε hε b hb A,
78+
set M := h.card ε with hM,
79+
-- By the "nicer" pigeonhole principle, we can find a collection `s`
80+
-- of more than `M^n` remainders where the first components lie close together:
81+
obtain ⟨s, s_inj, hs⟩ : ∃ s : fin (M ^ n).succ → fin (M ^ n.succ).succ,
82+
function.injective s ∧
83+
∀ i₀ i₁, (abv (A (s i₁) 0 % b - A (s i₀) 0 % b) : ℝ) < abv b • ε,
84+
{ -- We can partition the `A`s into `M` subsets where
85+
-- the first components lie close together:
86+
obtain ⟨t, ht⟩ : ∃ (t : fin (M ^ n.succ).succ → fin M),
87+
∀ i₀ i₁, t i₀ = t i₁ → (abv (A i₁ 0 % b - A i₀ 0 % b) : ℝ) < abv b • ε :=
88+
h.exists_partition hε hb (λ x, A x 0),
89+
-- Since the `M` subsets contain more than `M * M^n` elements total,
90+
-- there must be a subset that contains more than `M^n` elements.
91+
obtain ⟨s, hs⟩ := @fintype.exists_lt_card_fiber_of_mul_lt_card _ _ _ _ _ t (M ^ n)
92+
(by simpa only [fintype.card_fin, pow_succ] using nat.lt_succ_self (M ^ n.succ) ),
93+
refine ⟨λ i, (finset.univ.filter (λ x, t x = s)).to_list.nth_le i _, _, λ i₀ i₁, ht _ _ _⟩,
94+
{ refine i.2.trans_le _, rwa finset.length_to_list },
95+
{ intros i j h, ext, exact list.nodup_iff_nth_le_inj.mp (finset.nodup_to_list _) _ _ _ _ h },
96+
have : ∀ i h, (finset.univ.filter (λ x, t x = s)).to_list.nth_le i h ∈
97+
finset.univ.filter (λ x, t x = s),
98+
{ intros i h, exact (finset.mem_to_list _).mp (list.nth_le_mem _ _ _) },
99+
obtain ⟨_, h₀⟩ := finset.mem_filter.mp (this i₀ _),
100+
obtain ⟨_, h₁⟩ := finset.mem_filter.mp (this i₁ _),
101+
exact h₀.trans h₁.symm },
102+
-- Since `s` is large enough, there are two elements of `A ∘ s`
103+
-- where the second components lie close together.
104+
obtain ⟨k₀, k₁, hk, h⟩ := ih hε hb (λ x, fin.tail (A (s x))),
105+
refine ⟨s k₀, s k₁, λ h, hk (s_inj h), λ i, fin.cases _ (λ i, _) i⟩,
106+
{ exact hs k₀ k₁ },
107+
{ exact h i },
108+
end
109+
110+
/-- Any large enough family of vectors in `R^ι` has a pair of elements
111+
whose remainders are close together, pointwise. -/
112+
lemma exists_approx {ι : Type*} [fintype ι] {ε : ℝ} (hε : 0 < ε) {b : R} (hb : b ≠ 0)
113+
(h : abv.is_admissible)
114+
(A : fin (h.card ε ^ fintype.card ι).succ → ι → R) :
115+
∃ (i₀ i₁), (i₀ ≠ i₁) ∧ ∀ k, (abv (A i₁ k % b - A i₀ k % b) : ℝ) < abv b • ε :=
116+
begin
117+
let e := fintype.equiv_fin ι,
118+
obtain ⟨i₀, i₁, ne, h⟩ := h.exists_approx_aux (fintype.card ι) hε hb (λ x y, A x (e.symm y)),
119+
refine ⟨i₀, i₁, ne, λ k, _⟩,
120+
convert h (e k); simp only [e.symm_apply_apply]
121+
end
122+
123+
end is_admissible
124+
125+
end absolute_value

0 commit comments

Comments
 (0)