@@ -6,7 +6,9 @@ Authors: Xavier Roblot
66module
77
88public import Mathlib.FieldTheory.Galois.Abelian
9+ public import Mathlib.FieldTheory.Galois.IsGaloisGroup
910public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex
11+ public import Mathlib.NumberTheory.NumberField.Cyclotomic.Embeddings
1012public 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+
497506include F in
498507/--
499508If `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/--
508517A 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/--
525539A 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
0 commit comments