Skip to content

Commit 3bebc67

Browse files
committed
feat(NumberField/CanonicalEmbedding): make the mixedSpace explicit (#16634)
For `K`, a number field, the mixed space is the space `ℝ^r₁ × ℂ^r₂` where `(r₁, r₂)` is the signature of `K`. This space is heavily used in the files about the canonical embedding but was never explicit (only used a notation). For further developments (and just to make things clearer), I think it is better to define it explicitly. This is what is done in this PR.
1 parent 99998e1 commit 3bebc67

File tree

2 files changed

+80
-83
lines changed

2 files changed

+80
-83
lines changed

Mathlib/NumberTheory/NumberField/CanonicalEmbedding/Basic.lean

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ sending `x : K` to the vector `(φ x)` indexed by `φ : K →+* ℂ`.
2424
image of the ring of integers by the canonical embedding and any ball centered at `0` of finite
2525
radius is finite.
2626
27-
* `NumberField.mixedEmbedding`: the ring homomorphism from `K →+* ({ w // IsReal w } → ℝ) ×
28-
({ w // IsComplex w } → ℂ)` that sends `x ∈ K` to `(φ_w x)_w` where `φ_w` is the embedding
29-
associated to the infinite place `w`. In particular, if `w` is real then `φ_w : K →+* ℝ` and, if
30-
`w` is complex, `φ_w` is an arbitrary choice between the two complex embeddings defining the place
31-
`w`.
27+
* `NumberField.mixedEmbedding`: the ring homomorphism from `K` to the mixed space
28+
`K →+* ({ w // IsReal w } → ℝ) × ({ w // IsComplex w } → ℂ)` that sends `x ∈ K` to `(φ_w x)_w`
29+
where `φ_w` is the embedding associated to the infinite place `w`. In particular, if `w` is real
30+
then `φ_w : K →+* ℝ` and, if `w` is complex, `φ_w` is an arbitrary choice between the two complex
31+
embeddings defining the place `w`.
3232
3333
## Tags
3434
@@ -39,8 +39,6 @@ variable (K : Type*) [Field K]
3939

4040
namespace NumberField.canonicalEmbedding
4141

42-
--open NumberField
43-
4442
/-- The canonical embedding of a number field `K` of degree `n` into `ℂ^n`. -/
4543
def _root_.NumberField.canonicalEmbedding : K →+* ((K →+* ℂ) → ℂ) := Pi.ringHom fun φ => φ
4644

@@ -180,24 +178,24 @@ namespace NumberField.mixedEmbedding
180178

181179
open NumberField.InfinitePlace FiniteDimensional Finset
182180

183-
/-- The space `ℝ^r₁ × ℂ^r₂` with `(r₁, r₂)` the signature of `K`. -/
184-
local notation "E" K =>
181+
/-- The mixed space `ℝ^r₁ × ℂ^r₂` with `(r₁, r₂)` the signature of `K`. -/
182+
abbrev mixedSpace :=
185183
({w : InfinitePlace K // IsReal w} → ℝ) × ({w : InfinitePlace K // IsComplex w} → ℂ)
186184

187-
/-- The mixed embedding of a number field `K` of signature `(r₁, r₂)` into `ℝ^r₁ × ℂ^r₂`. -/
188-
noncomputable def _root_.NumberField.mixedEmbedding : K →+* (E K) :=
185+
/-- The mixed embedding of a number field `K` into the mixed space of `K`. -/
186+
noncomputable def _root_.NumberField.mixedEmbedding : K →+* (mixedSpace K) :=
189187
RingHom.prod (Pi.ringHom fun w => embedding_of_isReal w.prop)
190188
(Pi.ringHom fun w => w.val.embedding)
191189

192-
instance [NumberField K] : Nontrivial (E K) := by
190+
instance [NumberField K] : Nontrivial (mixedSpace K) := by
193191
obtain ⟨w⟩ := (inferInstance : Nonempty (InfinitePlace K))
194192
obtain hw | hw := w.isReal_or_isComplex
195193
· have : Nonempty {w : InfinitePlace K // IsReal w} := ⟨⟨w, hw⟩⟩
196194
exact nontrivial_prod_left
197195
· have : Nonempty {w : InfinitePlace K // IsComplex w} := ⟨⟨w, hw⟩⟩
198196
exact nontrivial_prod_right
199197

200-
protected theorem finrank [NumberField K] : finrank ℝ (E K) = finrank ℚ K := by
198+
protected theorem finrank [NumberField K] : finrank ℝ (mixedSpace K) = finrank ℚ K := by
201199
classical
202200
rw [finrank_prod, finrank_pi, finrank_pi_fintype, Complex.finrank_real_complex, sum_const,
203201
card_univ, ← NrRealPlaces, ← NrComplexPlaces, ← card_real_embeddings, Algebra.id.smul_eq_mul,
@@ -212,7 +210,7 @@ section commMap
212210

213211
/-- The linear map that makes `canonicalEmbedding` and `mixedEmbedding` commute, see
214212
`commMap_canonical_eq_mixed`. -/
215-
noncomputable def commMap : ((K →+* ℂ) → ℂ) →ₗ[ℝ] (E K) where
213+
noncomputable def commMap : ((K →+* ℂ) → ℂ) →ₗ[ℝ] (mixedSpace K) where
216214
toFun := fun x => ⟨fun w => (x w.val.embedding).re, fun w => x w.val.embedding⟩
217215
map_add' := by
218216
simp only [Pi.add_apply, Complex.add_re, Prod.mk_add_mk, Prod.mk.injEq]
@@ -236,7 +234,7 @@ theorem commMap_canonical_eq_mixed (x : K) :
236234
exact ⟨rfl, rfl⟩
237235

238236
/-- This is a technical result to ensure that the image of the `ℂ`-basis of `ℂ^n` defined in
239-
`canonicalEmbedding.latticeBasis` is a `ℝ`-basis of `ℝ^r₁ × ℂ^r₂`,
237+
`canonicalEmbedding.latticeBasis` is a `ℝ`-basis of the mixed space `ℝ^r₁ × ℂ^r₂`,
240238
see `mixedEmbedding.latticeBasis`. -/
241239
theorem disjoint_span_commMap_ker [NumberField K] :
242240
Disjoint (Submodule.span ℝ (Set.range (canonicalEmbedding.latticeBasis K)))
@@ -270,46 +268,45 @@ open scoped Classical
270268

271269
variable {K}
272270

273-
/-- The norm at the infinite place `w` of an element of
274-
`({w // IsReal w} → ℝ) × ({ w // IsComplex w } → ℂ)`. -/
275-
def normAtPlace (w : InfinitePlace K) : (E K) →*₀ ℝ where
271+
/-- The norm at the infinite place `w` of an element of the mixed space. --/
272+
def normAtPlace (w : InfinitePlace K) : (mixedSpace K) →*₀ ℝ where
276273
toFun x := if hw : IsReal w then ‖x.1 ⟨w, hw⟩‖ else ‖x.2 ⟨w, not_isReal_iff_isComplex.mp hw⟩‖
277274
map_zero' := by simp
278275
map_one' := by simp
279276
map_mul' x y := by split_ifs <;> simp
280277

281-
theorem normAtPlace_nonneg (w : InfinitePlace K) (x : E K) :
278+
theorem normAtPlace_nonneg (w : InfinitePlace K) (x : mixedSpace K) :
282279
0 ≤ normAtPlace w x := by
283280
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
284281
split_ifs <;> exact norm_nonneg _
285282

286-
theorem normAtPlace_neg (w : InfinitePlace K) (x : E K) :
283+
theorem normAtPlace_neg (w : InfinitePlace K) (x : mixedSpace K) :
287284
normAtPlace w (- x) = normAtPlace w x := by
288285
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
289286
split_ifs <;> simp
290287

291-
theorem normAtPlace_add_le (w : InfinitePlace K) (x y : E K) :
288+
theorem normAtPlace_add_le (w : InfinitePlace K) (x y : mixedSpace K) :
292289
normAtPlace w (x + y) ≤ normAtPlace w x + normAtPlace w y := by
293290
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
294291
split_ifs <;> exact norm_add_le _ _
295292

296-
theorem normAtPlace_smul (w : InfinitePlace K) (x : E K) (c : ℝ) :
293+
theorem normAtPlace_smul (w : InfinitePlace K) (x : mixedSpace K) (c : ℝ) :
297294
normAtPlace w (c • x) = |c| * normAtPlace w x := by
298295
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk]
299296
split_ifs
300297
· rw [Prod.smul_fst, Pi.smul_apply, norm_smul, Real.norm_eq_abs]
301298
· rw [Prod.smul_snd, Pi.smul_apply, norm_smul, Real.norm_eq_abs, Complex.norm_eq_abs]
302299

303300
theorem normAtPlace_real (w : InfinitePlace K) (c : ℝ) :
304-
normAtPlace w ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c| := by
305-
rw [show ((fun _ ↦ c, fun _ ↦ c) : (E K)) = c • 1 by ext <;> simp, normAtPlace_smul, map_one,
306-
mul_one]
301+
normAtPlace w ((fun _ ↦ c, fun _ ↦ c) : (mixedSpace K)) = |c| := by
302+
rw [show ((fun _ ↦ c, fun _ ↦ c) : (mixedSpace K)) = c • 1 by ext <;> simp, normAtPlace_smul,
303+
map_one, mul_one]
307304

308-
theorem normAtPlace_apply_isReal {w : InfinitePlace K} (hw : IsReal w) (x : E K) :
305+
theorem normAtPlace_apply_isReal {w : InfinitePlace K} (hw : IsReal w) (x : mixedSpace K) :
309306
normAtPlace w x = ‖x.1 ⟨w, hw⟩‖ := by
310307
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, dif_pos]
311308

312-
theorem normAtPlace_apply_isComplex {w : InfinitePlace K} (hw : IsComplex w) (x : E K) :
309+
theorem normAtPlace_apply_isComplex {w : InfinitePlace K} (hw : IsComplex w) (x : mixedSpace K) :
313310
normAtPlace w x = ‖x.2 ⟨w, hw⟩‖ := by
314311
rw [normAtPlace, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk,
315312
dif_neg (not_isReal_iff_isComplex.mpr hw)]
@@ -321,7 +318,7 @@ theorem normAtPlace_apply (w : InfinitePlace K) (x : K) :
321318
RingHom.prod_apply, Pi.ringHom_apply, norm_embedding_of_isReal, norm_embedding_eq, dite_eq_ite,
322319
ite_id]
323320

324-
theorem normAtPlace_eq_zero {x : E K} :
321+
theorem normAtPlace_eq_zero {x : mixedSpace K} :
325322
(∀ w, normAtPlace w x = 0) ↔ x = 0 := by
326323
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
327324
· ext w
@@ -331,7 +328,7 @@ theorem normAtPlace_eq_zero {x : E K} :
331328

332329
variable [NumberField K]
333330

334-
theorem nnnorm_eq_sup_normAtPlace (x : E K) :
331+
theorem nnnorm_eq_sup_normAtPlace (x : mixedSpace K) :
335332
‖x‖₊ = univ.sup fun w ↦ ⟨normAtPlace w x, normAtPlace_nonneg w x⟩ := by
336333
have :
337334
(univ : Finset (InfinitePlace K)) =
@@ -346,7 +343,7 @@ theorem nnnorm_eq_sup_normAtPlace (x : E K) :
346343
· ext w
347344
simp [normAtPlace_apply_isComplex w.prop]
348345

349-
theorem norm_eq_sup'_normAtPlace (x : E K) :
346+
theorem norm_eq_sup'_normAtPlace (x : mixedSpace K) :
350347
‖x‖ = univ.sup' univ_nonempty fun w ↦ normAtPlace w x := by
351348
rw [← coe_nnnorm, nnnorm_eq_sup_normAtPlace, ← sup'_eq_sup univ_nonempty, ← NNReal.val_eq_coe,
352349
← OrderHom.Subtype.val_coe, map_finset_sup', OrderHom.Subtype.val_coe]
@@ -355,43 +352,44 @@ theorem norm_eq_sup'_normAtPlace (x : E K) :
355352
/-- The norm of `x` is `∏ w, (normAtPlace x) ^ mult w`. It is defined such that the norm of
356353
`mixedEmbedding K a` for `a : K` is equal to the absolute value of the norm of `a` over `ℚ`,
357354
see `norm_eq_norm`. -/
358-
protected def norm : (E K) →*₀ ℝ where
355+
protected def norm : (mixedSpace K) →*₀ ℝ where
359356
toFun x := ∏ w, (normAtPlace w x) ^ (mult w)
360357
map_one' := by simp only [map_one, one_pow, prod_const_one]
361358
map_zero' := by simp [mult]
362359
map_mul' _ _ := by simp only [map_mul, mul_pow, prod_mul_distrib]
363360

364-
protected theorem norm_apply (x : E K) :
361+
protected theorem norm_apply (x : mixedSpace K) :
365362
mixedEmbedding.norm x = ∏ w, (normAtPlace w x) ^ (mult w) := rfl
366363

367-
protected theorem norm_nonneg (x : E K) :
364+
protected theorem norm_nonneg (x : mixedSpace K) :
368365
0 ≤ mixedEmbedding.norm x := univ.prod_nonneg fun _ _ ↦ pow_nonneg (normAtPlace_nonneg _ _) _
369366

370-
protected theorem norm_eq_zero_iff {x : E K} :
367+
protected theorem norm_eq_zero_iff {x : mixedSpace K} :
371368
mixedEmbedding.norm x = 0 ↔ ∃ w, normAtPlace w x = 0 := by
372369
simp_rw [mixedEmbedding.norm, MonoidWithZeroHom.coe_mk, ZeroHom.coe_mk, prod_eq_zero_iff,
373370
mem_univ, true_and, pow_eq_zero_iff mult_ne_zero]
374371

375-
protected theorem norm_ne_zero_iff {x : E K} :
372+
protected theorem norm_ne_zero_iff {x : mixedSpace K} :
376373
mixedEmbedding.norm x ≠ 0 ↔ ∀ w, normAtPlace w x ≠ 0 := by
377374
rw [← not_iff_not]
378375
simp_rw [ne_eq, mixedEmbedding.norm_eq_zero_iff, not_not, not_forall, not_not]
379376

380-
theorem norm_smul (c : ℝ) (x : E K) :
377+
theorem norm_smul (c : ℝ) (x : mixedSpace K) :
381378
mixedEmbedding.norm (c • x) = |c| ^ finrank ℚ K * (mixedEmbedding.norm x) := by
382379
simp_rw [mixedEmbedding.norm_apply, normAtPlace_smul, mul_pow, prod_mul_distrib,
383380
prod_pow_eq_pow_sum, sum_mult_eq]
384381

385382
theorem norm_real (c : ℝ) :
386-
mixedEmbedding.norm ((fun _ ↦ c, fun _ ↦ c) : (E K)) = |c| ^ finrank ℚ K := by
387-
rw [show ((fun _ ↦ c, fun _ ↦ c) : (E K)) = c • 1 by ext <;> simp, norm_smul, map_one, mul_one]
383+
mixedEmbedding.norm ((fun _ ↦ c, fun _ ↦ c) : (mixedSpace K)) = |c| ^ finrank ℚ K := by
384+
rw [show ((fun _ ↦ c, fun _ ↦ c) : (mixedSpace K)) = c • 1 by ext <;> simp, norm_smul, map_one,
385+
mul_one]
388386

389387
@[simp]
390388
theorem norm_eq_norm (x : K) :
391389
mixedEmbedding.norm (mixedEmbedding K x) = |Algebra.norm ℚ x| := by
392390
simp_rw [mixedEmbedding.norm_apply, normAtPlace_apply, prod_eq_abs_norm]
393391

394-
theorem norm_eq_zero_iff' {x : E K} (hx : x ∈ Set.range (mixedEmbedding K)) :
392+
theorem norm_eq_zero_iff' {x : mixedSpace K} (hx : x ∈ Set.range (mixedEmbedding K)) :
395393
mixedEmbedding.norm x = 0 ↔ x = 0 := by
396394
obtain ⟨a, rfl⟩ := hx
397395
rw [norm_eq_norm, Rat.cast_abs, abs_eq_zero, Rat.cast_eq_zero, Algebra.norm_eq_zero_iff,
@@ -410,25 +408,27 @@ variable [NumberField K]
410408
/-- The type indexing the basis `stdBasis`. -/
411409
abbrev index := {w : InfinitePlace K // IsReal w} ⊕ ({w : InfinitePlace K // IsComplex w}) × (Fin 2)
412410

413-
/-- The `ℝ`-basis of `({w // IsReal w} → ℝ) × ({ w // IsComplex w } → ℂ)` formed by the vector
414-
equal to `1` at `w` and `0` elsewhere for `IsReal w` and by the couple of vectors equal to `1`
415-
(resp. `I`) at `w` and `0` elsewhere for `IsComplex w`. -/
416-
def stdBasis : Basis (index K) ℝ (E K) :=
411+
/-- The `ℝ`-basis of the mixed space of `K` formed by the vector equal to `1` at `w` and `0`
412+
elsewhere for `IsReal w` and by the couple of vectors equal to `1` (resp. `I`) at `w` and `0`
413+
elsewhere for `IsComplex w`. -/
414+
def stdBasis : Basis (index K) ℝ (mixedSpace K) :=
417415
Basis.prod (Pi.basisFun ℝ _)
418416
(Basis.reindex (Pi.basis fun _ => basisOneI) (Equiv.sigmaEquivProd _ _))
419417

420418
variable {K}
421419

422420
@[simp]
423-
theorem stdBasis_apply_ofIsReal (x : E K) (w : {w : InfinitePlace K // IsReal w}) :
421+
theorem stdBasis_apply_ofIsReal (x : mixedSpace K) (w : {w : InfinitePlace K // IsReal w}) :
424422
(stdBasis K).repr x (Sum.inl w) = x.1 w := rfl
425423

426424
@[simp]
427-
theorem stdBasis_apply_ofIsComplex_fst (x : E K) (w : {w : InfinitePlace K // IsComplex w}) :
425+
theorem stdBasis_apply_ofIsComplex_fst (x : mixedSpace K)
426+
(w : {w : InfinitePlace K // IsComplex w}) :
428427
(stdBasis K).repr x (Sum.inr ⟨w, 0⟩) = (x.2 w).re := rfl
429428

430429
@[simp]
431-
theorem stdBasis_apply_ofIsComplex_snd (x : E K) (w : {w : InfinitePlace K // IsComplex w}) :
430+
theorem stdBasis_apply_ofIsComplex_snd (x : mixedSpace K)
431+
(w : {w : InfinitePlace K // IsComplex w}) :
432432
(stdBasis K).repr x (Sum.inr ⟨w, 1⟩) = (x.2 w).im := rfl
433433

434434
variable (K)
@@ -547,9 +547,9 @@ open Module.Free
547547

548548
open scoped nonZeroDivisors
549549

550-
/-- A `ℝ`-basis of `ℝ^r₁ × ℂ^r₂` that is also a `ℤ`-basis of the image of `𝓞 K`. -/
550+
/-- A `ℝ`-basis of the mixed space that is also a `ℤ`-basis of the image of `𝓞 K`. -/
551551
def latticeBasis :
552-
Basis (ChooseBasisIndex ℤ (𝓞 K)) ℝ (E K) := by
552+
Basis (ChooseBasisIndex ℤ (𝓞 K)) ℝ (mixedSpace K) := by
553553
classical
554554
-- We construct an `ℝ`-linear independent family from the image of
555555
-- `canonicalEmbedding.lattice_basis` by `commMap`
@@ -571,7 +571,7 @@ theorem latticeBasis_apply (i : ChooseBasisIndex ℤ (𝓞 K)) :
571571
simp only [latticeBasis, coe_basisOfLinearIndependentOfCardEqFinrank, Function.comp_apply,
572572
canonicalEmbedding.latticeBasis_apply, integralBasis_apply, commMap_canonical_eq_mixed]
573573

574-
theorem mem_span_latticeBasis (x : (E K)) :
574+
theorem mem_span_latticeBasis (x : (mixedSpace K)) :
575575
x ∈ Submodule.span ℤ (Set.range (latticeBasis K)) ↔
576576
x ∈ ((mixedEmbedding K).comp (algebraMap (𝓞 K) K)).range := by
577577
rw [show Set.range (latticeBasis K) =
@@ -611,8 +611,8 @@ variable (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ)
611611
/-- The generalized index of the lattice generated by `I` in the lattice generated by
612612
`𝓞 K` is equal to the norm of the ideal `I`. The result is stated in terms of base change
613613
determinant and is the translation of `NumberField.det_basisOfFractionalIdeal_eq_absNorm` in
614-
`ℝ^r₁ × ℂ^r₂`. This is useful, in particular, to prove that the family obtained from
615-
the `ℤ`-basis of `I` is actually an `ℝ`-basis of `ℝ^r₁ × ℂ^r₂`, see
614+
the mixed space. This is useful, in particular, to prove that the family obtained from
615+
the `ℤ`-basis of `I` is actually an `ℝ`-basis of the mixed space, see
616616
`fractionalIdealLatticeBasis`. -/
617617
theorem det_basisOfFractionalIdeal_eq_norm
618618
(e : (ChooseBasisIndex ℤ (𝓞 K)) ≃ (ChooseBasisIndex ℤ I)) :
@@ -628,10 +628,10 @@ theorem det_basisOfFractionalIdeal_eq_norm
628628
simp_rw [RingHom.mapMatrix_apply, Matrix.map_apply, Basis.toMatrix_apply, Function.comp_apply]
629629
exact latticeBasis_repr_apply K _ i
630630

631-
/-- A `ℝ`-basis of `ℝ^r₁ × ℂ^r₂` that is also a `ℤ`-basis of the image of the fractional
631+
/-- A `ℝ`-basis of the mixed space of `K` that is also a `ℤ`-basis of the image of the fractional
632632
ideal `I`. -/
633633
def fractionalIdealLatticeBasis :
634-
Basis (ChooseBasisIndex ℤ I) ℝ (E K) := by
634+
Basis (ChooseBasisIndex ℤ I) ℝ (mixedSpace K) := by
635635
let e : (ChooseBasisIndex ℤ (𝓞 K)) ≃ (ChooseBasisIndex ℤ I) := by
636636
refine Fintype.equivOfCardEq ?_
637637
rw [← finrank_eq_card_chooseBasisIndex, ← finrank_eq_card_chooseBasisIndex,
@@ -650,7 +650,7 @@ theorem fractionalIdealLatticeBasis_apply (i : ChooseBasisIndex ℤ I) :
650650
simp only [fractionalIdealLatticeBasis, Basis.coe_reindex, Basis.coe_mk, Function.comp_apply,
651651
Equiv.apply_symm_apply]
652652

653-
theorem mem_span_fractionalIdealLatticeBasis (x : (E K)) :
653+
theorem mem_span_fractionalIdealLatticeBasis (x : (mixedSpace K)) :
654654
x ∈ Submodule.span ℤ (Set.range (fractionalIdealLatticeBasis K I)) ↔
655655
x ∈ mixedEmbedding K '' I := by
656656
rw [show Set.range (fractionalIdealLatticeBasis K I) =

0 commit comments

Comments
 (0)