# mathlibdocumentation

number_theory.ramification_inertia

# Ramification index and inertia degree #

Given P : ideal S lying over p : ideal R for the ring extension f : R →+* S (assuming P and p are prime or maximal where needed), the ramification index ideal.ramification_idx f p P is the multiplicity of P in map f p, and the inertia degree ideal.inertia_deg f p P is the degree of the field extension (S / P) : (R / p).

## Main results #

The main theorem ideal.sum_ramification_inertia states that for all coprime P lying over p, Σ P, ramification_idx f p P * inertia_deg f p P equals the degree of the field extension Frac(S) : Frac(R).

## Implementation notes #

Often the above theory is set up in the case where:

• R is the ring of integers of a number field K,
• L is a finite separable extension of K,
• S is the integral closure of R in L,
• p and P are maximal ideals,
• P is an ideal lying over p We will try to relax the above hypotheses as much as possible.

## Notation #

In this file, e stands for the ramification index and f for the inertia degree of P over p, leaving p and P implicit.

noncomputable def ideal.ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) :

The ramification index of P over p is the largest exponent n such that p is contained in P^n.

In particular, if p is not contained in P^n, then the ramification index is 0.

If there is no largest such n (e.g. because p = ⊥), then ramification_idx is defined to be 0.

Equations
Instances for ideal.ramification_idx
theorem ideal.ramification_idx_eq_find {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} (h : ∃ (n : ), ∀ (k : ), p P ^ kk n) :
=
theorem ideal.ramification_idx_eq_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} (h : ∀ (n : ), ∃ (k : ), p P ^ k n < k) :
= 0
theorem ideal.ramification_idx_spec {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} {n : } (hle : p P ^ n) (hgt : ¬ p P ^ (n + 1)) :
= n
theorem ideal.ramification_idx_lt {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} {n : } (hgt : ¬ p P ^ n) :
< n
@[simp]
theorem ideal.ramification_idx_bot {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {P : ideal S} :
= 0
@[simp]
theorem ideal.ramification_idx_of_not_le {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} (h : ¬ p P) :
= 0
theorem ideal.ramification_idx_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} {e : } (he : e 0) (hle : p P ^ e) (hnle : ¬ p P ^ (e + 1)) :
0
theorem ideal.le_pow_of_le_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} {n : } (hn : n ) :
p P ^ n
theorem ideal.le_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} :
p P ^
theorem ideal.le_comap_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} :
p (P ^ P)
theorem ideal.le_comap_of_ramification_idx_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} (h : 0) :
p P
theorem ideal.is_dedekind_domain.ramification_idx_eq_normalized_factors_count {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} [is_domain S] (hp0 : p ) (hP : P.is_prime) (hP0 : P ) :
theorem ideal.is_dedekind_domain.ramification_idx_eq_factors_count {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} [is_domain S] (hp0 : p ) (hP : P.is_prime) (hP0 : P ) :
theorem ideal.is_dedekind_domain.ramification_idx_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] {f : R →+* S} {p : ideal R} {P : ideal S} [is_domain S] (hp0 : p ) (hP : P.is_prime) (le : p P) :
0
noncomputable def ideal.inertia_deg {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hp : p.is_maximal] :

The inertia degree of P : ideal S lying over p : ideal R is the degree of the extension (S / P) : (R / p).

We do not assume P lies over p in the definition; we return 0 instead.

See inertia_deg_algebra_map for the common case where f = algebra_map R S and there is an algebra structure R / p → S / P.

Equations
• P = dite P = p) (λ (hPp : P = p), (S P)) (λ (hPp : ¬ P = p), 0)
@[simp]
theorem ideal.inertia_deg_of_subsingleton {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hp : p.is_maximal] [hQ : subsingleton (S P)] :
P = 0
@[simp]
theorem ideal.inertia_deg_algebra_map {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) (P : ideal S) [ S] [algebra (R p) (S P)] [ (R p) (S P)] [hp : p.is_maximal] :
p P = (S P)
theorem ideal.finrank_quotient_map.linear_independent_of_nontrivial {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] [ S] (K : Type u_1) [field K] [ K] [hRK : K] {V : Type u_3} {V' : Type u_4} {V'' : Type u_5} [ V] [ V] [ V] [add_comm_group V'] [ V'] [ V'] [ V'] [add_comm_group V''] [ V''] [is_domain R] (hRS : ring_hom.ker S) ) (f : V'' →ₗ[R] V) (hf : function.injective f) (f' : V'' →ₗ[R] V') {ι : Type u_2} {b : ι → V''} (hb' : (f' b)) :
(f b)

Let V be a vector space over K = Frac(R), S / R a ring extension and V' a module over S. If b, in the intersection V'' of V and V', is linear independent over S in V', then it is linear independent over R in V.

The statement we prove is actually slightly more general:

• it suffices that the inclusion algebra_map R S : R → S is nontrivial
• the function f' : V'' → V' doesn't need to be injective
theorem ideal.finrank_quotient_map.span_eq_top {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [ S] {K : Type u_1} [field K] [ K] {L : Type u_2} [field L] [ L] [ L] [is_domain R] [is_domain S] [ L] [ S] [ L] [ L] [ L] [ L] (hp : p ) (b : set S) (hb' : (ideal.map S) p) = ) :
( L) '' b) =

If b mod p spans S/p as R/p-space, then b itself spans Frac(S) as K-space.

Here,

• p is an ideal of R such that R / p is nontrivial
• K is a field that has an embedding of R (in particular we can take K = Frac(R))
• L is a field extension of K
• S is the integral closure of R in L

More precisely, we avoid quotients in this statement and instead require that b ∪ pS spans S.

theorem ideal.finrank_quotient_map {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [ S] (K : Type u_1) [field K] [ K] [hRK : K] (L : Type u_2) [field L] [ L] [ L] [is_domain R] [is_domain S] [ L] [ L] [ L] [ L] [ L] [hp : p.is_maximal] [ S] :
(S ideal.map S) p) =

If p is a maximal ideal of R, and S is the integral closure of R in L, then the dimension [S/pS : R/p] is equal to [Frac(S) : Frac(R)].

@[protected, instance]
noncomputable def ideal.quotient.algebra_quotient_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) :
algebra (R p) (S P ^ P)

R / p has a canonical map to S / (P ^ e), where e is the ramification index of P over p.

Equations
@[simp]
theorem ideal.quotient.algebra_map_quotient_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) (x : R) :
(algebra_map (R p) (S P ^ P)) ( x) = (ideal.quotient.mk (P ^ P)) (f x)
def ideal.quotient.algebra_quotient_of_ramification_idx_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] :
algebra (R p) (S P)

If P lies over p, then R / p has a canonical map to S / P.

This can't be an instance since the map f : R → S is generally not inferrable.

Equations
@[simp]
theorem ideal.quotient.algebra_map_quotient_of_ramification_idx_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] (x : R) :
(algebra_map (R p) (S P)) ( x) = (f x)
def ideal.pow_quot_succ_inclusion {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) (i : ) :

The inclusion (P^(i + 1) / P^e) ⊂ (P^i / P^e).

Equations
@[simp]
theorem ideal.pow_quot_succ_inclusion_apply_coe {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) (i : ) (x : (ideal.map (ideal.quotient.mk (P ^ P)) (P ^ (i + 1)))) :
( i) x) = x
theorem ideal.pow_quot_succ_inclusion_injective {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) (i : ) :
noncomputable def ideal.quotient_to_quotient_range_pow_quot_succ_aux {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) {i : } {a : S} (a_mem : a P ^ i) :
S P(ideal.map (ideal.quotient.mk (P ^ P)) (P ^ i))

S ⧸ P embeds into the quotient by P^(i+1) ⧸ P^e as a subspace of P^i ⧸ P^e. See quotient_to_quotient_range_pow_quot_succ for this as a linear map, and quotient_range_pow_quot_succ_inclusion_equiv for this as a linear equivalence.

Equations
theorem ideal.quotient_to_quotient_range_pow_quot_succ_aux_mk {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) {i : } {a : S} (a_mem : a P ^ i) (x : S) :
noncomputable def ideal.quotient_to_quotient_range_pow_quot_succ {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] {i : } {a : S} (a_mem : a P ^ i) :

S ⧸ P embeds into the quotient by P^(i+1) ⧸ P^e as a subspace of P^i ⧸ P^e.

Equations
theorem ideal.quotient_to_quotient_range_pow_quot_succ_mk {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] {i : } {a : S} (a_mem : a P ^ i) (x : S) :
theorem ideal.quotient_to_quotient_range_pow_quot_succ_injective {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] [is_domain S] [P.is_prime] {i : } (hi : i < ) {a : S} (a_mem : a P ^ i) (a_not_mem : a P ^ (i + 1)) :
theorem ideal.quotient_to_quotient_range_pow_quot_succ_surjective {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] [is_domain S] (hP0 : P ) [hP : P.is_prime] {i : } (hi : i < ) {a : S} (a_mem : a P ^ i) (a_not_mem : a P ^ (i + 1)) :
noncomputable def ideal.quotient_range_pow_quot_succ_inclusion_equiv {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] [is_domain S] [P.is_prime] (hP : P ) {i : } (hi : i < ) :

Quotienting P^i / P^e by its subspace P^(i+1) ⧸ P^e is R ⧸ p-linearly isomorphic to S ⧸ P.

Equations
theorem ideal.dim_pow_quot_aux {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] [is_domain S] [p.is_maximal] [P.is_prime] (hP0 : P ) {i : } (hi : i < ) :
module.rank (R p) (ideal.map (ideal.quotient.mk (P ^ P)) (P ^ i)) = module.rank (R p) (S P) + module.rank (R p) (ideal.map (ideal.quotient.mk (P ^ P)) (P ^ (i + 1)))

Since the inclusion (P^(i + 1) / P^e) ⊂ (P^i / P^e) has a kernel isomorphic to P / S, [P^i / P^e : R / p] = [P^(i+1) / P^e : R / p] + [P / S : R / p]

theorem ideal.dim_pow_quot {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [hfp : ne_zero P)] [is_domain S] [p.is_maximal] [P.is_prime] (hP0 : P ) (i : ) (hi : i ) :
module.rank (R p) (ideal.map (ideal.quotient.mk (P ^ P)) (P ^ i)) = P - i) module.rank (R p) (S P)
theorem ideal.dim_prime_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [is_domain S] [p.is_maximal] [P.is_prime] (hP0 : P ) (he : 0) :
module.rank (R p) (S P ^ P) = module.rank (R p) (S P)

If p is a maximal ideal of R, S extends R and P^e lies over p, then the dimension [S/(P^e) : R/p] is equal to e * [S/P : R/p].

theorem ideal.finrank_prime_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (f : R →+* S) (p : ideal R) (P : ideal S) [is_domain S] (hP0 : P ) [p.is_maximal] [P.is_prime] (he : 0) :
(S P ^ P) = * (S P)

If p is a maximal ideal of R, S extends R and P^e lies over p, then the dimension [S/(P^e) : R/p], as a natural number, is equal to e * [S/P : R/p].

## Properties of the factors of p.map (algebra_map R S)#

theorem ideal.factors.ne_bot {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] (P : ((unique_factorization_monoid.factors (ideal.map S) p)).to_finset)) :
@[protected, instance]
def ideal.factors.is_prime {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] (P : ((unique_factorization_monoid.factors (ideal.map S) p)).to_finset)) :
theorem ideal.factors.ramification_idx_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] (P : ((unique_factorization_monoid.factors (ideal.map S) p)).to_finset)) :
P 0
@[protected, instance]
@[protected, instance]
def ideal.factors.is_scalar_tower {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] (P : ((unique_factorization_monoid.factors (ideal.map S) p)).to_finset)) :
(R p) (S P)
theorem ideal.factors.finrank_pow_ramification_idx {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] [p.is_maximal] (P : ((unique_factorization_monoid.factors (ideal.map S) p)).to_finset)) :
(S P ^ P) = P * p P
@[protected, instance]
theorem ideal.factors.inertia_deg_ne_zero {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] [ S] [p.is_maximal] (P : ((unique_factorization_monoid.factors (ideal.map S) p)).to_finset)) :
p P 0
@[protected, instance]
noncomputable def ideal.factors.pi_quotient_equiv {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] [is_domain S] [ S] (p : ideal R) (hp : ideal.map S) p ) :

Chinese remainder theorem for a ring of integers: if the prime ideal p : ideal R factors in S as ∏ i, P i ^ e i, then S ⧸ I factors as Π i, R ⧸ (P i ^ e i).

Equations
@[simp]
theorem ideal.factors.pi_quotient_equiv_mk {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] [is_domain S] [ S] (p : ideal R) (hp : ideal.map S) p ) (x : S) :
@[simp]
theorem ideal.factors.pi_quotient_equiv_map {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] [is_domain S] [ S] (p : ideal R) (hp : ideal.map S) p ) (x : R) :
noncomputable def ideal.factors.pi_quotient_linear_equiv {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] [is_domain S] [ S] (p : ideal R) (hp : ideal.map S) p ) :

Chinese remainder theorem for a ring of integers: if the prime ideal p : ideal R factors in S as ∏ i, P i ^ e i, then S ⧸ I factors R ⧸ I-linearly as Π i, R ⧸ (P i ^ e i).

Equations
theorem ideal.sum_ramification_inertia {R : Type u} [comm_ring R] {S : Type v} [comm_ring S] (p : ideal R) [is_domain S] [ S] (K : Type u_1) (L : Type u_2) [field K] [field L] [is_domain R] [ K] [ K] [ L] [ L] [ L] [ L] [ L] [ L] [ S] [ L] [p.is_maximal] (hp0 : p ) :
(λ (P : ideal S), P * p P) =

The fundamental identity of ramification index e and inertia degree f: for P ranging over the primes lying over p, ∑ P, e P * f P = [Frac(S) : Frac(R)]; here S is a finite R-module (and thus Frac(S) : Frac(R) is a finite extension) and p is maximal.