|
| 1 | +/- |
| 2 | +Copyright (c) 2026 Thomas Browning. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Thomas Browning |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.FieldTheory.Galois.IsGaloisGroup |
| 9 | +public import Mathlib.RingTheory.Flat.TorsionFree |
| 10 | +public import Mathlib.RingTheory.RamificationInertia.Inertia |
| 11 | +public import Mathlib.RingTheory.RamificationInertia.Ramification |
| 12 | +public import Mathlib.RingTheory.Spectrum.Prime.FreeLocus |
| 13 | + |
| 14 | +/-! |
| 15 | +# Ramification index and inertia degree |
| 16 | +
|
| 17 | +This file proves that the sum of ramification times inertia equals the degree of the extension. |
| 18 | +
|
| 19 | +Typically this is only stated for extensions of Dedekind domains, but we prove it for any finite |
| 20 | +flat extension of an integral domain. |
| 21 | +
|
| 22 | +## Main results |
| 23 | +
|
| 24 | +* `Ideal.sum_ramification_inertia_eq_finrank`: Let `R` be an integral domain, let `S` be a finite |
| 25 | + flat `R`-algebra, and let `p` be a prime ideal of `R`. Then the sum over all prime ideals `q` of |
| 26 | + `S` lying over `p` of the ramification index of `q` times the inertia degree of `q` equals the |
| 27 | + rank of `S` as an `R`-module. |
| 28 | +* `Ideal.sum_ramification_inertia_eq_card`: Let `S/R` be a finite flat extension of domains, |
| 29 | + and let `p` be prime ideal of `R`. Assume that `R` is the invariant subring of a finite group `G` |
| 30 | + acting on `S`. Then the sum over all prime ideals `q` of `S` lying over `p` of the ramification |
| 31 | + index of `q` times the inertia degree of `q` equals the cardinality of `G`. |
| 32 | +
|
| 33 | +-/ |
| 34 | + |
| 35 | +@[expose] public section |
| 36 | + |
| 37 | +section |
| 38 | + |
| 39 | +namespace Ideal |
| 40 | + |
| 41 | +variable {R : Type*} [CommRing R] (p : Ideal R) [p.IsPrime] (S : Type*) [CommRing S] [Algebra R S] |
| 42 | + |
| 43 | +open IsLocalRing Module OrderIso PrimeSpectrum in |
| 44 | +theorem sum_ramification_inertia_eq_finrank_fiber |
| 45 | + [Algebra.QuasiFinite R S] [Flat R S] [Fintype (p.primesOver S)] : |
| 46 | + ∑ q : p.primesOver S, q.1.ramificationIdx' R * q.1.inertiaDeg' R = |
| 47 | + finrank p.ResidueField (p.Fiber S) := by |
| 48 | + let := Fintype.ofFinite (PrimeSpectrum (p.Fiber S)) |
| 49 | + rw [IsArtinianRing.finrank_eq_sum_primeSpectrum, ← (primesOverOrderIsoFiber R S p).symm.sum_comp] |
| 50 | + apply Finset.sum_congr rfl |
| 51 | + intro q _ |
| 52 | + simp_rw [toEquiv_symm, coe_symm_toEquiv, coe_primesOverOrderIsoFiber_symm_apply] |
| 53 | + set r := q.1.comap Algebra.TensorProduct.includeRight |
| 54 | + let := Localization.AtPrime.algebraOfLiesOver p r |
| 55 | + rw [ramificationIdx'_eq p r, inertiaDeg'_eq p r] |
| 56 | + let Rp := Localization.AtPrime p |
| 57 | + let Sq := Localization.AtPrime q.1 |
| 58 | + let Sr := Localization.AtPrime r |
| 59 | + let κp := p.ResidueField |
| 60 | + let κr := r.ResidueField |
| 61 | + let A := Sr ⧸ p.map (algebraMap R Sr) |
| 62 | + suffices length Sr A * finrank κp κr = finrank κp Sq by simpa using congr_arg ENat.toNat this |
| 63 | + calc length Sr A * finrank κp κr = length Sr A * length κp κr := by rw [length_eq_finrank] |
| 64 | + _ = length Rp A := (length_restrictScalars Rp Sr A).symm |
| 65 | + _ = length Rp Sq := (Fiber.localizationAlgEquivQuotient p q.1).toLinearEquiv.length_eq.symm |
| 66 | + _ = length κp Sq := length_eq_of_surjective residue_surjective |
| 67 | + _ = finrank κp Sq := length_eq_finrank κp Sq |
| 68 | + |
| 69 | +/-- Let `R` be an integral domain, let `S` be a finite flat `R`-algebra, and let `p` be a prime |
| 70 | +ideal of `R`. Then the sum over all prime ideals `q` of `S` lying over `p` of the ramification |
| 71 | +index of `q` times the inertia degree of `q` equals the rank of `S` as an `R`-module. -/ |
| 72 | +theorem sum_ramification_inertia_eq_finrank |
| 73 | + [IsDomain R] [Module.Finite R S] [Module.Flat R S] [Fintype (p.primesOver S)] : |
| 74 | + ∑ q : p.primesOver S, q.1.ramificationIdx' R * q.1.inertiaDeg' R = Module.finrank R S := by |
| 75 | + rw [sum_ramification_inertia_eq_finrank_fiber, finrank_fiber_eq_finrank] |
| 76 | + |
| 77 | +/-- Let `S/R` be a finite flat extension of integral domains, and let `p` be prime ideal of `R`. |
| 78 | +Assume that `R` is the invariant subring of a finite group `G` acting on `S`. Then the sum over |
| 79 | +all prime ideals `q` of `S` lying over `p` of the ramification index of `q` times the inertia |
| 80 | +degree of `q` equals the cardinality of `G`. -/ |
| 81 | +theorem sum_ramification_inertia_eq_card |
| 82 | + [IsDomain R] [IsDomain S] [Module.Finite R S] [Module.Flat R S] [Fintype (p.primesOver S)] |
| 83 | + {G : Type*} [Group G] [MulSemiringAction G S] [IsGaloisGroup G R S] : |
| 84 | + ∑ q : p.primesOver S, q.1.ramificationIdx' R * q.1.inertiaDeg' R = Nat.card G := by |
| 85 | + let := IsGaloisGroup.finite G R S |
| 86 | + rw [sum_ramification_inertia_eq_finrank, IsGaloisGroup.card_eq_finrank' G R S] |
| 87 | + |
| 88 | +end Ideal |
0 commit comments