Skip to content

Commit a42f805

Browse files
committed
1st commit
1 parent d628459 commit a42f805

File tree

4 files changed

+69
-19
lines changed

4 files changed

+69
-19
lines changed

Mathlib/NumberTheory/NumberField/CMField.lean

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ Authors: Xavier Roblot
66
module
77

88
public import Mathlib.FieldTheory.Galois.Abelian
9+
public import Mathlib.FieldTheory.Galois.IsGaloisGroup
910
public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex
11+
public import Mathlib.NumberTheory.NumberField.Cyclotomic.Embeddings
1012
public import Mathlib.NumberTheory.NumberField.Units.Regulator
1113

1214
/-!
@@ -494,11 +496,18 @@ theorem algebraMap_equivMaximalRealSubfield_symm_apply (x : maximalRealSubfield
494496
algebraMap (maximalRealSubfield K) K x := by
495497
simpa using (equivMaximalRealSubfield_apply F K ((equivMaximalRealSubfield F K).symm x)).symm
496498

499+
end CMExtension
500+
501+
namespace IsCMField
502+
503+
variable (F K : Type*) [Field F] [IsTotallyReal F] [Field K] [CharZero K] [Algebra.IsIntegral ℚ K]
504+
[IsTotallyComplex K] [Algebra F K] [IsQuadraticExtension F K]
505+
497506
include F in
498507
/--
499508
If `K/F` is a CM-extension then `K` is a CM-field.
500509
-/
501-
theorem _root_.NumberField.IsCMField.ofCMExtension :
510+
theorem ofCMExtension :
502511
IsCMField K where
503512
is_quadratic := ⟨(IsQuadraticExtension.finrank_eq_two F K) ▸ finrank_eq_of_equiv_equiv
504513
(CMExtension.equivMaximalRealSubfield F K).symm (RingEquiv.refl K) (by ext; simp)⟩
@@ -507,24 +516,29 @@ open IntermediateField in
507516
/--
508517
A totally complex field that has a unique complex conjugation is CM.
509518
-/
510-
theorem _root_.NumberField.IsCMField.of_forall_isConj [NumberField K] {σ : Gal(K/ℚ)}
519+
theorem of_forall_isConj [IsGalois ℚ K] {σ : Gal(K/ℚ)}
511520
(hσ : ∀ φ : K →+* ℂ, IsConj φ σ) : IsCMField K := by
512-
have : IsTotallyReal (fixedField (Subgroup.zpowers σ)) := ⟨fun w ↦ by
521+
let φ : K →+* ℂ := Classical.choice (inferInstance : Nonempty _)
522+
have hσ' : Nat.card (Subgroup.zpowers σ) = 2 := by
523+
rw [Nat.card_zpowers, orderOf_isConj_two_of_ne_one (hσ φ)]
524+
exact (isConj_ne_one_iff (hσ φ)).mpr <| IsTotallyComplex.complexEmbedding_not_isReal φ
525+
have : Finite (Subgroup.zpowers σ) := Nat.finite_of_card_ne_zero (by positivity)
526+
let L := (FixedPoints.intermediateField (Subgroup.zpowers σ) : IntermediateField ℚ K)
527+
have : IsTotallyReal L := ⟨fun w ↦ by
513528
obtain ⟨W, rfl⟩ := w.comap_surjective (K := K)
514-
let τ := subgroupEquivAlgEquiv _ ⟨σ, Subgroup.mem_zpowers σ⟩
515-
have hτ : IsConj W.embedding τ := hσ _
516-
simpa [← isReal_mk_iff, ← InfinitePlace.comap_mk, mk_embedding] using hτ.isReal_comp⟩
517-
have : IsQuadraticExtension (fixedField (Subgroup.zpowers σ)) K := ⟨by
518-
let φ : K →+* ℂ := Classical.choice (inferInstance : Nonempty _)
519-
have hσ' : σ ≠ 1 :=
520-
(isConj_ne_one_iff (hσ φ)).mpr <| IsTotallyComplex.complexEmbedding_not_isReal φ
521-
rw [finrank_fixedField_eq_card, Nat.card_zpowers, orderOf_isConj_two_of_ne_one (hσ φ) hσ']⟩
522-
exact IsCMField.ofCMExtension (fixedField (Subgroup.zpowers σ)) K
529+
dsimp only
530+
rw [← mk_embedding W, comap_mk, isReal_mk_iff]
531+
exact ComplexEmbedding.IsConj.isReal_comp
532+
(σ := IsGaloisGroup.mulEquivAlgEquiv (Subgroup.zpowers σ) L K ⟨σ, Subgroup.mem_zpowers σ⟩)
533+
(hσ W.embedding)⟩
534+
have : IsQuadraticExtension L K := ⟨by
535+
rw [← IsGaloisGroup.card_subgroup_eq_finrank_fixedpoints, hσ']⟩
536+
exact IsCMField.ofCMExtension L K
523537

524538
/--
525539
A totally complex abelian extension of `ℚ` is CM.
526540
-/
527-
instance of_isMulCommutative [NumberField K] [IsAbelianGalois ℚ K] :
541+
instance of_isAbelianGalois [IsAbelianGalois ℚ K] :
528542
IsCMField K := by
529543
let φ : K →+* ℂ := Classical.choice (inferInstance : Nonempty _)
530544
obtain ⟨σ, hσ₁⟩ : ∃ σ : Gal(K/ℚ), ComplexEmbedding.IsConj φ σ :=
@@ -537,7 +551,30 @@ instance of_isMulCommutative [NumberField K] [IsAbelianGalois ℚ K] :
537551
exact hσ₁.comp _
538552
exact IsCMField.of_forall_isConj K hσ₂
539553

540-
end CMExtension
554+
@[deprecated (since := "2025-11-19")] alias NumberField.CMExtension.of_isMulCommutative :=
555+
NumberField.IsCMField.of_isAbelianGalois
541556

542-
end NumberField
557+
end NumberField.IsCMField
558+
namespace IsCyclotomicExtension.Rat
543559

560+
variable (K : Type*) [Field K] [CharZero K]
561+
562+
open IntermediateField in
563+
theorem isCMField {S : Set ℕ} (hS : ∃ n ∈ S, 2 < n) [IsCyclotomicExtension S ℚ K] :
564+
IsCMField K := by
565+
have : Algebra.IsIntegral ℚ K := integral S ℚ K
566+
obtain ⟨n, hn₁, hn₂⟩ := hS
567+
have : NeZero n := ⟨by positivity⟩
568+
obtain ⟨ζ, hζ⟩ := exists_isPrimitiveRoot ℚ K hn₁ (by grind)
569+
have : IsTotallyComplex K := by
570+
have : IsCyclotomicExtension {n} ℚ ℚ⟮ζ⟯ := hζ.intermediateField_adjoin_isCyclotomicExtension ℚ
571+
have : IsTotallyComplex ℚ⟮ζ⟯ := isTotallyComplex ℚ⟮ζ⟯ hn₂
572+
exact isTotallyComplex_of_algebra ℚ⟮ζ⟯ _
573+
have := isAbelianGalois S ℚ K
574+
exact IsCMField.of_isAbelianGalois K
575+
576+
instance [IsCyclotomicExtension ⊤ ℚ K] :
577+
IsCMField K :=
578+
isCMField K (S := ⊤) ⟨3, trivial, Nat.lt_succ_self 2
579+
580+
end IsCyclotomicExtension.Rat

Mathlib/NumberTheory/NumberField/Cyclotomic/Embeddings.lean

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authors: Riccardo Brasca
66
module
77

88
public import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
9-
public import Mathlib.NumberTheory.NumberField.InfinitePlace.Basic
9+
public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex
1010

1111
/-!
1212
# Cyclotomic extensions of `ℚ` are totally complex number fields.
@@ -30,13 +30,17 @@ variable {n : ℕ} [NeZero n] (K : Type u) [Field K] [CharZero K]
3030

3131
/-- If `K` is a `n`-th cyclotomic extension of `ℚ`, where `2 < n`, then there are no real places
3232
of `K`. -/
33-
theorem nrRealPlaces_eq_zero [IsCyclotomicExtension {n} ℚ K]
34-
(hn : 2 < n) :
33+
theorem nrRealPlaces_eq_zero [IsCyclotomicExtension {n} ℚ K] (hn : 2 < n) :
3534
haveI := IsCyclotomicExtension.numberField {n} ℚ K
3635
nrRealPlaces K = 0 := by
3736
have := IsCyclotomicExtension.numberField {n} ℚ K
3837
apply (IsCyclotomicExtension.zeta_spec n ℚ K).nrRealPlaces_eq_zero_of_two_lt hn
3938

39+
theorem isTotallyComplex [IsCyclotomicExtension {n} ℚ K] (hn : 2 < n) :
40+
IsTotallyComplex K := by
41+
have := IsCyclotomicExtension.numberField {n} ℚ K
42+
exact nrRealPlaces_eq_zero_iff.mp <| nrRealPlaces_eq_zero K hn
43+
4044
variable (n)
4145

4246
/-- If `K` is a `n`-th cyclotomic extension of `ℚ`, then there are `φ n / n` complex places

Mathlib/NumberTheory/NumberField/InfinitePlace/Ramification.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ lemma IsReal.comap (f : k →+* K) {w : InfinitePlace K} (hφ : IsReal w) :
7272
rw [← mk_embedding w, isReal_mk_iff] at hφ
7373
exact hφ.comp f
7474

75+
lemma IsComplex.of_comap (f : k →+* K) {w : InfinitePlace K} (hf : IsComplex (w.comap f)) :
76+
IsComplex w := by
77+
rw [← not_isReal_iff_isComplex] at hf ⊢
78+
exact (IsReal.comap f).mt hf
79+
7580
lemma isReal_comap_iff (f : k ≃+* K) {w : InfinitePlace K} :
7681
IsReal (w.comap (f : k →+* K)) ↔ IsReal w := by
7782
rw [← mk_embedding w, comap_mk, isReal_mk_iff, isReal_mk_iff, ComplexEmbedding.isReal_comp_iff]

Mathlib/NumberTheory/NumberField/InfinitePlace/TotallyRealComplex.lean

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ A field `K` is totally complex if all of its infinite places are complex.
212212
@[mk_iff] class IsTotallyComplex (K : Type*) [Field K] where
213213
isComplex : ∀ v : InfinitePlace K, v.IsComplex
214214

215-
variable {F : Type*} [Field F] {K : Type*} [Field K] [Algebra F K]
215+
variable (F : Type*) [Field F] {K : Type*} [Field K] [Algebra F K]
216216

217217
theorem nrRealPlaces_eq_zero_iff [NumberField K] :
218218
nrRealPlaces K = 0 ↔ IsTotallyComplex K := by
@@ -228,6 +228,10 @@ theorem IsTotallyComplex.mult_eq [IsTotallyComplex K] (w : InfinitePlace K) : mu
228228

229229
variable (K)
230230

231+
theorem isTotallyComplex_of_algebra [IsTotallyComplex F] :
232+
IsTotallyComplex K where
233+
isComplex _ := IsComplex.of_comap (algebraMap F K) <| IsTotallyComplex.isComplex _
234+
231235
@[simp]
232236
theorem IsTotallyComplex.nrRealPlaces_eq_zero [NumberField K] [h : IsTotallyComplex K] :
233237
nrRealPlaces K = 0 :=

0 commit comments

Comments
 (0)