Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chebotarëv density theorem: densities, Frobenius substitutions, cycle patterns, decomposition types

Definition
ChebotarevDensity_Defs

by LG · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraic-number-theorynumber-theory

Shared definitions for the statements of Chebotarëv's, Frobenius's and Dirichlet's density theorems over Q\mathbb QQ, following Stevenhagen–Lenstra (1996).

  1. Analytic density. A set SSS of natural numbers has analytic (Dirichlet) density δ\deltaδ if
lim⁡s→1+∑p∈S, p primep−slog⁡1s−1=δ.\lim_{s\to1^+}\frac{\sum_{p\in S,\ p\text{ prime}}p^{-s}}{\log\frac{1}{s-1}}=\delta .s→1+lim​logs−11​∑p∈S, p prime​p−s​=δ.
  1. Natural density. SSS has natural density δ\deltaδ among the primes if #{p≤x:p∈S prime}/#{p≤x:p prime}→δ\#\{p\le x: p\in S\text{ prime}\}/\#\{p\le x: p\text{ prime}\}\to\delta#{p≤x:p∈S prime}/#{p≤x:p prime}→δ as x→∞x\to\inftyx→∞.
  2. For f∈Z[X]f\in\mathbb Z[X]f∈Z[X]: its splitting field KKK over Q\mathbb QQ (a number field) and Galois group G=Gal(K/Q)G=\mathrm{Gal}(K/\mathbb Q)G=Gal(K/Q).
  3. Frobenius substitution. σ∈G\sigma\in Gσ∈G is a Frobenius substitution of the prime ppp if there is a prime ideal Q∋p\mathfrak Q\ni pQ∋p of the ring of integers OK\mathcal O_KOK​ with σ(x)≡xp(modQ)\sigma(x)\equiv x^p\pmod{\mathfrak Q}σ(x)≡xp(modQ) for all x∈OKx\in\mathcal O_Kx∈OK​.
  4. Chebotarëv set. For a conjugacy class CCC of GGG: the set of primes ppp with p∤Δ(f)p\nmid\Delta(f)p∤Δ(f) having some Frobenius substitution in CCC.
  5. Cycle pattern of σ∈G\sigma\in Gσ∈G: the multiset of cycle lengths (fixed points included) of the permutation of the complex zeros of fff induced by σ\sigmaσ.
  6. Decomposition type of fff modulo a prime ppp: the multiset of degrees of the monic irreducible factors of f mod pf \bmod pfmodp in Fp[X]\mathbb F_p[X]Fp​[X], with multiplicity; and the set of primes p∤Δ(f)p\nmid\Delta(f)p∤Δ(f) with a given decomposition type.
  7. Frobenius cycle pattern of g∈Fp[X]g\in\mathbb F_p[X]g∈Fp​[X]: the cycle pattern of x↦xpx\mapsto x^px↦xp acting on the zeros of ggg in its splitting field.

Formalization Note The discriminant is Mathlib's Polynomial.discr; the Frobenius condition uses Mathlib's IsArithFrobAt; cycle patterns use Equiv.Perm.partition. The file also registers the instance that the splitting field of a rational polynomial is a number field.

Definition code
import Mathlib

open Polynomial NumberField

namespace ChebotarevDensity

/-- The splitting field of a rational polynomial is a number field. -/
noncomputable instance splittingField_numberField (g : ℚ[X]) : NumberField g.SplittingField := {}

/-- Analytic (Dirichlet) density: a set `S` of natural numbers has density `δ` if
`(∑_{p ∈ S prime} p^{-s}) / log (1 / (s - 1)) → δ` as `s → 1⁺`. -/
def HasDirichletDensity (S : Set ℕ) (δ : ℝ) : Prop :=
  Filter.Tendsto
    (fun s : ℝ =>
      (∑' p : {p : ℕ // p.Prime ∧ p ∈ S}, ((p : ℕ) : ℝ) ^ (-s)) / Real.log (1 / (s - 1)))
    (nhdsWithin 1 (Set.Ioi 1)) (nhds δ)

open scoped Classical in
/-- Natural density among the primes: `#{p ≤ x : p ∈ S prime} / #{p ≤ x : p prime} → δ`. -/
def HasNaturalDensity (S : Set ℕ) (δ : ℝ) : Prop :=
  Filter.Tendsto
    (fun x : ℕ =>
      ((Finset.Iic x).filter (fun p => p.Prime ∧ p ∈ S)).card /
        (((Finset.Iic x).filter Nat.Prime).card : ℝ))
    Filter.atTop (nhds δ)

/-- An integer polynomial viewed as a rational polynomial. -/
noncomputable abbrev ratPoly (f : ℤ[X]) : ℚ[X] := f.map (Int.castRingHom ℚ)

/-- The splitting field `K = ℚ(α₁, …, αₙ)` of an integer polynomial `f`. -/
abbrev SplitField (f : ℤ[X]) : Type := (ratPoly f).SplittingField

/-- The Galois group `G = Gal(K/ℚ)` of an integer polynomial `f`. -/
abbrev GalGroup (f : ℤ[X]) : Type := (ratPoly f).Gal

/-- `σ ∈ G` is a Frobenius substitution of the prime `p`: there is a prime ideal `Q` of the
ring of integers of `K` containing `p` such that `σ x ≡ x ^ p (mod Q)` for every algebraic
integer `x` of `K`. -/
def IsFrobeniusAt (f : ℤ[X]) (p : ℕ) (σ : GalGroup f) : Prop :=
  ∃ Q : Ideal (𝓞 (SplitField f)), Q.IsPrime ∧ (p : 𝓞 (SplitField f)) ∈ Q ∧ IsArithFrobAt ℤ σ Q

/-- The set of primes `p ∤ Δ(f)` whose Frobenius substitution lies in the conjugacy class `C`. -/
def chebotarevSet (f : ℤ[X]) (C : ConjClasses (GalGroup f)) : Set ℕ :=
  {p | p.Prime ∧ ¬ (p : ℤ) ∣ f.discr ∧ ∃ σ ∈ C.carrier, IsFrobeniusAt f p σ}

open scoped Classical in
/-- The cycle pattern of `σ ∈ G`: the multiset of lengths of the cycles (including cycles of
length `1`) of the permutation induced by `σ` on the complex zeros of `f`. -/
noncomputable def cyclePattern (f : ℤ[X]) (σ : GalGroup f) : Multiset ℕ :=
  haveI : Fact ((ratPoly f).map (algebraMap ℚ ℂ)).Splits := ⟨IsAlgClosed.splits _⟩
  (Gal.galActionHom (ratPoly f) ℂ σ).partition.parts

/-- The decomposition type of `f` modulo the prime `p`: the multiset of degrees of the monic
irreducible factors of `f mod p` over `𝔽_p` (counted with multiplicity). -/
noncomputable def decompositionType (f : ℤ[X]) (p : ℕ) [Fact p.Prime] : Multiset ℕ :=
  (UniqueFactorizationMonoid.normalizedFactors (f.map (Int.castRingHom (ZMod p)))).map natDegree

/-- The set of primes `p ∤ Δ(f)` for which `f mod p` has decomposition type `t`. -/
def decompositionTypeSet (f : ℤ[X]) (t : Multiset ℕ) : Set ℕ :=
  {p | ∃ hp : p.Prime, ¬ (p : ℤ) ∣ f.discr ∧
    (haveI : Fact p.Prime := ⟨hp⟩; decompositionType f p) = t}

open scoped Classical in
/-- The cycle pattern of the Frobenius automorphism `x ↦ x ^ p`, acting on the zeros of a
polynomial `g` over `𝔽_p` in its splitting field. -/
noncomputable def frobeniusCyclePattern (p : ℕ) [Fact p.Prime] (g : (ZMod p)[X]) :
    Multiset ℕ :=
  haveI : Fact (g.map (algebraMap (ZMod p) g.SplittingField)).Splits :=
    ⟨SplittingField.splits g⟩
  (Gal.galActionHom g g.SplittingField
    (FiniteField.frobeniusAlgEquivOfAlgebraic (ZMod p) g.SplittingField)).partition.parts

end ChebotarevDensity
Source
P. Stevenhagen and H. W. Lenstra, Jr., "Chebotarëv and his density theorem", The Mathematical Intelligencer 18 (1996), no. 2, 26–37, https://doi.org/10.1007/BF03027290, pp. 30–34 (definitions of density, decomposition type, cycle pattern, Frobenius substitution)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) - non-blind, same agent that drafted the statements

Non-blind read-back. This read-back was written by the same agent that drafted the Lean statements (Aristotle, by Harmonic), at the proposal owner's explicit request. It is not independent testimony: the author knew the intended meaning when writing it. Reviewers should compare it against the Lean code themselves rather than rely on it as a blind audit.

The file declares, in namespace ChebotarevDensity:

  1. An instance: for every g∈Q[X]g\in\mathbb Q[X]g∈Q[X], the splitting field of ggg is a number field.
  2. HasDirichletDensity(S,δ)\mathrm{HasDirichletDensity}(S,\delta)HasDirichletDensity(S,δ) for S⊆NS\subseteq\mathbb NS⊆N, δ∈R\delta\in\mathbb Rδ∈R: the real function
s↦∑p∈S, p primep−slog⁡(1/(s−1))s\mapsto\frac{\sum_{p\in S,\ p\text{ prime}} p^{-s}}{\log\big(1/(s-1)\big)}s↦log(1/(s−1))∑p∈S, p prime​p−s​

tends to δ\deltaδ as s→1s\to1s→1 with s>1s>1s>1. The sum is an unconditional sum over the subtype of primes in SSS (Lean's tsum, which is 000 if the family is not summable; for s>1s>1s>1 it is summable). Non-primes in SSS are ignored. The logarithm is the real logarithm. 3. HasNaturalDensity(S,δ)\mathrm{HasNaturalDensity}(S,\delta)HasNaturalDensity(S,δ): as x→∞x\to\inftyx→∞ through N\mathbb NN, #{p≤x:p prime,p∈S} / #{p≤x:p prime}→δ\#\{p\le x:p\text{ prime},p\in S\}\,/\,\#\{p\le x: p\text{ prime}\}\to\delta#{p≤x:p prime,p∈S}/#{p≤x:p prime}→δ (real division; the denominator is 000 for x<2x<2x<2, where the quotient is 000 by convention, which does not affect the limit). 4. For f∈Z[X]f\in\mathbb Z[X]f∈Z[X]: fQf_{\mathbb Q}fQ​ is the image of fff in Q[X]\mathbb Q[X]Q[X]; KfK_fKf​ is the splitting field of fQf_{\mathbb Q}fQ​ over Q\mathbb QQ; GfG_fGf​ is the group of Q\mathbb QQ-algebra automorphisms of KfK_fKf​. 5. IsFrobeniusAt(f,p,σ)\mathrm{IsFrobeniusAt}(f,p,\sigma)IsFrobeniusAt(f,p,σ) for p∈Np\in\mathbb Np∈N, σ∈Gf\sigma\in G_fσ∈Gf​: there exists an ideal Q\mathfrak QQ of the ring of integers OKf\mathcal O_{K_f}OKf​​ which is prime (in particular proper), contains the image of ppp, and satisfies σ(x)−xq∈Q\sigma(x)-x^{q}\in\mathfrak Qσ(x)−xq∈Q for all x∈OKfx\in\mathcal O_{K_f}x∈OKf​​, where qqq is the cardinality of Z/(Q∩Z)\mathbb Z/(\mathfrak Q\cap\mathbb Z)Z/(Q∩Z) (this equals ppp when ppp is prime; if ppp is not prime, qqq is the prime below Q\mathfrak QQ, or 000 if Q∩Z=0\mathfrak Q\cap\mathbb Z=0Q∩Z=0, which can happen only for p=0p=0p=0). The action of σ\sigmaσ on OKf\mathcal O_{K_f}OKf​​ is the restriction of σ\sigmaσ. 6. chebotarevSet(f,C)\mathrm{chebotarevSet}(f,C)chebotarevSet(f,C) for a conjugacy class CCC of GfG_fGf​: the set of p∈Np\in\mathbb Np∈N such that ppp is prime, ppp does not divide the discriminant Δ(f)∈Z\Delta(f)\in\mathbb ZΔ(f)∈Z (Mathlib's Polynomial.discr, the usual discriminant with the usual sign convention), and some σ∈C\sigma\in Cσ∈C satisfies IsFrobeniusAt(f,p,σ)\mathrm{IsFrobeniusAt}(f,p,\sigma)IsFrobeniusAt(f,p,σ). 7. cyclePattern(f,σ)\mathrm{cyclePattern}(f,\sigma)cyclePattern(f,σ): the multiset of cycle lengths, including cycles of length 111, of the permutation that σ\sigmaσ induces on the set of distinct complex roots of fQf_{\mathbb Q}fQ​ (via the embedding of KfK_fKf​ into C\mathbb CC used by Gal.galActionHom). Repeated roots are counted once, since the root set is a set. 8. decompositionType(f,p)\mathrm{decompositionType}(f,p)decompositionType(f,p) for a prime ppp: the multiset of degrees of the normalized (monic) irreducible factors of f mod pf \bmod pfmodp in Fp[X]\mathbb F_p[X]Fp​[X], counted with multiplicity (empty if f mod pf \bmod pfmodp is a nonzero constant; if f mod p=0f\bmod p=0fmodp=0 the normalized factor multiset is empty by Mathlib convention). 9. decompositionTypeSet(f,t)\mathrm{decompositionTypeSet}(f,t)decompositionTypeSet(f,t) for a multiset ttt of naturals: the set of primes ppp with p∤Δ(f)p\nmid\Delta(f)p∤Δ(f) and decompositionType(f,p)=t\mathrm{decompositionType}(f,p)=tdecompositionType(f,p)=t. 10. frobeniusCyclePattern(p,g)\mathrm{frobeniusCyclePattern}(p,g)frobeniusCyclePattern(p,g) for a prime ppp and g∈Fp[X]g\in\mathbb F_p[X]g∈Fp​[X]: the multiset of cycle lengths (fixed points included) of the permutation of the distinct roots of ggg in its splitting field LLL induced by the automorphism x↦xpx\mapsto x^{p}x↦xp of LLL over Fp\mathbb F_pFp​.

Human review
  • Endorsed by Shuze Chen · Oct 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Oct 1, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me