/- Copyright (c) 2026 LANA Project. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: LANA Project -/ import Iut.Cor312.ThetaData.Places import Mathlib.RingTheory.Ideal.GoingUp import Mathlib.RingTheory.IntegralClosure.IntegralRestrict import Mathlib.NumberTheory.NumberField.InfinitePlace.Ramification import Mathlib.FieldTheory.KrullTopology /-! # Places of number fields over places of subfields (taxis #1529, #1494) For number fields `k βŠ† K`: * `Iut.FinitePlace.exists_liesOver`: every finite place of `k` has a finite place of `K` over it (going up for the integral extension `π“ž_k βŠ† π“ž_K`); * `Iut.InfinitePlace.exists_liesOver`: every infinite place of `k` has an infinite place of `K` over it (extension of complex embeddings); * `Iut.galPlace Οƒ w`: the action of `Οƒ ∈ Gal(K/k)` on the finite places of `K` (`σ·𝔓 = Οƒ(𝔓)`, through the restriction of `Οƒ` to `π“ž_K`), which preserves the place of `k` below (`Iut.galPlace_liesOver`); * `Iut.decompGroup w`: the **decomposition group** of a finite place `w` of `K` in `Gal(FΜ„/K)` β€” the stabilizer of a prime of the integral closure of `π“ž_K` in `FΜ„` lying over `𝔓_w` β€” and its closedness in the Krull topology (`Iut.decompGroup_isClosed`). -/ namespace Iut open NumberField IsDedekindDomain section Places variable {k K : Type*} [Field k] [NumberField k] [Field K] [NumberField K] [Algebra k K] omit [NumberField k] [NumberField K] in lemma algebraMap_ringOfIntegers_injective : Function.Injective (algebraMap (π“ž k) (π“ž K)) := by intro a b h have h' := congrArg (algebraMap (π“ž K) K) h rw [← IsScalarTower.algebraMap_apply, ← IsScalarTower.algebraMap_apply, IsScalarTower.algebraMap_apply (π“ž k) k K, IsScalarTower.algebraMap_apply (π“ž k) k K] at h' exact RingOfIntegers.coe_injective ((algebraMap k K).injective h') /-- **Every finite place of `k` has a finite place of `K` over it.** -/ theorem FinitePlace.exists_liesOver (v : FinitePlace k) : βˆƒ w : FinitePlace K, FinitePlace.LiesOver w v := by haveI : v.maximalIdeal.asIdeal.IsPrime := v.maximalIdeal.isPrime obtain ⟨Q, -, hQ, hQv⟩ := Ideal.exists_ideal_over_prime_of_isIntegral (S := π“ž K) v.maximalIdeal.asIdeal βŠ₯ (by rw [Ideal.comap_bot_of_injective _ algebraMap_ringOfIntegers_injective] exact bot_le) have hQne : Q β‰  βŠ₯ := by rintro rfl rw [Ideal.comap_bot_of_injective _ algebraMap_ringOfIntegers_injective] at hQv exact v.maximalIdeal.ne_bot hQv.symm refine ⟨FinitePlace.mk ⟨Q, hQ, hQne⟩, ?_⟩ unfold FinitePlace.LiesOver rw [FinitePlace.maximalIdeal_mk] exact ⟨hQv.symm⟩ /-- A number field is algebraic over any subfield (for any algebra structure). -/ instance numberField_isAlgebraic : Algebra.IsAlgebraic k K := by haveI : Algebra.IsAlgebraic β„š K := Algebra.IsAlgebraic.of_finite β„š K constructor intro x obtain ⟨p, hp0, hpx⟩ := Algebra.IsAlgebraic.isAlgebraic (R := β„š) x refine ⟨p.map (algebraMap β„š k), (Polynomial.map_ne_zero_iff (algebraMap β„š k).injective).mpr hp0, ?_⟩ rw [Polynomial.aeval_def, Polynomial.evalβ‚‚_map, Subsingleton.elim ((algebraMap k K).comp (algebraMap β„š k)) (algebraMap β„š K), ← Polynomial.aeval_def, hpx] /-- **Every infinite place of `k` has an infinite place of `K` over it.** -/ theorem InfinitePlace.exists_liesOver (v : InfinitePlace k) : βˆƒ w : InfinitePlace K, w.1.LiesOver v.1 := by obtain ⟨w, hw⟩ := NumberField.InfinitePlace.comap_surjective (k := k) (K := K) v exact ⟨w, ⟨by rw [← hw]; rfl⟩⟩ /-! ### The Galois action on finite places -/ /-- The restriction of `Οƒ ∈ Gal(K/k)` to the rings of integers. -/ noncomputable def galRestrictInt (Οƒ : K ≃ₐ[k] K) : π“ž K ≃ₐ[π“ž k] π“ž K := galRestrict (π“ž k) k K (π“ž K) Οƒ lemma coe_galRestrictInt (Οƒ : K ≃ₐ[k] K) (x : π“ž K) : (galRestrictInt Οƒ x : K) = Οƒ (x : K) := algebraMap_galRestrict_apply (A := π“ž k) (K := k) (L := K) (B := π“ž K) Οƒ x /-- **The action of `Gal(K/k)` on the finite places of `K`**: `σ·w` is the place of the prime `Οƒ(𝔓_w) = (σ⁻¹)⁻¹(𝔓_w)`. -/ noncomputable def galPlace (Οƒ : K ≃ₐ[k] K) (w : FinitePlace K) : FinitePlace K := FinitePlace.mk (HeightOneSpectrum.comap (galRestrictInt σ⁻¹ : π“ž K β†’+* π“ž K) (galRestrictInt σ⁻¹).surjective w.maximalIdeal) lemma galPlace_maximalIdeal (Οƒ : K ≃ₐ[k] K) (w : FinitePlace K) : (galPlace Οƒ w).maximalIdeal.asIdeal = w.maximalIdeal.asIdeal.comap (galRestrictInt σ⁻¹ : π“ž K β†’+* π“ž K) := by unfold galPlace rw [FinitePlace.maximalIdeal_mk] rfl /-- **The action preserves the place below**, for places of any subfield `kβ‚€ βŠ† k` (with the algebra structure of `K` over `kβ‚€` factoring through `k`). -/ theorem galPlace_liesOver {kβ‚€ : Type*} [Field kβ‚€] [NumberField kβ‚€] [Algebra kβ‚€ k] [Algebra kβ‚€ K] (halg : βˆ€ x : kβ‚€, algebraMap kβ‚€ K x = algebraMap k K (algebraMap kβ‚€ k x)) (Οƒ : K ≃ₐ[k] K) {w : FinitePlace K} {v : FinitePlace kβ‚€} (hw : FinitePlace.LiesOver w v) : FinitePlace.LiesOver (galPlace Οƒ w) v := by unfold FinitePlace.LiesOver at hw ⊒ refine ⟨?_⟩ rw [hw.over, galPlace_maximalIdeal, Ideal.under_def, Ideal.under_def, Ideal.comap_comap] congr 1 ext x rw [RingHom.comp_apply, RingHom.coe_coe, coe_galRestrictInt] have h : (algebraMap (π“ž kβ‚€) (π“ž K) x : K) = algebraMap k K (algebraMap kβ‚€ k (x : kβ‚€)) := by rw [← halg] change algebraMap (π“ž K) K (algebraMap (π“ž kβ‚€) (π“ž K) x) = _ rw [← IsScalarTower.algebraMap_apply (π“ž kβ‚€) (π“ž K) K, IsScalarTower.algebraMap_apply (π“ž kβ‚€) kβ‚€ K] rw [h, AlgEquiv.commutes] /-! ### Decomposition groups -/ variable (K) (Fbar : Type*) [Field Fbar] [Algebra K Fbar] /-- The integral closure of `π“ž_K` in `FΜ„`. -/ abbrev intClosure : Subalgebra (π“ž K) Fbar := integralClosure (π“ž K) Fbar omit [NumberField K] in lemma algebraMap_intClosure_injective : Function.Injective (algebraMap (π“ž K) (intClosure K Fbar)) := by intro a b h have h' := congrArg (algebraMap (intClosure K Fbar) Fbar) h rw [← IsScalarTower.algebraMap_apply, ← IsScalarTower.algebraMap_apply, IsScalarTower.algebraMap_apply (π“ž K) K Fbar, IsScalarTower.algebraMap_apply (π“ž K) K Fbar] at h' exact RingOfIntegers.coe_injective ((algebraMap K Fbar).injective h') /-- A prime of the integral closure of `π“ž_K` in `FΜ„` over `𝔓_w` exists. -/ theorem exists_prime_over (w : FinitePlace K) : βˆƒ Q : Ideal (intClosure K Fbar), Q.IsPrime ∧ Q.comap (algebraMap (π“ž K) (intClosure K Fbar)) = w.maximalIdeal.asIdeal := by haveI : w.maximalIdeal.asIdeal.IsPrime := w.maximalIdeal.isPrime obtain ⟨Q, -, hQ, hQw⟩ := Ideal.exists_ideal_over_prime_of_isIntegral (S := intClosure K Fbar) w.maximalIdeal.asIdeal βŠ₯ (by rw [Ideal.comap_bot_of_injective _ (algebraMap_intClosure_injective K Fbar)] exact bot_le) exact ⟨Q, hQ, hQw⟩ /-- A chosen prime of the integral closure over `𝔓_w`. -/ noncomputable def primeOver (w : FinitePlace K) : Ideal (intClosure K Fbar) := (exists_prime_over K Fbar w).choose lemma primeOver_isPrime (w : FinitePlace K) : (primeOver K Fbar w).IsPrime := (exists_prime_over K Fbar w).choose_spec.1 lemma primeOver_comap (w : FinitePlace K) : (primeOver K Fbar w).comap (algebraMap (π“ž K) (intClosure K Fbar)) = w.maximalIdeal.asIdeal := (exists_prime_over K Fbar w).choose_spec.2 /-- The chosen prime over `𝔓_w`, as a set of elements of `FΜ„`. -/ def primeOverSet (w : FinitePlace K) : Set Fbar := {x | βˆƒ hx : x ∈ intClosure K Fbar, (⟨x, hx⟩ : intClosure K Fbar) ∈ primeOver K Fbar w} /-- **The decomposition group** of `w` in `Gal(FΜ„/K)`: the stabilizer of the chosen prime of the integral closure of `π“ž_K` in `FΜ„` over `𝔓_w`. -/ def decompGroup (w : FinitePlace K) : Subgroup (Fbar ≃ₐ[K] Fbar) where carrier := {Οƒ | βˆ€ x, x ∈ primeOverSet K Fbar w ↔ Οƒ x ∈ primeOverSet K Fbar w} one_mem' := fun _ => Iff.rfl mul_mem' := fun {Οƒ Ο„} hΟƒ hΟ„ x => by simp only [Set.mem_setOf_eq] at hΟƒ hΟ„ ⊒ rw [AlgEquiv.mul_apply, ← hΟƒ, ← hΟ„] inv_mem' := fun {Οƒ} hΟƒ x => by simp only [Set.mem_setOf_eq] at hΟƒ ⊒ have h := hΟƒ (σ⁻¹ x) rw [← AlgEquiv.mul_apply, mul_inv_cancel, AlgEquiv.one_apply] at h exact h.symm omit [NumberField K] in /-- The set of automorphisms sending `x` to `y` is open (Krull topology). -/ lemma isOpen_eval_eq [Algebra.IsIntegral K Fbar] (x y : Fbar) : IsOpen {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x = y} := by by_cases h : βˆƒ Οƒβ‚€ : Fbar ≃ₐ[K] Fbar, Οƒβ‚€ x = y Β· obtain βŸ¨Οƒβ‚€, hΟƒβ‚€βŸ© := h have hset : {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x = y} = (fun Οƒ => σ₀⁻¹ * Οƒ) ⁻¹' (MulAction.stabilizer (Fbar ≃ₐ[K] Fbar) x) := by ext Οƒ simp only [Set.mem_setOf_eq, Set.mem_preimage, SetLike.mem_coe, MulAction.mem_stabilizer_iff, AlgEquiv.smul_def, AlgEquiv.mul_apply] constructor Β· intro hΟƒ rw [hΟƒ, ← hΟƒβ‚€, ← AlgEquiv.mul_apply, inv_mul_cancel, AlgEquiv.one_apply] Β· intro hΟƒ have := congrArg Οƒβ‚€ hΟƒ rwa [← AlgEquiv.mul_apply, mul_inv_cancel, AlgEquiv.one_apply, hΟƒβ‚€] at this rw [hset] exact (stabilizer_isOpen_of_isIntegral (K := K) x).preimage (continuous_const.mul continuous_id) Β· push Not at h have : {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x = y} = βˆ… := by ext Οƒ; simp [h Οƒ] rw [this] exact isOpen_empty omit [NumberField K] in /-- The set of automorphisms sending `x` into (resp. out of) a set is open. -/ lemma isOpen_eval_mem [Algebra.IsIntegral K Fbar] (x : Fbar) (S : Set Fbar) : IsOpen {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x ∈ S} := by have : {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x ∈ S} = ⋃ y ∈ S, {Οƒ | Οƒ x = y} := by ext Οƒ simp only [Set.mem_setOf_eq, Set.mem_iUnion, exists_prop] exact ⟨fun h => βŸ¨Οƒ x, h, rfl⟩, by rintro ⟨y, hy, rfl⟩; exact hy⟩ rw [this] exact isOpen_biUnion fun y _ => isOpen_eval_eq K Fbar x y /-- **Decomposition groups are closed** in the Krull topology. -/ theorem decompGroup_isClosed [Algebra.IsIntegral K Fbar] (w : FinitePlace K) : IsClosed ((decompGroup K Fbar w : Subgroup _) : Set (Fbar ≃ₐ[K] Fbar)) := by have : ((decompGroup K Fbar w : Subgroup _) : Set (Fbar ≃ₐ[K] Fbar)) = β‹‚ x, {Οƒ | x ∈ primeOverSet K Fbar w ↔ Οƒ x ∈ primeOverSet K Fbar w} := by ext Οƒ; simp [decompGroup] rw [this] refine isClosed_iInter fun x => ?_ by_cases hx : x ∈ primeOverSet K Fbar w Β· have : {Οƒ : Fbar ≃ₐ[K] Fbar | x ∈ primeOverSet K Fbar w ↔ Οƒ x ∈ primeOverSet K Fbar w} = {Οƒ | Οƒ x ∈ primeOverSet K Fbar w} := by ext Οƒ; simp [hx] rw [this, ← isOpen_compl_iff] have : {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x ∈ primeOverSet K Fbar w}ᢜ = {Οƒ | Οƒ x ∈ (primeOverSet K Fbar w)ᢜ} := by ext Οƒ; simp rw [this] exact isOpen_eval_mem K Fbar x _ Β· have : {Οƒ : Fbar ≃ₐ[K] Fbar | x ∈ primeOverSet K Fbar w ↔ Οƒ x ∈ primeOverSet K Fbar w} = {Οƒ | Οƒ x ∈ (primeOverSet K Fbar w)ᢜ} := by ext Οƒ; simp [hx] rw [this, ← isOpen_compl_iff] have : {Οƒ : Fbar ≃ₐ[K] Fbar | Οƒ x ∈ (primeOverSet K Fbar w)ᢜ}ᢜ = {Οƒ | Οƒ x ∈ primeOverSet K Fbar w} := by ext Οƒ; simp rw [this] exact isOpen_eval_mem K Fbar x _ end Places end Iut