@@ -5,20 +5,22 @@ Authors: Xavier Roblot
55-/
66module
77
8+ public import Mathlib.FieldTheory.Galois.Abelian
9+ public import Mathlib.FieldTheory.Galois.IsGaloisGroup
810public import Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex
11+ public import Mathlib.NumberTheory.NumberField.Cyclotomic.Embeddings
912public import Mathlib.NumberTheory.NumberField.Units.Regulator
10- public import Mathlib.RingTheory.RootsOfUnity.Complex
1113
1214/-!
1315# CM-extension of number fields
1416
15- A CM-extension `K/F` of number fields is an extension where `K` is totally complex, `F` is
17+ A CM-extension `K/F` of fields is an extension where `K` is totally complex, `F` is
1618totally real and `K` is a quadratic extension of `F`. In this situation, the totally real
1719subfield `F` is (isomorphic to) the maximal real subfield `K⁺` of `K`.
1820
1921## Main definitions and results
2022
21- * `NumberField.IsCMField`: A predicate that says that if a number field is CM, then it is a totally
23+ * `NumberField.IsCMField`: A predicate that says that if a field is CM, then it is a totally
2224 complex quadratic extension of its totally real subfield
2325
2426* `NumberField.CMExtension.equivMaximalRealSubfield`: Any field `F` such that `K/F` is a
@@ -61,18 +63,18 @@ namespace NumberField
6163section maximalRealSubfield
6264
6365/--
64- A number field `K` is `CM` if `K` is a totally complex quadratic extension of its maximal
66+ A field `K` is `CM` if `K` is a totally complex quadratic extension of its maximal
6567real subfield `K⁺`.
6668-/
67- class IsCMField (K : Type *) [Field K] [NumberField K] : Prop where
69+ class IsCMField (K : Type *) [Field K] [CharZero K] : Prop where
6870 [to_isTotallyComplex : IsTotallyComplex K]
6971 [is_quadratic : IsQuadraticExtension (maximalRealSubfield K) K]
7072
7173namespace IsCMField
7274
7375open ComplexEmbedding
7476
75- variable (K : Type *) [Field K] [NumberField K] [IsCMField K]
77+ variable (K : Type *) [Field K] [CharZero K] [IsCMField K]
7678
7779local notation3 "K⁺" => maximalRealSubfield K
7880
@@ -82,7 +84,7 @@ instance isQuadraticExtension : IsQuadraticExtension K⁺ K :=
8284instance isTotallyComplex : IsTotallyComplex K :=
8385 IsCMField.to_isTotallyComplex
8486
85- theorem card_infinitePlace_eq_card_infinitePlace :
87+ theorem card_infinitePlace_eq_card_infinitePlace [NumberField K] :
8688 Fintype.card (InfinitePlace K⁺) = Fintype.card (InfinitePlace K) := by
8789 rw [card_eq_nrRealPlaces_add_nrComplexPlaces, card_eq_nrRealPlaces_add_nrComplexPlaces,
8890 IsTotallyComplex.nrRealPlaces_eq_zero K, IsTotallyReal.nrComplexPlaces_eq_zero, zero_add,
@@ -94,24 +96,26 @@ theorem card_infinitePlace_eq_card_infinitePlace :
9496The equiv between the infinite places of `K` and the infinite places of `K⁺` induced by the
9597restriction to `K⁺`, see `equivInfinitePlace_apply`.
9698-/
97- noncomputable def equivInfinitePlace : InfinitePlace K ≃ InfinitePlace K⁺ :=
99+ noncomputable def equivInfinitePlace [NumberField K] : InfinitePlace K ≃ InfinitePlace K⁺ :=
98100 Equiv.ofBijective (fun w ↦ w.comap (algebraMap K⁺ K)) <|
99101 (Fintype.bijective_iff_surjective_and_card _).mpr
100102 ⟨comap_surjective, (card_infinitePlace_eq_card_infinitePlace K).symm⟩
101103
102104@[simp]
103- theorem equivInfinitePlace_apply (w : InfinitePlace K) :
105+ theorem equivInfinitePlace_apply [NumberField K] (w : InfinitePlace K) :
104106 equivInfinitePlace K w = w.comap (algebraMap K⁺ K) := rfl
105107
106108@[simp]
107- theorem equivInfinitePlace_symm_apply (w : InfinitePlace K⁺) (x : K⁺) :
109+ theorem equivInfinitePlace_symm_apply [NumberField K] (w : InfinitePlace K⁺) (x : K⁺) :
108110 (equivInfinitePlace K).symm w (algebraMap K⁺ K x) = w x := by
109111 rw [← comap_apply, ← equivInfinitePlace_apply, Equiv.apply_symm_apply]
110112
111- theorem units_rank_eq_units_rank :
113+ theorem units_rank_eq_units_rank [NumberField K] :
112114 Units.rank K⁺ = Units.rank K := by
113115 rw [Units.rank, Units.rank, card_infinitePlace_eq_card_infinitePlace K]
114116
117+ section complexConj
118+
115119theorem exists_isConj (φ : K →+* ℂ) :
116120 ∃ σ : K ≃ₐ[K⁺] K, IsConj φ σ :=
117121 exists_isConj_of_isRamified <|
@@ -129,6 +133,8 @@ theorem isConj_eq_isConj {φ ψ : K →+* ℂ} {σ τ : K ≃ₐ[K⁺] K}
129133 ((isConj_ne_one_iff hφ).mpr <| IsTotallyComplex.complexEmbedding_not_isReal φ)
130134 ((isConj_ne_one_iff hψ).mpr <| IsTotallyComplex.complexEmbedding_not_isReal ψ)
131135
136+ variable [Algebra.IsIntegral ℚ K]
137+
132138/--
133139The complex conjugation of the CM-field `K`.
134140-/
@@ -244,13 +250,15 @@ theorem ringOfIntegersComplexConj_eq_self_iff (x : 𝓞 K) :
244250 · rintro ⟨y, rfl⟩
245251 simp
246252
253+ end complexConj
254+
247255section units
248256
249257open Units
250258
251259/--
252260The complex conjugation as an isomorphism of the units of `K`. -/
253- noncomputable abbrev unitsComplexConj : (𝓞 K)ˣ ≃* (𝓞 K)ˣ :=
261+ noncomputable abbrev unitsComplexConj [Algebra.IsIntegral ℚ K] : (𝓞 K)ˣ ≃* (𝓞 K)ˣ :=
254262 Units.mapEquiv <| RingOfIntegers.mapRingEquiv (complexConj K).toRingEquiv
255263
256264/--
@@ -259,18 +267,20 @@ by the complex conjugation, see `IsCMField.unitsComplexConj_eq_self_iff`.
259267-/
260268def realUnits : Subgroup (𝓞 K)ˣ := (Units.map (algebraMap (𝓞 K⁺) (𝓞 K)).toMonoidHom).range
261269
262- omit [IsCMField K] in
270+ omit [IsCMField K] [CharZero K] in
263271theorem mem_realUnits_iff (u : (𝓞 K)ˣ) :
264272 u ∈ realUnits K ↔ ∃ v : (𝓞 K⁺)ˣ, algebraMap (𝓞 K⁺) (𝓞 K) v = u := by
265273 simp [realUnits, MonoidHom.mem_range, RingHom.toMonoidHom_eq_coe, Units.ext_iff]
266274
267- theorem unitsComplexConj_eq_self_iff (u : (𝓞 K)ˣ) :
275+ theorem unitsComplexConj_eq_self_iff [Algebra.IsIntegral ℚ K] (u : (𝓞 K)ˣ) :
268276 unitsComplexConj K u = u ↔ u ∈ realUnits K := by
269277 simp_rw [Units.ext_iff, mem_realUnits_iff, RingOfIntegers.ext_iff, Units.coe_mapEquiv,
270278 AlgEquiv.toRingEquiv_eq_coe, RingEquiv.coe_toMulEquiv, RingOfIntegers.mapRingEquiv_apply,
271279 AlgEquiv.coe_ringEquiv, Units.complexConj_eq_self_iff,
272280 IsScalarTower.algebraMap_apply (𝓞 K⁺) (𝓞 K) K]
273281
282+ variable [NumberField K]
283+
274284/--
275285The image of a root of unity by the complex conjugation is its inverse.
276286This is the version of `Complex.conj_rootsOfUnity` for CM-fields.
@@ -440,7 +450,7 @@ end maximalRealSubfield
440450
441451namespace CMExtension
442452
443- variable (F K : Type *) [Field F] [NumberField F] [IsTotallyReal F ] [Field K] [NumberField K]
453+ variable (F K : Type *) [Field F] [IsTotallyReal F] [Field K ] [CharZero K] [Algebra.IsIntegral ℚ K]
444454 [IsTotallyComplex K] [Algebra F K] [IsQuadraticExtension F K]
445455
446456theorem eq_maximalRealSubfield (E : Subfield K) [IsTotallyReal E] [IsQuadraticExtension E K] :
@@ -457,6 +467,8 @@ theorem eq_maximalRealSubfield (E : Subfield K) [IsTotallyReal E] [IsQuadraticEx
457467 rw [← SetLike.coe_set_eq, Subfield.coe_toIntermediateField] at h
458468 rw [← sup_eq_left, ← SetLike.coe_set_eq, h, IntermediateField.coe_bot]
459469 aesop
470+ have : Algebra.IsAlgebraic (maximalRealSubfield K) K :=
471+ Algebra.IsAlgebraic.tower_top (K := ℚ) (maximalRealSubfield K)
460472 have : IsTotallyReal K := (h' ▸ isTotallyReal_sup).ofRingEquiv Subring.topEquiv
461473 obtain w : InfinitePlace K := Classical.choice (inferInstance : Nonempty _)
462474 exact (not_isReal_iff_isComplex.mpr (IsTotallyComplex.isComplex w)) (IsTotallyReal.isReal w)
@@ -484,11 +496,18 @@ theorem algebraMap_equivMaximalRealSubfield_symm_apply (x : maximalRealSubfield
484496 algebraMap (maximalRealSubfield K) K x := by
485497 simpa using (equivMaximalRealSubfield_apply F K ((equivMaximalRealSubfield F K).symm x)).symm
486498
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+
487506include F in
488507/--
489508If `K/F` is a CM-extension then `K` is a CM-field.
490509-/
491- theorem _root_.NumberField.IsCMField. ofCMExtension :
510+ theorem ofCMExtension :
492511 IsCMField K where
493512 is_quadratic := ⟨(IsQuadraticExtension.finrank_eq_two F K) ▸ finrank_eq_of_equiv_equiv
494513 (CMExtension.equivMaximalRealSubfield F K).symm (RingEquiv.refl K) (by ext; simp)⟩
@@ -497,24 +516,29 @@ open IntermediateField in
497516/--
498517A totally complex field that has a unique complex conjugation is CM.
499518-/
500- theorem _root_.NumberField.IsCMField. of_forall_isConj {σ : Gal(K/ℚ)}
519+ theorem of_forall_isConj [IsGalois ℚ K] {σ : Gal(K/ℚ)}
501520 (hσ : ∀ φ : K →+* ℂ, IsConj φ σ) : IsCMField K := by
502- 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
503528 obtain ⟨W, rfl⟩ := w.comap_surjective (K := K)
504- let τ := subgroupEquivAlgEquiv _ ⟨σ, Subgroup.mem_zpowers σ⟩
505- have hτ : IsConj W.embedding τ := hσ _
506- simpa [← isReal_mk_iff, ← InfinitePlace.comap_mk, mk_embedding] using hτ.isReal_comp⟩
507- have : IsQuadraticExtension (fixedField (Subgroup.zpowers σ)) K := ⟨by
508- let φ : K →+* ℂ := Classical.choice (inferInstance : Nonempty _)
509- have hσ' : σ ≠ 1 :=
510- (isConj_ne_one_iff (hσ φ)).mpr <| IsTotallyComplex.complexEmbedding_not_isReal φ
511- rw [finrank_fixedField_eq_card, Nat.card_zpowers, orderOf_isConj_two_of_ne_one (hσ φ) hσ']⟩
512- 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
513537
514538/--
515539A totally complex abelian extension of `ℚ` is CM.
516540-/
517- instance of_isMulCommutative [IsGalois ℚ K] [IsMulCommutative Gal(K/ℚ) ] :
541+ instance of_isAbelianGalois [IsAbelianGalois ℚ K] :
518542 IsCMField K := by
519543 let φ : K →+* ℂ := Classical.choice (inferInstance : Nonempty _)
520544 obtain ⟨σ, hσ₁⟩ : ∃ σ : Gal(K/ℚ), ComplexEmbedding.IsConj φ σ :=
@@ -527,6 +551,30 @@ instance of_isMulCommutative [IsGalois ℚ K] [IsMulCommutative Gal(K/ℚ)] :
527551 exact hσ₁.comp _
528552 exact IsCMField.of_forall_isConj K hσ₂
529553
530- end CMExtension
554+ @[deprecated (since := "2025-11-19")] alias NumberField.CMExtension.of_isMulCommutative :=
555+ NumberField.IsCMField.of_isAbelianGalois
531556
532- end NumberField
557+ end NumberField.IsCMField
558+ namespace IsCyclotomicExtension.Rat
559+
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