mathlib documentation


Number fields #

This file defines a number field, the ring of integers corresponding to it and includes some basic facts about the embeddings into an algebraic closed field.

Main definitions #

Main Result #

Implementation notes #

The definitions that involve a field of fractions choose a canonical field of fractions, but are independent of that choice.

References #

Tags #

number field, ring of integers

structure number_field (K : Type u_1) [field K] :

A number field is a field which has characteristic zero and is finite dimensional over ℚ.

Instances of this typeclass

with its usual ring structure is not a field.

theorem number_field.is_algebraic (K : Type u_1) [field K] [nf : number_field K] :
def number_field.ring_of_integers (K : Type u_1) [field K] :

The ring of integers (or number ring) corresponding to a number field is the integral closure of ℤ in the number field.

Instances for number_field.ring_of_integers

Given an algebra between two fields, create an algebra between their two rings of integers.

For now, this is not an instance by default as it creates an equal-but-not-defeq diamond with when K = L. This is caused by x = ⟨x, x.prop⟩ not being defeq on subtypes. This will likely change in Lean 4.

noncomputable def number_field.ring_of_integers.equiv {K : Type u_1} [field K] (R : Type u_2) [comm_ring R] [algebra R K] [is_integral_closure R K] :

The ring of integers of K are equivalent to any integral closure of in K


The ring of integers of a number field is not a field.

@[protected, instance]

The ring of integers of as a number field is just .

@[protected, instance]

The quotient of ℚ[X] by the ideal generated by an irreducible polynomial of ℚ[X] is a number field.

@[protected, instance]
noncomputable def number_field.embeddings.ring_hom.fintype {K : Type u_1} [field K] [number_field K] {A : Type u_3} [field A] [char_zero A] :

There are finitely many embeddings of a number field.

theorem number_field.embeddings.card {K : Type u_1} [field K] [number_field K] {A : Type u_3} [field A] [char_zero A] [is_alg_closed A] :

The number of embeddings of a number field is its finrank.

theorem number_field.embeddings.eq_roots {K : Type u_1} [field K] [number_field K] (x : K) {A : Type u_3} [field A] [char_zero A] [is_alg_closed A] :
set.range (λ (φ : K →+* A), φ x) = (minpoly x).root_set A

For x ∈ K, with K a number field, the images of x by the embeddings of K are exactly the roots of the minimal polynomial of x over