The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V12. Number theory

Mathlib.NumberTheory.NumberField.ClassNumber

14 declarations and 5 deprecated aliases. Mathlib docs · Source

Class numbers of number fields

This file defines the class number of a number field as the (finite) cardinality of the class group of its ring of integers. It also proves some elementary results on the class number.

Main definitions

  • NumberField.minkowskiNormBound: the Minkowski bound of a number field K, defined as (4 / π) ^ nrComplexPlaces K * ((finrank ℚ K)! / (finrank ℚ K) ^ (finrank ℚ K) * √|discr K|). Every class in the class group of 𝓞 K contains an integral ideal of norm at most this bound. In this file we denote it by M K.
  • NumberField.classNumber: the class number of a number field is the (finite) cardinality of the class group of its ring of integers
  • isPrincipalIdealRing_of_isPrincipal_of_pow_le_of_mem_primesOver_of_mem_Icc: let K be a number field. To show that 𝓞 K is a PID it is enough to show that, for all (natural) primes p ∈ Finset.Icc 1 ⌊(M K)⌋₊, all ideals P above p such that p ^ (span ({p}).inertiaDeg P) ≤ ⌊(M K)⌋₊ are principal. This is the standard technique to prove that 𝓞 K is principal, see [marcus1977number], discussion after Theorem 37. The way this theorem should be used is to first compute ⌊(M K)⌋₊ and then to use fin_cases to deal with the finite number of primes p in the interval.
  • isPrincipalIdealRing_of_isPrincipal_of_lt_or_isPrincipal_of_mem_primesOver_of_mem_Icc: let K be a number field such that K/ℚ is Galois. To show that 𝓞 K is a PID it is enough to show that, for all (natural) primes p ∈ Finset.Icc 1 ⌊(M K)⌋₊, there is an ideal P above p such that either ⌊(M K)⌋₊ < p ^ (span ({p}).inertiaDeg P) or P is principal. This is the standard technique to prove that 𝓞 K is principal in the Galois case, see [marcus1977number], discussion after Theorem 37. The way this theorem should be used is to first compute ⌊(M K)⌋₊ and then to use fin_cases to deal with the finite number of primes p in the interval.

theorem NumberField.minkowskiNormBound.congr_simp E1 #

∀ (K : Type u_1) [inst : Field K] [inst_1 : NumberField K],
  NumberField.minkowskiNormBound K = NumberField.minkowskiNormBound K

def NumberField.minkowskiNormBound E3 #

(K : Type u_1) → [inst : Field K] → [NumberField K] → ℝ

The Minkowski bound of a number field K, i.e. the real number (4 / π) ^ r₂ * (n ! / n ^ n * √|discr K|), where n is the degree of K over ℚ and r₂ is the number of complex places of K. Every class in the class group of 𝓞 K contains an integral ideal of norm at most minkowskiNormBound K, see NumberField.exists_ideal_in_class_of_norm_le.

This should not be confused with NumberField.mixedEmbedding.minkowskiBound, the bound that appears in Minkowski's convex body theorem.

instance NumberField.RingOfIntegers.instFintypeClassGroup E3 #

(K : Type u_1) → [inst : Field K] → [NumberField K] → Fintype (ClassGroup (NumberField.RingOfIntegers K))

def NumberField.classNumber E3 #

(K : Type u_1) → [inst : Field K] → [NumberField K] → ℕ

The class number of a number field is the (finite) cardinality of the class group.

theorem NumberField.classNumber_ne_zero E1 #

∀ (K : Type u_1) [inst : Field K] [inst_1 : NumberField K], NumberField.classNumber K ≠ 0

theorem NumberField.classNumber_pos E1 #

∀ (K : Type u_1) [inst : Field K] [inst_1 : NumberField K], 0 < NumberField.classNumber K

theorem NumberField.classNumber_eq_one_iff E0 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K],
  NumberField.classNumber K = 1 ↔ IsPrincipalIdealRing (NumberField.RingOfIntegers K)

The class number of a number field is 1 iff the ring of integers is a PID.

theorem NumberField.exists_ideal_in_class_of_norm_le E1 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K] (C : ClassGroup (NumberField.RingOfIntegers K)),
  ∃ I, ClassGroup.mk0 I = C ∧ ↑(Ideal.absNorm ↑I) ≤ NumberField.minkowskiNormBound K

theorem NumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_norm_le E1 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K],
  (∀ ⦃I : ↥(nonZeroDivisors (Ideal (NumberField.RingOfIntegers K)))⦄,
      ↑(Ideal.absNorm ↑I) ≤ NumberField.minkowskiNormBound K → Submodule.IsPrincipal ↑I) →
    IsPrincipalIdealRing (NumberField.RingOfIntegers K)

theorem NumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_norm_le_of_isPrime E1 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K],
  (∀ ⦃I : ↥(nonZeroDivisors (Ideal (NumberField.RingOfIntegers K)))⦄,
      (↑I).IsPrime → ↑(Ideal.absNorm ↑I) ≤ NumberField.minkowskiNormBound K → Submodule.IsPrincipal ↑I) →
    IsPrincipalIdealRing (NumberField.RingOfIntegers K)

theorem NumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_pow_le_of_mem_primesOver_of_mem_Icc E3 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K],
  (∀ p ∈ Finset.Icc 1 ⌊NumberField.minkowskiNormBound K⌋₊,
      Nat.Prime p →
        ∀ P ∈ (Ideal.span {↑p}).primesOver (NumberField.RingOfIntegers K),
          p ^ P.inertiaDeg ℤ ≤ ⌊NumberField.minkowskiNormBound K⌋₊ → Submodule.IsPrincipal P) →
    IsPrincipalIdealRing (NumberField.RingOfIntegers K)

Let K be a number field and let M K be the Minkowski bound of K. To show that 𝓞 K is a PID it is enough to show that, for all (natural) primes p ∈ Finset.Icc 1 ⌊(M K)⌋₊, all ideals P above p such that p ^ (span ({p}).inertiaDeg P) ≤ ⌊(M K)⌋₊ are principal. This is the standard technique to prove that 𝓞 K is principal, see [marcus1977number], discussion after Theorem 37. If K/ℚ is Galois, one can use the more convenient isPrincipalIdealRing_of_isPrincipal_of_lt_or_isPrincipal_of_mem_primesOver_of_mem_Icc.

The way this theorem should be used is to first compute ⌊(M K)⌋₊ and then to use fin_cases to deal with the finite number of primes p in the interval.

theorem NumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_lt_or_isPrincipal_of_mem_primesOver_of_mem_Icc E3 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K] [IsGalois ℚ K],
  (∀ p ∈ Finset.Icc 1 ⌊NumberField.minkowskiNormBound K⌋₊,
      Nat.Prime p →
        ∃ P ∈ (Ideal.span {↑p}).primesOver (NumberField.RingOfIntegers K),
          ⌊NumberField.minkowskiNormBound K⌋₊ < p ^ P.inertiaDeg ℤ ∨ Submodule.IsPrincipal P) →
    IsPrincipalIdealRing (NumberField.RingOfIntegers K)

Let K be a number field such that K/ℚ is Galois and let M K be the Minkowski bound of K. To show that 𝓞 K is a PID it is enough to show that, for all (natural) primes p ∈ Finset.Icc 1 ⌊(M K)⌋₊, there is an ideal P above p such that either ⌊(M K)⌋₊ < p ^ (span ({p}).inertiaDeg P) or P is principal. This is the standard technique to prove that 𝓞 K is principal in the Galois case, see [marcus1977number], discussion after Theorem 37.

The way this theorem should be used is to first compute ⌊(M K)⌋₊ and then to use fin_cases to deal with the finite number of primes p in the interval.

theorem NumberField.RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt E1 #

∀ {K : Type u_1} [inst : Field K] [inst_1 : NumberField K],
  ↑|NumberField.discr K| <
      (2 * (Real.pi / 4) ^ NumberField.InfinitePlace.nrComplexPlaces K *
          (↑(Module.finrank ℚ K) ^ Module.finrank ℚ K / ↑(Module.finrank ℚ K).factorial)) ^
        2 →
    IsPrincipalIdealRing (NumberField.RingOfIntegers K)

theorem Rat.classNumber_eq E0 #

NumberField.classNumber ℚ = 1

Deprecated aliases

NameNew nameSince
RingOfIntegers.isPrincipalIdealRing_of_abs_discr_ltNumberField.RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt2026-11-08
RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_lt_or_isPrincipal_of_mem_primesOver_of_mem_IccNumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_lt_or_isPrincipal_of_mem_primesOver_of_mem_Icc2026-11-08
RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_norm_leNumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_norm_le2026-11-08
RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_norm_le_of_isPrimeNumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_norm_le_of_isPrime2026-11-08
RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_pow_le_of_mem_primesOver_of_mem_IccNumberField.RingOfIntegers.isPrincipalIdealRing_of_isPrincipal_of_pow_le_of_mem_primesOver_of_mem_Icc2026-11-08