Documentation

Mathlib.NumberTheory.NumberField.Basic

Number fields #

This file defines a number field and the ring of integers corresponding to it.

Main definitions #

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

class NumberField (K : Type u_1) [Field K] :

A number field is a field which has characteristic zero and is finite dimensional over β„š.

Instances
    theorem Int.not_isField :
    Β¬IsField β„€

    β„€ with its usual ring structure is not a field.

    theorem NumberField.of_module_finite (K : Type u_1) (L : Type u_2) [Field K] [Field L] [NumberField K] [Algebra K L] [Module.Finite K L] :

    A finite extension of a number field is a number field.

    theorem NumberField.of_tower (K : Type u_1) (L : Type u_2) [Field K] [Field L] [NumberField K] [NumberField L] [Algebra K L] (E : Type u_3) [Field E] [Algebra K E] [Algebra E L] [IsScalarTower K E L] :
    def NumberField.RingOfIntegers (K : Type u_1) [Field K] :
    Type u_1

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

    This is defined as its own type, rather than a Subalgebra, for performance reasons: looking for instances of the form SMul (RingOfIntegers _) (RingOfIntegers _) makes much more effective use of the discrimination tree than instances of the form SMul (Subtype _) (Subtype _). The drawback is we have to copy over instances manually.

    Instances For
      def NumberField.termπ“ž :
      Lean.ParserDescr

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

      This is defined as its own type, rather than a Subalgebra, for performance reasons: looking for instances of the form SMul (RingOfIntegers _) (RingOfIntegers _) makes much more effective use of the discrimination tree than instances of the form SMul (Subtype _) (Subtype _). The drawback is we have to copy over instances manually.

      Instances For
        @[implicit_reducible]
        instance NumberField.RingOfIntegers.instAlgebra (K : Type u_1) [Field K] {L : Type u_3} [Ring L] [Algebra K L] :
        @[reducible, inline]

        The canonical coercion from π“ž K to K.

        Instances For
          @[implicit_reducible]
          instance NumberField.RingOfIntegers.instCoeHead {K : Type u_1} [Field K] :
          CoeHead (RingOfIntegers K) K

          This instance has to be CoeHead because we only want to apply it from π“ž K to K.

          theorem NumberField.RingOfIntegers.ext {K : Type u_1} [Field K] {x y : RingOfIntegers K} (h : ↑x = ↑y) :
          x = y
          theorem NumberField.RingOfIntegers.ext_iff {K : Type u_1} [Field K] {x y : RingOfIntegers K} :
          x = y ↔ ↑x = ↑y
          theorem NumberField.RingOfIntegers.eq_iff {K : Type u_1} [Field K] {x y : RingOfIntegers K} :
          ↑x = ↑y ↔ x = y
          @[simp]
          theorem NumberField.RingOfIntegers.map_mk {K : Type u_1} [Field K] (x : K) (hx : x ∈ integralClosure β„€ K) :
          (algebraMap (RingOfIntegers K) K) ⟨x, hx⟩ = x
          theorem NumberField.RingOfIntegers.coe_mk {K : Type u_1} [Field K] {x : K} (hx : x ∈ integralClosure β„€ K) :
          β†‘βŸ¨x, hx⟩ = x
          theorem NumberField.RingOfIntegers.mk_eq_mk {K : Type u_1} [Field K] (x y : K) (hx : x ∈ integralClosure β„€ K) (hy : y ∈ integralClosure β„€ K) :
          ⟨x, hx⟩ = ⟨y, hy⟩ ↔ x = y
          @[simp]
          theorem NumberField.RingOfIntegers.mk_one {K : Type u_1} [Field K] :
          ⟨1, β‹―βŸ© = 1
          @[simp]
          theorem NumberField.RingOfIntegers.mk_zero {K : Type u_1} [Field K] :
          ⟨0, β‹―βŸ© = 0
          @[simp]
          theorem NumberField.RingOfIntegers.mk_add_mk {K : Type u_1} [Field K] (x y : K) (hx : x ∈ integralClosure β„€ K) (hy : y ∈ integralClosure β„€ K) :
          ⟨x, hx⟩ + ⟨y, hy⟩ = ⟨x + y, β‹―βŸ©
          @[simp]
          theorem NumberField.RingOfIntegers.mk_mul_mk {K : Type u_1} [Field K] (x y : K) (hx : x ∈ integralClosure β„€ K) (hy : y ∈ integralClosure β„€ K) :
          ⟨x, hx⟩ * ⟨y, hy⟩ = ⟨x * y, β‹―βŸ©
          @[simp]
          theorem NumberField.RingOfIntegers.mk_sub_mk {K : Type u_1} [Field K] (x y : K) (hx : x ∈ integralClosure β„€ K) (hy : y ∈ integralClosure β„€ K) :
          ⟨x, hx⟩ - ⟨y, hy⟩ = ⟨x - y, β‹―βŸ©
          @[simp]
          theorem NumberField.RingOfIntegers.neg_mk {K : Type u_1} [Field K] (x : K) (hx : x ∈ integralClosure β„€ K) :
          -⟨x, hx⟩ = ⟨-x, β‹―βŸ©

          The ring homomorphism (π“ž K) β†’+* (π“ž L) given by restricting a ring homomorphism f : K β†’+* L to π“ž K.

          Instances For
            @[simp]
            theorem NumberField.RingOfIntegers.mapRingHom_apply {K : Type u_3} {L : Type u_4} [Field K] [Field L] (f : K β†’+* L) (x : RingOfIntegers K) :
            ↑((mapRingHom f) x) = f ↑x

            The ring isomorphism (π“ž K) ≃+* (π“ž L) given by restricting a ring isomorphism e : K ≃+* L to π“ž K.

            Instances For
              @[simp]
              theorem NumberField.RingOfIntegers.mapRingEquiv_apply {K : Type u_3} {L : Type u_4} [Field K] [Field L] (e : K ≃+* L) (x : RingOfIntegers K) :
              ↑((mapRingEquiv e) x) = e ↑x
              @[simp]
              theorem NumberField.RingOfIntegers.mapRingEquiv_symm_apply {K : Type u_3} {L : Type u_4} [Field K] [Field L] (e : K ≃+* L) (x : RingOfIntegers L) :
              ↑((mapRingEquiv e).symm x) = e.symm ↑x
              @[implicit_reducible]

              Given an algebra structure between two fields, this instance creates an algebra structure between their two rings of integers.

              def NumberField.RingOfIntegers.mapAlgHom {k : Type u_3} {K : Type u_4} {L : Type u_5} {F : Type u_6} [Field k] [Field K] [Field L] [Algebra k K] [Algebra k L] [FunLike F K L] [AlgHomClass F k K L] (f : F) :

              The algebra homomorphism (π“ž K) →ₐ[π“ž k] (π“ž L) given by restricting an algebra homomorphism f : K →ₐ[k] L to π“ž K.

              Instances For
                def NumberField.RingOfIntegers.mapAlgEquiv {k : Type u_3} {K : Type u_4} {L : Type u_5} {E : Type u_6} [Field k] [Field K] [Field L] [Algebra k K] [Algebra k L] [EquivLike E K L] [AlgEquivClass E k K L] (e : E) :

                The isomorphism of algebras (π“ž K) ≃ₐ[π“ž k] (π“ž L) given by restricting an isomorphism of algebras e : K ≃ₐ[k] L to π“ž K.

                Instances For
                  theorem NumberField.RingOfIntegers.coe_injective {K : Type u_1} [Field K] :
                  Function.Injective ⇑(algebraMap (RingOfIntegers K) K)

                  The canonical map from π“ž K to K is injective.

                  This is a convenient abbreviation for FaithfulSMul.algebraMap_injective.

                  theorem NumberField.RingOfIntegers.coe_eq_zero_iff {K : Type u_1} [Field K] {x : RingOfIntegers K} :
                  (algebraMap (RingOfIntegers K) K) x = 0 ↔ x = 0

                  The canonical map from π“ž K to K is injective.

                  This is a convenient abbreviation for map_eq_zero_iff applied to FaithfulSMul.algebraMap_injective.

                  theorem NumberField.RingOfIntegers.coe_ne_zero_iff {K : Type u_1} [Field K] {x : RingOfIntegers K} :
                  (algebraMap (RingOfIntegers K) K) x β‰  0 ↔ x β‰  0

                  The canonical map from π“ž K to K is injective.

                  This is a convenient abbreviation for map_ne_zero_iff applied to FaithfulSMul.algebraMap_injective.

                  theorem NumberField.RingOfIntegers.minpoly_coe {K : Type u_1} [Field K] (x : RingOfIntegers K) :
                  minpoly β„€ ↑x = minpoly β„€ x
                  noncomputable def NumberField.RingOfIntegers.equiv {K : Type u_1} [Field K] (R : Type u_3) [CommRing R] [Algebra R K] [IsIntegralClosure R β„€ K] :

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

                  Instances For

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

                    A β„€-basis of the ring of integers of K.

                    Instances For
                      def NumberField.RingOfIntegers.restrict {K : Type u_1} [Field K] {M : Type u_3} (f : M β†’ K) (h : βˆ€ (x : M), IsIntegral β„€ (f x)) (x : M) :

                      Given f : M β†’ K such that βˆ€ x, IsIntegral β„€ (f x), the corresponding function M β†’ π“ž K.

                      Instances For
                        def NumberField.RingOfIntegers.restrict_addMonoidHom {K : Type u_1} [Field K] {M : Type u_3} [AddZeroClass M] (f : M β†’+ K) (h : βˆ€ (x : M), IsIntegral β„€ (f x)) :

                        Given f : M β†’+ K such that βˆ€ x, IsIntegral β„€ (f x), the corresponding function M β†’+ π“ž K.

                        Instances For
                          def NumberField.RingOfIntegers.restrict_monoidHom {K : Type u_1} [Field K] {M : Type u_3} [MulOneClass M] (f : M β†’* K) (h : βˆ€ (x : M), IsIntegral β„€ (f x)) :

                          Given f : M β†’* K such that βˆ€ x, IsIntegral β„€ (f x), the corresponding function M β†’* π“ž K.

                          Instances For

                            The ring of integers of L is isomorphic to any integral closure of π“ž K in L

                            Instances For

                              Any extension between ring of integers is integral.

                              Any extension between ring of integers of number fields is Noetherian.

                              The kernel of the algebraMap between ring of integers is βŠ₯.

                              theorem NumberField.RingOfIntegers.algebraMap.injective (K : Type u_4) (L : Type u_5) [Field K] [Field L] [Algebra K L] :
                              Function.Injective ⇑(algebraMap (RingOfIntegers K) (RingOfIntegers L))

                              The algebraMap between ring of integers is injective.

                              noncomputable def NumberField.integralBasis (K : Type u_1) [Field K] [NumberField K] :

                              A basis of K over β„š that is also a basis of π“ž K over β„€.

                              Instances For
                                theorem NumberField.mem_span_integralBasis (K : Type u_1) [Field K] [NumberField K] {x : K} :
                                x ∈ Submodule.span β„€ (Set.range ⇑(integralBasis K)) ↔ x ∈ (algebraMap (RingOfIntegers K) K).range

                                The ring of integers of β„š as a number field is just β„€.

                                Instances For

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