/- 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.Tower.Basic /-! # The inertia criterion for `e(v/u) = 1` For a Galois extension `K/k` of number fields and a place `v` of `K` over `u` of `k`, the ramification index `e(v/u)` is the order of the inertia group `I_v = {Οƒ ∈ Gal(K/k) | Οƒ x ≑ x mod 𝔓_v for all x ∈ π“ž_K}` (Mathlib's `Ideal.card_inertia_eq_ramificationIdxIn`). Hence `e(v/u) = 1` as soon as every `Οƒ ∈ I_v` is the identity (`Iut.relRamIdx_eq_one_of_inertia_trivial`). The inertia condition is transported from `π“ž_K` to the `v`-integral elements of `K` (`Iut.valuation_sub_lt_one_of_mem_inertia'`): `x = n/d` with `d βˆ‰ 𝔓_v`. -/ namespace Iut open NumberField IsDedekindDomain IsDedekindDomain.HeightOneSpectrum variable {k K : Type*} [Field k] [NumberField k] [Field K] [NumberField K] [Algebra k K] omit [NumberField k] [NumberField K] in /-- The action of `Οƒ ∈ Gal(K/k)` on `π“ž_K`, on coordinates. -/ lemma coe_galSmul (Οƒ : K ≃ₐ[k] K) (x : π“ž K) : ((Οƒ β€’ x : π“ž K) : K) = Οƒ (x : K) := rfl omit [NumberField k] in /-- **The inertia condition on `v`-integral elements**: if `Οƒ x βˆ’ x ∈ 𝔓_v` for all `x ∈ π“ž_K`, then `v(Οƒ x βˆ’ x) < 1` for every `x ∈ K` with `v(x) ≀ 1`. -/ lemma valuation_sub_lt_one_of_mem_inertia' (v : FinitePlace K) (Οƒ : K ≃ₐ[k] K) (hΟƒ : Οƒ ∈ v.maximalIdeal.asIdeal.inertia (K ≃ₐ[k] K)) (x : K) (hx : v.maximalIdeal.valuation K x ≀ 1) : v.maximalIdeal.valuation K (Οƒ x - x) < 1 := by set w := v.maximalIdeal obtain ⟨n, d, hnd⟩ := exists_primeCompl_mul_eq_of_integer w x hx have hd0 : (d : π“ž K) β‰  0 := fun h => d.2 (by rw [h]; exact w.asIdeal.zero_mem) have hd0' : (algebraMap (π“ž K) K d) β‰  0 := (map_ne_zero_iff _ (IsFractionRing.injective (π“ž K) K)).mpr hd0 have hmem : βˆ€ y : π“ž K, w.valuation K (Οƒ (y : K) - y) < 1 := by intro y have h := hΟƒ y rw [Submodule.mem_toAddSubgroup] at h have : (Οƒ (y : K) - y) = algebraMap (π“ž K) K (Οƒ β€’ y - y) := by rw [map_sub]; rfl rw [this, valuation_lt_one_iff_mem] exact h have hdval : w.valuation K (algebraMap (π“ž K) K d) = 1 := (valuation_eq_one_iff_notMem w).mpr d.2 have hΟƒd : w.valuation K (Οƒ (algebraMap (π“ž K) K d)) = 1 := by have h1 := hmem d have : Οƒ (algebraMap (π“ž K) K d) = (Οƒ (algebraMap (π“ž K) K d) - algebraMap (π“ž K) K d) + algebraMap (π“ž K) K d := by ring rw [this, Valuation.map_add_eq_of_lt_right _ (by rw [hdval]; exact h1), hdval] have hΟƒd0 : Οƒ (algebraMap (π“ž K) K d) β‰  0 := by intro h; rw [h, map_zero] at hΟƒd; exact zero_ne_one hΟƒd have hx' : x = algebraMap (π“ž K) K n / algebraMap (π“ž K) K d := by rw [eq_div_iff hd0']; exact hnd have key : Οƒ x - x = ((Οƒ (algebraMap (π“ž K) K n) - algebraMap (π“ž K) K n) * algebraMap (π“ž K) K d - algebraMap (π“ž K) K n * (Οƒ (algebraMap (π“ž K) K d) - algebraMap (π“ž K) K d)) / (Οƒ (algebraMap (π“ž K) K d) * algebraMap (π“ž K) K d) := by rw [hx', map_divβ‚€] field_simp ring rw [key, map_divβ‚€, map_mul, hΟƒd, hdval, one_mul, div_one] refine lt_of_le_of_lt (Valuation.map_sub _ _ _) (max_lt ?_ ?_) Β· rw [map_mul, hdval, mul_one]; exact hmem n Β· rw [map_mul] calc w.valuation K (algebraMap (π“ž K) K n) * w.valuation K (Οƒ (algebraMap (π“ž K) K d) - algebraMap (π“ž K) K d) ≀ 1 * w.valuation K (Οƒ (algebraMap (π“ž K) K d) - algebraMap (π“ž K) K d) := mul_le_mul_left (valuation_le_one w n) _ _ < 1 := by rw [one_mul]; exact hmem d variable [IsGalois k K] /-- **The inertia criterion**: `e(v/u) = 1` if every `Οƒ ∈ Gal(K/k)` with `v(Οƒ x βˆ’ x) < 1` for all `v`-integral `x` is the identity. -/ theorem relRamIdx_eq_one_of_inertia_trivial {v : FinitePlace K} {u : FinitePlace k} (hvu : FinitePlace.LiesOver v u) (hfix : βˆ€ Οƒ : K ≃ₐ[k] K, (βˆ€ x : K, v.maximalIdeal.valuation K x ≀ 1 β†’ v.maximalIdeal.valuation K (Οƒ x - x) < 1) β†’ Οƒ = 1) : relRamIdx v u = 1 := by haveI : v.maximalIdeal.asIdeal.LiesOver u.maximalIdeal.asIdeal := hvu have h1 := Ideal.card_inertia_eq_ramificationIdxIn (G := K ≃ₐ[k] K) u.maximalIdeal.asIdeal v.maximalIdeal.asIdeal have h2 := Ideal.ramificationIdxIn_eq_ramificationIdx u.maximalIdeal.asIdeal v.maximalIdeal.asIdeal (K ≃ₐ[k] K) have hpS : u.maximalIdeal.asIdeal.map (algebraMap (π“ž k) (π“ž K)) β‰  βŠ₯ := by rw [Ne, Ideal.map_eq_bot_iff_of_injective algebraMap_ringOfIntegers_injective] exact u.maximalIdeal.ne_bot have h3 := Ideal.ramificationIdx'_eq_ramificationIdx' u.maximalIdeal.asIdeal v.maximalIdeal.asIdeal hpS have h4 : v.maximalIdeal.asIdeal.inertia (K ≃ₐ[k] K) = βŠ₯ := by rw [eq_bot_iff] intro Οƒ hΟƒ rw [Subgroup.mem_bot] exact hfix Οƒ (valuation_sub_lt_one_of_mem_inertia' v Οƒ hΟƒ) change u.maximalIdeal.asIdeal.ramificationIdx' v.maximalIdeal.asIdeal = 1 rw [h3, ← h2, ← h1, Subgroup.card_eq_one, h4] end Iut