Skip to content

Commit 083698b

Browse files
tb65536xroblot
authored andcommitted
feat(RingTheory/RamificationInertia/Basic): ramification-inertia formula for finite flat extensions (leanprover-community#39189)
This PR proves the ramification-inertia formula for finite flat extensions. Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
1 parent 413b8b1 commit 083698b

3 files changed

Lines changed: 105 additions & 0 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6896,6 +6896,7 @@ public import Mathlib.RingTheory.QuotSMulTop
68966896
public import Mathlib.RingTheory.Radical
68976897
public import Mathlib.RingTheory.Radical.Basic
68986898
public import Mathlib.RingTheory.Radical.NatInt
6899+
public import Mathlib.RingTheory.RamificationInertia.Basic
68996900
public import Mathlib.RingTheory.RamificationInertia.Inertia
69006901
public import Mathlib.RingTheory.RamificationInertia.Ramification
69016902
public import Mathlib.RingTheory.ReesAlgebra

Mathlib/FieldTheory/Galois/IsGaloisGroup.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ instance of_isGalois [IsGalois K L] : IsGaloisGroup Gal(L/K) K L where
281281
commutes := inferInstance
282282
isInvariant := ⟨fun x ↦ (InfiniteGalois.mem_bot_iff_fixed x).mpr⟩
283283

284+
/-- The cardinality of a Galois group equals the degree of the field extension.
285+
286+
See `IsGaloisGroup.card_eq_finrank'` for a ring-theoretic generalization assuming finiteness. -/
284287
theorem card_eq_finrank [IsGaloisGroup G K L] : Nat.card G = Module.finrank K L := by
285288
rcases fintypeOrInfinite G with _ | hG
286289
· have : FaithfulSMul G L := faithful K
@@ -305,6 +308,19 @@ protected theorem finite (A B : Type*) [CommRing A] [CommRing B] [Algebra A B] [
305308
rw [card_eq_finrank G (FractionRing A) (FractionRing B)]
306309
exact Module.finrank_pos.ne'
307310

311+
/-- The cardinality of a Galois group of `B/A` equals the rank of `B` as an `A`-module.
312+
313+
See `IsGaloisGroup.card_eq_finrank` a field-theoretic version that does not assume finiteness. -/
314+
theorem card_eq_finrank' (A B : Type*) [CommRing A] [CommRing B] [Algebra A B] [Finite G]
315+
[IsDomain B] [FaithfulSMul A B] [MulSemiringAction G B] [IsGaloisGroup G A B] :
316+
Nat.card G = Module.finrank A B := by
317+
have := IsDomain.of_faithfulSMul A B
318+
let := FractionRing.liftAlgebra A (FractionRing B)
319+
let := IsFractionRing.mulSemiringAction G A B (FractionRing A) (FractionRing B)
320+
have : Algebra.IsIntegral A B := IsGaloisGroup.isInvariant.isIntegral A B G
321+
rw [(IsGaloisGroup.toFractionRing G A B).card_eq_finrank,
322+
Algebra.IsAlgebraic.finrank_of_isFractionRing A (FractionRing A) B (FractionRing B)]
323+
308324
/-- If `G` is a finite Galois group for `L/K`, then `G` is isomorphic to `Gal(L/K)`. -/
309325
@[simps!] noncomputable def mulEquivAlgEquiv [IsGaloisGroup G K L] [Finite G] : G ≃* Gal(L/K) :=
310326
MulEquiv.ofBijective (MulSemiringAction.toAlgAut G K L) (by
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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

Comments
 (0)