Skip to content

Commit d19e914

Browse files
erdOnepecherskypre-commit-ci-lite[bot]
committed
feat: the definition of nonarchimedean local fields (#27465)
Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 245959d commit d19e914

File tree

5 files changed

+214
-25
lines changed

5 files changed

+214
-25
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4879,6 +4879,7 @@ import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic
48794879
import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum
48804880
import Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity
48814881
import Mathlib.NumberTheory.LegendreSymbol.ZModChar
4882+
import Mathlib.NumberTheory.LocalField.Basic
48824883
import Mathlib.NumberTheory.LucasLehmer
48834884
import Mathlib.NumberTheory.LucasPrimality
48844885
import Mathlib.NumberTheory.MaricaSchoenheim
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
/-
2+
Copyright (c) 2025 Andrew Yang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Andrew Yang
5+
-/
6+
import Mathlib.RingTheory.Valuation.DiscreteValuativeRel
7+
import Mathlib.Topology.Algebra.Valued.LocallyCompact
8+
import Mathlib.Topology.Algebra.Valued.ValuativeRel
9+
10+
/-!
11+
12+
# Definition of (Non-archimedean) local fields
13+
14+
Given a topological field `K` equipped with an equivalence class of valuations (a `ValuativeRel`),
15+
we say that it is a non-archimedean local field if the topology comes from the given valuation,
16+
and it is locally compact and non-discrete.
17+
18+
-/
19+
20+
/--
21+
Given a topological field `K` equipped with an equivalence class of valuations (a `ValuativeRel`),
22+
we say that it is a non-archimedean local field if the topology comes from the given valuation,
23+
and it is locally compact and non-discrete.
24+
25+
This implies the following typeclasses via `inferInstance`
26+
- `IsValuativeTopology K`
27+
- `LocallyCompactSpace K`
28+
- `IsTopologicalDivisionRing K`
29+
- `ValuativeRel.IsNontrivial K`
30+
- `ValuativeRel.IsRankLeOne K`
31+
- `ValuativeRel.IsDiscrete K`
32+
- `IsDiscreteValuationRing 𝒪[K]`
33+
- `Finite 𝓀[K]`
34+
35+
Assuming we have a compatible `UniformSpace K` instance
36+
(e.g. via `IsTopologicalAddGroup.toUniformSpace` and `isUniformAddGroup_of_addCommGroup`) then
37+
- `CompleteSpace K`
38+
- `CompleteSpace 𝒪[K]`
39+
-/
40+
class IsNonarchimedeanLocalField
41+
(K : Type*) [Field K] [ValuativeRel K] [TopologicalSpace K] : Prop extends
42+
IsValuativeTopology K,
43+
LocallyCompactSpace K,
44+
ValuativeRel.IsNontrivial K
45+
46+
open ValuativeRel Valued.integer
47+
48+
open scoped WithZero
49+
50+
namespace IsNonarchimedeanLocalField
51+
52+
section TopologicalSpace
53+
54+
variable (K : Type*) [Field K] [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K]
55+
56+
attribute [local simp] zero_lt_iff
57+
58+
instance : IsTopologicalDivisionRing K := by
59+
letI := IsTopologicalAddGroup.toUniformSpace K
60+
haveI := isUniformAddGroup_of_addCommGroup (G := K)
61+
infer_instance
62+
63+
lemma isCompact_closedBall (γ : ValueGroupWithZero K) : IsCompact { x | valuation K x ≤ γ } := by
64+
obtain ⟨γ, rfl⟩ := ValuativeRel.valuation_surjective γ
65+
by_cases hγ : γ = 0
66+
· simp [hγ]
67+
letI := IsTopologicalAddGroup.toUniformSpace K
68+
letI := isUniformAddGroup_of_addCommGroup (G := K)
69+
obtain ⟨s, hs, -, hs'⟩ := LocallyCompactSpace.local_compact_nhds (0 : K) .univ Filter.univ_mem
70+
obtain ⟨r, hr, hr1, H⟩ :
71+
∃ r', r' ≠ 0 ∧ valuation K r' < 1 ∧ { x | valuation K x ≤ valuation K r' } ⊆ s := by
72+
obtain ⟨r, hr, hrs⟩ := (IsValuativeTopology.hasBasis_nhds_zero' K).mem_iff.mp hs
73+
obtain ⟨r', hr', hr⟩ := Valuation.IsNontrivial.exists_lt_one (v := valuation K)
74+
simp only [ne_eq, map_eq_zero] at hr'
75+
obtain hr1 | hr1 := lt_or_ge r 1
76+
· obtain ⟨r, rfl⟩ := ValuativeRel.valuation_surjective r
77+
simp only [ne_eq, map_eq_zero] at hr
78+
refine ⟨r ^ 2, by simpa using hr, by simpa [pow_two], fun x hx ↦ hrs ?_⟩
79+
simp only [map_pow, Set.mem_setOf_eq] at hx ⊢
80+
exact hx.trans_lt (by simpa [pow_two, hr])
81+
· refine ⟨r', hr', hr, .trans ?_ hrs⟩
82+
intro x hx
83+
dsimp at hx ⊢
84+
exact hx.trans_lt (hr.trans_le hr1)
85+
convert (hs'.of_isClosed_subset (Valued.isClosed_closedBall K _) H).image
86+
(Homeomorph.mulLeft₀ (γ / r) (by simp [hr, div_eq_zero_iff, hγ])).continuous using 1
87+
refine .trans ?_ (Equiv.image_eq_preimage _ _).symm
88+
ext x
89+
simp [div_mul_eq_mul_div, div_le_iff₀, IsValuativeTopology.v_eq_valuation, hγ, hr]
90+
91+
instance : CompactSpace 𝒪[K] := isCompact_iff_compactSpace.mp (isCompact_closedBall K 1)
92+
93+
instance (K : Type*) [Field K] [ValuativeRel K] [UniformSpace K] [IsUniformAddGroup K]
94+
[IsValuativeTopology K] : (Valued.v (R := K) (Γ₀ := ValueGroupWithZero K)).Compatible :=
95+
inferInstanceAs (valuation K).Compatible
96+
97+
instance : IsDiscreteValuationRing 𝒪[K] :=
98+
letI := IsTopologicalAddGroup.toUniformSpace K
99+
haveI := isUniformAddGroup_of_addCommGroup (G := K)
100+
haveI : CompactSpace (Valued.integer K) := inferInstanceAs (CompactSpace 𝒪[K])
101+
Valued.integer.isDiscreteValuationRing_of_compactSpace
102+
103+
/-- The value group of a local field is (uniquely) isomorphic to `ℤᵐ⁰`. -/
104+
noncomputable
105+
def valueGroupWithZeroIsoInt : ValueGroupWithZero K ≃*o ℤᵐ⁰ := by
106+
apply Nonempty.some
107+
letI := IsTopologicalAddGroup.toUniformSpace K
108+
haveI := isUniformAddGroup_of_addCommGroup (G := K)
109+
obtain ⟨_⟩ := Valued.integer.locallyFiniteOrder_units_mrange_of_isCompact_integer
110+
(isCompact_iff_compactSpace.mpr (inferInstanceAs (CompactSpace 𝒪[K])))
111+
let e : (MonoidHom.mrange (valuation K)) ≃*o ValueGroupWithZero K :=
112+
⟨.ofBijective (MonoidHom.mrange (valuation K)).subtype ⟨Subtype.val_injective, fun x ↦
113+
⟨⟨x, ValuativeRel.valuation_surjective x⟩, rfl⟩⟩, .rfl⟩
114+
have : Nontrivial (ValueGroupWithZero K)ˣ := isNontrivial_iff_nontrivial_units.mp inferInstance
115+
have : Nontrivial (↥(MonoidHom.mrange (valuation K)))ˣ :=
116+
(Units.map_injective (f := e.symm.toMonoidHom) e.symm.injective).nontrivial
117+
exact ⟨e.symm.trans (LocallyFiniteOrder.orderMonoidWithZeroEquiv _)⟩
118+
119+
instance : ValuativeRel.IsDiscrete K :=
120+
(ValuativeRel.nonempty_orderIso_withZeroMul_int_iff.mp ⟨valueGroupWithZeroIsoInt K⟩).1
121+
122+
instance : ValuativeRel.IsRankLeOne K :=
123+
ValuativeRel.isRankLeOne_iff_mulArchimedean.mpr
124+
(.comap (valueGroupWithZeroIsoInt K).toMonoidHom (valueGroupWithZeroIsoInt K).strictMono)
125+
126+
instance : Finite 𝓀[K] :=
127+
letI := IsTopologicalAddGroup.toUniformSpace K
128+
haveI := isUniformAddGroup_of_addCommGroup (G := K)
129+
letI : (Valued.v (R := K)).RankOne :=
130+
⟨IsRankLeOne.nonempty.some.emb, IsRankLeOne.nonempty.some.strictMono⟩
131+
(compactSpace_iff_completeSpace_and_isDiscreteValuationRing_and_finite_residueField.mp
132+
(inferInstanceAs (CompactSpace 𝒪[K]))).2.2
133+
134+
proof_wanted isAdicComplete : IsAdicComplete 𝓂[K] 𝒪[K]
135+
136+
end TopologicalSpace
137+
138+
section UniformSpace
139+
140+
variable (K : Type*) [Field K] [ValuativeRel K]
141+
[UniformSpace K] [IsUniformAddGroup K] [IsNonarchimedeanLocalField K]
142+
143+
instance : CompleteSpace K :=
144+
letI : (Valued.v (R := K)).RankOne :=
145+
⟨IsRankLeOne.nonempty.some.emb, IsRankLeOne.nonempty.some.strictMono⟩
146+
open scoped Valued in
147+
have : ProperSpace K := .of_nontriviallyNormedField_of_weaklyLocallyCompactSpace K
148+
(properSpace_iff_completeSpace_and_isDiscreteValuationRing_integer_and_finite_residueField.mp
149+
inferInstance).1
150+
151+
instance : CompleteSpace 𝒪[K] :=
152+
letI : (Valued.v (R := K)).RankOne :=
153+
⟨IsRankLeOne.nonempty.some.emb, IsRankLeOne.nonempty.some.strictMono⟩
154+
(compactSpace_iff_completeSpace_and_isDiscreteValuationRing_and_finite_residueField.mp
155+
(inferInstanceAs (CompactSpace 𝒪[K]))).1
156+
157+
end UniformSpace
158+
159+
end IsNonarchimedeanLocalField

Mathlib/RingTheory/Valuation/RankOne.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ variable {R : Type*} [CommRing R] [ValuativeRel R]
121121
and the rank is at most one. -/
122122
def Valuation.RankOne.ofRankLeOneStruct [ValuativeRel.IsNontrivial R] (e : RankLeOneStruct R) :
123123
Valuation.RankOne (valuation R) where
124-
__ : Valuation.IsNontrivial (valuation R) := isNontrivial_iff_isNontrivial.mp inferInstance
125124
hom := e.emb
126125
strictMono' := e.strictMono
127126

@@ -141,7 +140,7 @@ lemma ValuativeRel.isRankLeOne_of_rankOne [h : (valuation R).RankOne] :
141140

142141
lemma ValuativeRel.isNontrivial_of_rankOne [h : (valuation R).RankOne] :
143142
ValuativeRel.IsNontrivial R :=
144-
isNontrivial_iff_isNontrivial.mpr h.toIsNontrivial
143+
(isNontrivial_iff_isNontrivial _).mpr h.toIsNontrivial
145144

146145
open WithZero
147146

@@ -152,7 +151,7 @@ lemma ValuativeRel.isRankLeOne_iff_mulArchimedean :
152151
exact .comap f.toMonoidHom hf
153152
· intro h
154153
by_cases H : IsNontrivial R
155-
· rw [isNontrivial_iff_isNontrivial] at H
154+
· rw [isNontrivial_iff_isNontrivial (valuation R)] at H
156155
rw [← (valuation R).nonempty_rankOne_iff_mulArchimedean] at h
157156
obtain ⟨f⟩ := h
158157
exact isRankLeOne_of_rankOne

Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -654,45 +654,58 @@ lemma isNontrivial_iff_nontrivial_units :
654654
· exact ⟨s.val, by simp, by simpa using h.symm⟩
655655
· exact ⟨r.val, by simp, by simpa using hr⟩
656656

657-
lemma isNontrivial_iff_isNontrivial :
658-
IsNontrivial R ↔ (valuation R).IsNontrivial := by
657+
lemma isNontrivial_iff_isNontrivial
658+
{Γ₀ : Type*} [LinearOrderedCommMonoidWithZero Γ₀] (v : Valuation R Γ₀) [v.Compatible] :
659+
IsNontrivial R ↔ v.IsNontrivial := by
659660
constructor
660661
· rintro ⟨r, hr, hr'⟩
661662
induction r using ValueGroupWithZero.ind with | mk r s
662-
by_cases hs : valuation R s = 1
663-
· refine ⟨r, ?_, ?_⟩
664-
· simpa [valuation] using hr
665-
· simp only [ne_eq, ValueGroupWithZero.mk_eq_one, not_and, valuation, Valuation.coe_mk,
666-
MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, OneMemClass.coe_one] at hr' hs ⊢
667-
contrapose! hr'
668-
exact hr'.imp hs.right.trans' hs.left.trans
669-
· refine ⟨s, ?_, hs⟩
670-
simp [valuation, ← posSubmonoid_def]
663+
have hγ : v r ≠ 0 := by simpa [Valuation.Compatible.rel_iff_le (v := v)] using hr
664+
have hγ' : v r ≤ v s → v r < v s := by
665+
simpa [Valuation.Compatible.rel_iff_le (v := v)] using hr'
666+
by_cases hr : v r = 1
667+
· exact ⟨s, by simp, fun h ↦ by simp [h, hr] at hγ'⟩
668+
· exact ⟨r, by simpa using hγ, hr⟩
671669
· rintro ⟨r, hr, hr'⟩
672-
exact ⟨valuation R r, hr, hr'⟩
670+
exact ⟨valuation R r, (isEquiv v (valuation R)).ne_zero.mp hr,
671+
by simpa [(isEquiv v (valuation R)).eq_one_iff_eq_one] using hr'⟩
673672

674-
variable (R) in
675-
/-- A ring with a valuative relation is discrete if its value group-with-zero
676-
has a maximal element `< 1`. -/
677-
class IsDiscrete where
678-
has_maximal_element :
679-
∃ γ : ValueGroupWithZero R, γ < 1 ∧ (∀ δ : ValueGroupWithZero R, δ < 1 → δ ≤ γ)
673+
instance {Γ₀ : Type*} [LinearOrderedCommMonoidWithZero Γ₀]
674+
[IsNontrivial R] (v : Valuation R Γ₀) [v.Compatible] :
675+
v.IsNontrivial := by rwa [← isNontrivial_iff_isNontrivial]
680676

681-
lemma valuation_surjective (γ : ValueGroupWithZero R) :
677+
lemma ValueGroupWithZero.mk_eq_valuation {K : Type*} [Field K] [ValuativeRel K]
678+
(x : K) (y : posSubmonoid K) :
679+
ValueGroupWithZero.mk x y = valuation K (x / y) := by
680+
rw [Valuation.map_div, ValueGroupWithZero.mk_eq_div]
681+
682+
lemma exists_valuation_div_valuation_eq (γ : ValueGroupWithZero R) :
682683
∃ (a : R) (b : posSubmonoid R), valuation _ a / valuation _ (b : R) = γ := by
683684
induction γ using ValueGroupWithZero.ind with | mk a b
684685
use a, b
685686
simp [valuation, div_eq_mul_inv, ValueGroupWithZero.inv_mk (b : R) 1 b.prop]
686687

687688
lemma exists_valuation_posSubmonoid_div_valuation_posSubmonoid_eq (γ : (ValueGroupWithZero R)ˣ) :
688689
∃ (a b : posSubmonoid R), valuation R a / valuation _ (b : R) = γ := by
689-
obtain ⟨a, b, hab⟩ := valuation_surjective γ.val
690+
obtain ⟨a, b, hab⟩ := exists_valuation_div_valuation_eq γ.val
690691
lift a to posSubmonoid R using by
691692
rw [posSubmonoid_def, ← valuation_eq_zero_iff]
692693
intro H
693694
simp [H, eq_comm] at hab
694695
use a, b
695696

697+
-- See `exists_valuation_div_valuation_eq` for the version that works for all rings.
698+
theorem valuation_surjective {K : Type*} [Field K] [ValuativeRel K] :
699+
Function.Surjective (valuation K) :=
700+
ValueGroupWithZero.ind (ValueGroupWithZero.mk_eq_valuation · · ▸ ⟨_, rfl⟩)
701+
702+
variable (R) in
703+
/-- A ring with a valuative relation is discrete if its value group-with-zero
704+
has a maximal element `< 1`. -/
705+
class IsDiscrete where
706+
has_maximal_element :
707+
∃ γ : ValueGroupWithZero R, γ < 1 ∧ (∀ δ : ValueGroupWithZero R, δ < 1 → δ ≤ γ)
708+
696709
end ValuativeRel
697710

698711
open Topology ValuativeRel in
@@ -736,8 +749,8 @@ lemma ValueGroupWithZero.embed_valuation (γ : ValueGroupWithZero R) :
736749

737750
lemma ValueGroupWithZero.embed_strictMono [v.Compatible] : StrictMono (embed v) := by
738751
intro a b h
739-
obtain ⟨a, r, rfl⟩ := valuation_surjective a
740-
obtain ⟨b, s, rfl⟩ := valuation_surjective b
752+
obtain ⟨a, r, rfl⟩ := exists_valuation_div_valuation_eq a
753+
obtain ⟨b, s, rfl⟩ := exists_valuation_div_valuation_eq b
741754
simp only [map_div₀]
742755
rw [div_lt_div_iff₀] at h ⊢
743756
any_goals simp [zero_lt_iff]

Mathlib/Topology/Algebra/Valued/ValuativeRel.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,34 @@ instance (priority := low) {R : Type*} [CommRing R] [ValuativeRel R] [UniformSpa
7474
«v» := valuation R
7575
is_topological_valuation := mem_nhds_zero_iff
7676

77+
lemma v_eq_valuation {R : Type*} [CommRing R] [ValuativeRel R] [UniformSpace R]
78+
[IsUniformAddGroup R] [IsValuativeTopology R] :
79+
Valued.v = valuation R := rfl
80+
7781
theorem hasBasis_nhds (x : R) :
7882
(𝓝 x).HasBasis (fun _ => True)
7983
fun γ : (ValueGroupWithZero R)ˣ => { z | v (z - x) < γ } := by
8084
simp [Filter.hasBasis_iff, mem_nhds_iff']
8185

86+
/-- A variant of `hasBasis_nhds` where `· ≠ 0` is unbundled. -/
87+
lemma hasBasis_nhds' (x : R) :
88+
(𝓝 x).HasBasis (· ≠ 0) ({ y | v (y - x) < · }) :=
89+
(hasBasis_nhds x).to_hasBasis (fun γ _ ↦ ⟨γ, by simp⟩)
90+
fun γ hγ ↦ ⟨.mk0 γ hγ, by simp⟩
91+
8292
variable (R) in
8393
theorem hasBasis_nhds_zero :
8494
(𝓝 (0 : R)).HasBasis (fun _ => True)
8595
fun γ : (ValueGroupWithZero R)ˣ => { x | v x < γ } := by
8696
convert hasBasis_nhds (0 : R); rw [sub_zero]
8797

98+
variable (R) in
99+
/-- A variant of `hasBasis_nhds_zero` where `· ≠ 0` is unbundled. -/
100+
lemma hasBasis_nhds_zero' :
101+
(𝓝 0).HasBasis (· ≠ 0) ({ x | v x < · }) :=
102+
(hasBasis_nhds_zero R).to_hasBasis (fun γ _ ↦ ⟨γ, by simp⟩)
103+
fun γ hγ ↦ ⟨.mk0 γ hγ, by simp⟩
104+
88105
@[deprecated (since := "2025-08-01")]
89106
alias _root_.ValuativeTopology.hasBasis_nhds_zero := hasBasis_nhds_zero
90107

0 commit comments

Comments
 (0)