Skip to content

Commit 55aa437

Browse files
committed
chore(NumberTheory/NumberField): move number field completion material to new subdir (leanprover-community#36393)
1 parent 272dcf5 commit 55aa437

7 files changed

Lines changed: 706 additions & 670 deletions

File tree

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5559,6 +5559,8 @@ public import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.NormLeOne
55595559
public import Mathlib.NumberTheory.NumberField.CanonicalEmbedding.PolarCoord
55605560
public import Mathlib.NumberTheory.NumberField.ClassNumber
55615561
public import Mathlib.NumberTheory.NumberField.Completion
5562+
public import Mathlib.NumberTheory.NumberField.Completion.FinitePlace
5563+
public import Mathlib.NumberTheory.NumberField.Completion.InfinitePlace
55625564
public import Mathlib.NumberTheory.NumberField.Cyclotomic.Basic
55635565
public import Mathlib.NumberTheory.NumberField.Cyclotomic.Embeddings
55645566
public import Mathlib.NumberTheory.NumberField.Cyclotomic.Galois

Mathlib/NumberTheory/NumberField/Completion/FinitePlace.lean

Lines changed: 404 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 295 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
1+
/-
2+
Copyright (c) 2024 Salvatore Mercuri. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Salvatore Mercuri
5+
-/
6+
module
7+
8+
public import Mathlib.Analysis.Normed.Field.WithAbs
9+
public import Mathlib.NumberTheory.NumberField.InfinitePlace.Basic
10+
public import Mathlib.NumberTheory.NumberField.InfinitePlace.Ramification
11+
12+
/-!
13+
# The completion of a number field at an infinite place
14+
15+
This file contains the completion of a number field at an infinite place. This is ultimately
16+
achieved by applying the `UniformSpace.Completion` functor, however each infinite place induces
17+
its own `UniformSpace` instance on the number field, so the inference system cannot automatically
18+
infer these. A common approach to handle the ambiguity that arises from having multiple sources
19+
of instances is through the use of type synonyms. In this case, we use the type synonym `WithAbs`
20+
of a semiring. In particular this type synonym depends on an absolute value, which provides a
21+
systematic way of assigning and inferring instances of the semiring that also depend on an absolute
22+
value. The completion of a field at multiple absolute values is defined in
23+
`Mathlib/Analysis/Normed/Field/WithAbs.lean` as `AbsoluteValue.Completion`. The completion of a
24+
number field at an infinite place is then derived in this file, as `InfinitePlace` is a subtype of
25+
`AbsoluteValue`.
26+
27+
## Main definitions
28+
- `NumberField.InfinitePlace.Completion` : the completion of a number field `K` at an infinite
29+
place, obtained by completing `K` with respect to the absolute value associated to the infinite
30+
place.
31+
- `NumberField.InfinitePlace.Completion.extensionEmbedding` : the embedding `v.embedding : K →+* ℂ`
32+
extended to `v.Completion →+* ℂ`.
33+
- `NumberField.InfinitePlace.Completion.extensionEmbeddingOfIsReal` : if the infinite place `v`
34+
is real, then this extends the embedding `v.embedding_of_isReal : K →+* ℝ` to
35+
`v.Completion →+* ℝ`.
36+
- `NumberField.InfinitePlace.Completion.ringEquivRealOfIsReal` : the ring isomorphism
37+
`v.Completion ≃+* ℝ` when `v` is a real infinite place; the forward direction of this is
38+
`extensionEmbeddingOfIsReal`.
39+
- `NumberField.InfinitePlace.Completion.ringEquivComplexOfIsComplex` : the ring isomorphism
40+
`v.Completion ≃+* ℂ` when `v` is a complex infinite place; the forward direction of this is
41+
`extensionEmbedding`.
42+
43+
## Main results
44+
- `NumberField.Completion.locallyCompactSpace` : the completion of a number field at
45+
an infinite place is locally compact.
46+
- `NumberField.Completion.isometry_extensionEmbedding` : the embedding `v.Completion →+* ℂ` is
47+
an isometry. See also `isometry_extensionEmbeddingOfIsReal` for the corresponding result on
48+
`v.Completion →+* ℝ` when `v` is real.
49+
- `NumberField.Completion.bijective_extensionEmbedding_of_isComplex` : the embedding
50+
`v.Completion →+* ℂ` is bijective when `v` is complex. See also
51+
`bijective_extensionEmbeddingOfIsReal` for the corresponding result for `v.Completion →+* ℝ`
52+
when `v` is real.
53+
54+
## Tags
55+
number field, embeddings, infinite places, completion, absolute value
56+
-/
57+
58+
@[expose] public section
59+
noncomputable section
60+
61+
namespace NumberField.InfinitePlace
62+
63+
open AbsoluteValue.Completion UniformSpace.Completion NumberField.ComplexEmbedding
64+
65+
variable {K : Type*} [Field K] (v : InfinitePlace K)
66+
67+
theorem isometry_embedding : Isometry (v.embedding.comp (WithAbs.equiv v.1).toRingHom) :=
68+
AddMonoidHomClass.isometry_of_norm _ fun x ↦ by
69+
simpa using v.norm_embedding_eq (WithAbs.equiv v.1 x)
70+
71+
theorem isometry_embedding_of_isReal (hv : v.IsReal) :
72+
Isometry ((v.embedding_of_isReal hv).comp (WithAbs.equiv v.1).toRingHom) :=
73+
AddMonoidHomClass.isometry_of_norm _ fun x ↦ by
74+
simpa using v.norm_embedding_of_isReal hv (WithAbs.equiv v.1 x)
75+
76+
/-- The completion of a number field at an infinite place. -/
77+
abbrev Completion := v.1.Completion
78+
79+
namespace Completion
80+
81+
instance : NormedField v.Completion :=
82+
letI := v.isometry_embedding.isUniformInducing.completableTopField
83+
UniformSpace.Completion.instNormedFieldOfCompletableTopField (WithAbs v.1)
84+
85+
lemma norm_coe (x : WithAbs v.1) :
86+
‖(x : v.Completion)‖ = v (WithAbs.equiv v.1 x) :=
87+
UniformSpace.Completion.norm_coe x
88+
89+
set_option backward.isDefEq.respectTransparency false in
90+
instance : Algebra K v.Completion :=
91+
UniformSpace.Completion.algebra (WithAbs v.1) K
92+
93+
instance : IsTopologicalRing v.Completion := UniformSpace.Completion.topologicalRing
94+
95+
set_option backward.isDefEq.respectTransparency false in
96+
/-- The coercion from the rationals to its completion along an infinite place is `Rat.cast`. -/
97+
lemma WithAbs.ratCast_equiv (v : InfinitePlace ℚ) (x : WithAbs v.1) :
98+
Rat.cast (WithAbs.equiv _ x) = (x : v.Completion) :=
99+
(eq_ratCast (UniformSpace.Completion.coeRingHom.comp
100+
(WithAbs.equiv v.1).symm.toRingHom) _).symm
101+
102+
lemma Rat.norm_infinitePlace_completion (v : InfinitePlace ℚ) (x : ℚ) :
103+
‖(x : v.Completion)‖ = |x| := by
104+
rw [← (WithAbs.equiv v.1).apply_symm_apply x, WithAbs.ratCast_equiv,
105+
norm_coe, (WithAbs.equiv v.1).apply_symm_apply,
106+
Rat.infinitePlace_apply]
107+
108+
/-- The completion of a number field at an infinite place is locally compact. -/
109+
instance locallyCompactSpace : LocallyCompactSpace (v.Completion) :=
110+
AbsoluteValue.Completion.locallyCompactSpace v.isometry_embedding
111+
112+
set_option backward.isDefEq.respectTransparency false in
113+
/-- The embedding associated to an infinite place extended to an embedding `v.Completion →+* ℂ`. -/
114+
def extensionEmbedding : v.Completion →+* ℂ := v.isometry_embedding.extensionHom
115+
116+
set_option backward.isDefEq.respectTransparency false in
117+
/-- The embedding `K →+* ℝ` associated to a real infinite place extended to `v.Completion →+* ℝ`. -/
118+
def extensionEmbeddingOfIsReal {v : InfinitePlace K} (hv : IsReal v) : v.Completion →+* ℝ :=
119+
(v.isometry_embedding_of_isReal hv).extensionHom
120+
121+
set_option backward.isDefEq.respectTransparency false in
122+
@[simp]
123+
theorem extensionEmbedding_coe (x : WithAbs v.1) :
124+
extensionEmbedding v x = v.embedding (WithAbs.equiv v.1 x) :=
125+
v.isometry_embedding.extensionHom_coe _
126+
127+
set_option backward.isDefEq.respectTransparency false in
128+
@[simp]
129+
theorem extensionEmbeddingOfIsReal_coe {v : InfinitePlace K} (hv : IsReal v) (x : WithAbs v.1) :
130+
extensionEmbeddingOfIsReal hv x = embedding_of_isReal hv (WithAbs.equiv v.1 x) :=
131+
(v.isometry_embedding_of_isReal hv).extensionHom_coe _
132+
133+
@[deprecated (since := "2025-09-24")]
134+
alias extensionEmbedding_of_isReal_coe := extensionEmbeddingOfIsReal_coe
135+
136+
open UniformSpace.Completion in
137+
@[simp]
138+
theorem extensionEmbeddingOfIsReal_apply {v : InfinitePlace K} (hv : IsReal v) (x : v.Completion) :
139+
(extensionEmbeddingOfIsReal hv x : ℂ) = extensionEmbedding v x := by
140+
refine UniformSpace.Completion.induction_on x ?_ (by simp)
141+
exact isClosed_eq (Continuous.comp' (by fun_prop) continuous_extension) continuous_extension
142+
143+
/-- The embedding `v.Completion →+* ℂ` is an isometry. -/
144+
theorem isometry_extensionEmbedding : Isometry (extensionEmbedding v) :=
145+
v.isometry_embedding.completion_extension
146+
147+
/-- The embedding `v.Completion →+* ℝ` at a real infinite place is an isometry. -/
148+
theorem isometry_extensionEmbeddingOfIsReal {v : InfinitePlace K} (hv : IsReal v) :
149+
Isometry (extensionEmbeddingOfIsReal hv) :=
150+
(v.isometry_embedding_of_isReal hv).completion_extension
151+
152+
@[deprecated (since := "2025-09-24")]
153+
alias isometry_extensionEmbedding_of_isReal := isometry_extensionEmbeddingOfIsReal
154+
155+
/-- The embedding `v.Completion →+* ℂ` has closed image inside `ℂ`. -/
156+
theorem isClosed_image_extensionEmbedding : IsClosed (Set.range (extensionEmbedding v)) :=
157+
v.isometry_embedding.completion_extension.isClosedEmbedding.isClosed_range
158+
159+
/-- The embedding `v.Completion →+* ℝ` associated to a real infinite place has closed image
160+
inside `ℝ`. -/
161+
theorem isClosed_image_extensionEmbeddingOfIsReal {v : InfinitePlace K} (hv : IsReal v) :
162+
IsClosed (Set.range (extensionEmbeddingOfIsReal hv)) :=
163+
(v.isometry_embedding_of_isReal hv).completion_extension.isClosedEmbedding.isClosed_range
164+
165+
@[deprecated (since := "2025-09-24")]
166+
alias isClosed_image_extensionEmbedding_of_isReal := isClosed_image_extensionEmbeddingOfIsReal
167+
168+
theorem subfield_ne_real_of_isComplex {v : InfinitePlace K} (hv : IsComplex v) :
169+
(extensionEmbedding v).fieldRange ≠ Complex.ofRealHom.fieldRange := by
170+
contrapose! hv
171+
simp only [not_isComplex_iff_isReal, isReal_iff]
172+
ext x
173+
obtain ⟨r, hr⟩ := hv ▸ RingHom.mem_fieldRange_self (extensionEmbedding v) (x : v.Completion)
174+
rw [extensionEmbedding_coe, ← WithAbs.equiv_symm_apply, RingEquiv.apply_symm_apply] at hr
175+
simp [ComplexEmbedding.conjugate_coe_eq, ← hr, Complex.conj_ofReal]
176+
177+
/-- If `v` is a complex infinite place, then the embedding `v.Completion →+* ℂ` is surjective. -/
178+
theorem surjective_extensionEmbedding_of_isComplex {v : InfinitePlace K} (hv : IsComplex v) :
179+
Function.Surjective (extensionEmbedding v) := by
180+
rw [← RingHom.fieldRange_eq_top_iff]
181+
exact (Complex.subfield_eq_of_closed <| isClosed_image_extensionEmbedding v).resolve_left <|
182+
subfield_ne_real_of_isComplex hv
183+
184+
/-- If `v` is a complex infinite place, then the embedding `v.Completion →+* ℂ` is bijective. -/
185+
theorem bijective_extensionEmbedding_of_isComplex {v : InfinitePlace K} (hv : IsComplex v) :
186+
Function.Bijective (extensionEmbedding v) :=
187+
⟨(extensionEmbedding v).injective, surjective_extensionEmbedding_of_isComplex hv⟩
188+
189+
/-- The ring isomorphism `v.Completion ≃+* ℂ`, when `v` is complex, given by the bijection
190+
`v.Completion →+* ℂ`. -/
191+
def ringEquivComplexOfIsComplex {v : InfinitePlace K} (hv : IsComplex v) :
192+
v.Completion ≃+* ℂ :=
193+
RingEquiv.ofBijective _ (bijective_extensionEmbedding_of_isComplex hv)
194+
195+
/-- If the infinite place `v` is complex, then `v.Completion` is isometric to `ℂ`. -/
196+
def isometryEquivComplexOfIsComplex {v : InfinitePlace K} (hv : IsComplex v) :
197+
v.Completion ≃ᵢ ℂ where
198+
toEquiv := ringEquivComplexOfIsComplex hv
199+
isometry_toFun := isometry_extensionEmbedding v
200+
201+
/-- If `v` is a real infinite place, then the embedding `v.Completion →+* ℝ` is surjective. -/
202+
theorem surjective_extensionEmbeddingOfIsReal {v : InfinitePlace K} (hv : IsReal v) :
203+
Function.Surjective (extensionEmbeddingOfIsReal hv) := by
204+
rw [← RingHom.fieldRange_eq_top_iff, ← Real.subfield_eq_of_closed]
205+
exact isClosed_image_extensionEmbeddingOfIsReal hv
206+
207+
@[deprecated (since := "2025-09-24")]
208+
alias surjective_extensionEmbedding_of_isReal := surjective_extensionEmbeddingOfIsReal
209+
210+
/-- If `v` is a real infinite place, then the embedding `v.Completion →+* ℝ` is bijective. -/
211+
theorem bijective_extensionEmbeddingOfIsReal {v : InfinitePlace K} (hv : IsReal v) :
212+
Function.Bijective (extensionEmbeddingOfIsReal hv) :=
213+
⟨(extensionEmbeddingOfIsReal hv).injective, surjective_extensionEmbeddingOfIsReal hv⟩
214+
215+
@[deprecated (since := "2025-09-24")]
216+
alias bijective_extensionEmbedding_of_isReal := bijective_extensionEmbeddingOfIsReal
217+
218+
/-- The ring isomorphism `v.Completion ≃+* ℝ`, when `v` is real, given by the bijection
219+
`v.Completion →+* ℝ`. -/
220+
def ringEquivRealOfIsReal {v : InfinitePlace K} (hv : IsReal v) : v.Completion ≃+* ℝ :=
221+
RingEquiv.ofBijective _ (bijective_extensionEmbeddingOfIsReal hv)
222+
223+
/-- If the infinite place `v` is real, then `v.Completion` is isometric to `ℝ`. -/
224+
def isometryEquivRealOfIsReal {v : InfinitePlace K} (hv : IsReal v) : v.Completion ≃ᵢ ℝ where
225+
toEquiv := ringEquivRealOfIsReal hv
226+
isometry_toFun := isometry_extensionEmbeddingOfIsReal hv
227+
228+
attribute [local instance] WithAbs.algebraLeft
229+
230+
variable {L : Type*} [Field L] [Algebra K L] (w : InfinitePlace L) {v}
231+
[Algebra v.Completion w.Completion] [IsScalarTower K v.Completion w.Completion]
232+
233+
set_option backward.isDefEq.respectTransparency false in
234+
@[simp]
235+
theorem algebraMap_coe (x : WithAbs v.1) :
236+
algebraMap v.Completion w.Completion x = algebraMap (WithAbs v.1) (WithAbs w.1) x := by
237+
have := IsScalarTower.algebraMap_apply (WithAbs v.1) v.Completion w.Completion x
238+
rw [algebraMap_def] at this
239+
simp [this, algebraMap_def, Algebra.algebraMap_self]
240+
241+
/-- Assume that `w.Completion` forms an algebra over `v.Completion` with continuous scalar action,
242+
such that `IsScalarTower K v.Completion w.Completion`.
243+
If `w.embedding : L →+* ℂ` extends `v.embedding : K →+* ℂ`, then the corresponding embeddings
244+
to completions are also extensions. -/
245+
theorem liesOver_extensionEmbedding [ContinuousSMul v.Completion w.Completion]
246+
[ComplexEmbedding.LiesOver w.embedding v.embedding] :
247+
ComplexEmbedding.LiesOver (extensionEmbedding w) (extensionEmbedding v)where
248+
over := by
249+
ext x
250+
induction x using induction_on
251+
· exact isClosed_eq
252+
(continuous_extension.comp (continuous_algebraMap v.Completion w.Completion))
253+
continuous_extension
254+
· simp [WithAbs.algebraMap_left_apply, WithAbs.algebraMap_right_apply,
255+
← ComplexEmbedding.LiesOver.over w.embedding v.embedding]
256+
257+
theorem liesOver_conjugate_extensionEmbedding [ContinuousSMul v.Completion w.Completion]
258+
[ComplexEmbedding.LiesOver (conjugate w.embedding) v.embedding] :
259+
ComplexEmbedding.LiesOver (conjugate (extensionEmbedding w)) (extensionEmbedding v) where
260+
over := by
261+
ext x
262+
induction x using induction_on
263+
· simpa using isClosed_eq (.comp (by fun_prop)
264+
(continuous_extension.comp <| continuous_algebraMap v.Completion w.Completion))
265+
continuous_extension
266+
· simp [WithAbs.algebraMap_left_apply, WithAbs.algebraMap_right_apply,
267+
← ComplexEmbedding.LiesOver.over (conjugate w.embedding) v.embedding]
268+
269+
end Completion
270+
271+
namespace LiesOver
272+
273+
open Completion
274+
275+
variable {L : Type*} [Field L] [Algebra K L] (w : InfinitePlace L) [w.1.LiesOver v.1] {v}
276+
277+
attribute [local instance] WithAbs.algebraLeft
278+
279+
theorem isometry_algebraMap : Isometry (algebraMap (WithAbs v.1) (WithAbs w.1)) :=
280+
AddMonoidHomClass.isometry_of_norm _ fun x ↦ by
281+
simpa [WithAbs.norm_eq_apply_ofAbs] using
282+
WithAbs.ofAbs_algebraMap v.1 w.1 x ▸ comp_of_comap_eq (comap_eq w v) x.ofAbs
283+
284+
theorem embedding_liesOver_of_isReal (h : v.IsReal) :
285+
ComplexEmbedding.LiesOver w.embedding v.embedding where
286+
over := (comap_eq w v ▸ comap_embedding_of_isReal _ (comap_eq w v ▸ h)).symm
287+
288+
variable [Algebra v.Completion w.Completion] [IsScalarTower K v.Completion w.Completion]
289+
290+
theorem extensionEmbedding_liesOver_of_isReal
291+
[ContinuousSMul v.Completion w.Completion] (h : v.IsReal) :
292+
ComplexEmbedding.LiesOver (extensionEmbedding w) (extensionEmbedding v) :=
293+
letI := embedding_liesOver_of_isReal w h; liesOver_extensionEmbedding w
294+
295+
end NumberField.InfinitePlace.LiesOver

0 commit comments

Comments
 (0)