Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Lean/Mathlib/Mathlib/NumberTheory/NumberField/     Datei vom 15.10.2026 mit Größe 5 kB image not shown  

Quelle  Norm.lean   Sprache: Lean

 

/-
Copyright (c) 2022 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca, Eric Rodriguez
-/

module

public import Mathlib.NumberTheory.NumberField.Basic
public import Mathlib.RingTheory.Localization.NormTrace
public import Mathlib.RingTheory.Norm.Transitivity

/-!
# Norm in number fields

Given a finite extension of number fields, we define the norm morphism as a function between the
rings of integers.

## Main definitions
* `NumberField.RingOfIntegers.norm K` : `Algebra.norm` as a morphism `(�� L) →* (�� K)`.

## Main results
* `NumberField.RingOfIntegers.dvd_norm` : if `L/K` is a finite Galois extension of fields, then,
  for all `(x : �� L)` we have that `x ∣ algebraMap (�� K) (�� L) (norm K x)`.
-/


@[expose] public section


open scoped NumberField

open Finset NumberField Algebra Module IntermediateField

section Rat

variable {K : Type*} [Field K] [NumberField K] (x : �� K)

theorem Algebra.coe_norm_int : (Algebra.norm ℤ x : ℚ) = Algebra.norm ℚ (x : K) :=
  (Algebra.norm_localization (R := ℤ) (Rₘ := ℚ) (S := �� K) (Sₘ := K) (nonZeroDivisors ℤ) x).symm

theorem Algebra.coe_trace_int : (Algebra.trace ℤ _ x : ℚ) = Algebra.trace ℚ K (x : K) :=
  (Algebra.trace_localization (R := ℤ) (Rₘ := ℚ) (S := �� K) (Sₘ := K) (nonZeroDivisors ℤ) x).symm

end Rat

namespace NumberField.RingOfIntegers

variable {L : Type*} (K : Type*) [Field K] [Field L] [Algebra K L]

/-- `Algebra.norm` as a morphism between the rings of integers. -/
noncomputable def norm : �� L →* �� K :=
  RingOfIntegers.restrict_monoidHom
    ((Algebra.norm K).comp (algebraMap (�� L) L : (�� L) →* L))
    fun x => isIntegral_norm K x.2

@[simp] lemma coe_norm (x : �� L) : norm K x = Algebra.norm K (x : L) :=
  rfl

theorem coe_algebraMap_norm (x : �� L) :
    (algebraMap (�� K) (�� L) (norm K x) : L) = algebraMap K L (Algebra.norm K (x : L)) :=
  rfl

theorem algebraMap_norm_algebraMap (x : �� K) :
    algebraMap _ K (norm K (algebraMap (�� K) (�� L) x)) =
      Algebra.norm K (algebraMap K L (algebraMap _ _ x)) :=
  rfl

theorem norm_algebraMap (x : �� K) : norm K (algebraMap (�� K) (�� L) x) = x ^ finrank K L := by
  rw [RingOfIntegers.ext_iff, RingOfIntegers.coe_eq_algebraMap,
    RingOfIntegers.algebraMap_norm_algebraMap, Algebra.norm_algebraMap,
    RingOfIntegers.coe_eq_algebraMap, map_pow]

set_option backward.isDefEq.respectTransparency.types false in
/-- If `L/K` is a finite Galois extension of fields, then, for all `(x : �� L)` we have that
`x ∣ algebraMap (�� K) (�� L) (norm K x)`. -/

theorem dvd_norm [FiniteDimensional K L] [IsGalois K L] (x : �� L) :
    x ∣ algebraMap (�� K) (�� L) (norm K x) := by
  classical
  have hint :
    IsIntegral ℤ (∏ σ ∈ univ.erase (AlgEquiv.refl : Gal(L/K)), σ x) :=
    IsIntegral.prod _ (fun σ _ =>
      ((RingOfIntegers.isIntegral_coe x).map σ))
  refine ⟨⟨_, hint⟩, ?_⟩
  ext
  rw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms]
  simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]

theorem isUnit_norm_of_isGalois [FiniteDimensional K L] [IsGalois K L] {x : �� L} :
    IsUnit (norm K x) ↔ IsUnit x :=
  ⟨fun hx ↦ isUnit_of_dvd_unit (dvd_norm K x) (hx.map _), IsUnit.map _⟩

variable (F : Type*) [Field F] [Algebra K F] [FiniteDimensional K F]

theorem norm_norm [Algebra F L] [FiniteDimensional F L] [IsScalarTower K F L] (x : �� L) :
    norm K (norm F x) = norm K x := by
  rw [RingOfIntegers.ext_iff, coe_norm, coe_norm, coe_norm, Algebra.norm_norm]

variable {F}

theorem isUnit_norm [CharZero K] {x : �� F} : IsUnit (norm K x) ↔ IsUnit x := by
  let : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K
  let L := normalClosure K F (AlgebraicClosure F)
  have : FiniteDimensional F L := FiniteDimensional.right K F L
  have : IsGalois F L := IsGalois.tower_top_of_isGalois K F L
  calc
    IsUnit (norm K x) ↔ IsUnit ((norm K) x ^ finrank F L) :=
      (isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)).symm
    _ ↔ IsUnit (norm K (algebraMap (�� F) (�� L) x)) := by
      rw [← norm_norm K F (algebraMap (�� F) (�� L) x), norm_algebraMap F _, map_pow]
    _ ↔ IsUnit (algebraMap (�� F) (�� L) x) := isUnit_norm_of_isGalois K
    _ ↔ IsUnit (norm F (algebraMap (�� F) (�� L) x)) := (isUnit_norm_of_isGalois F).symm
    _ ↔ IsUnit (x ^ finrank F L) := congr(IsUnit $(norm_algebraMap F _)).to_iff
    _ ↔ IsUnit x := isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)

end NumberField.RingOfIntegers

@[deprecated (since := "2026-11-08")] alias RingOfIntegers.norm := NumberField.RingOfIntegers.norm
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.coe_norm := NumberField.RingOfIntegers.coe_norm
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.coe_algebraMap_norm := NumberField.RingOfIntegers.coe_algebraMap_norm
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.algebraMap_norm_algebraMap :=
  NumberField.RingOfIntegers.algebraMap_norm_algebraMap
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.norm_algebraMap := NumberField.RingOfIntegers.norm_algebraMap
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.dvd_norm := NumberField.RingOfIntegers.dvd_norm
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.isUnit_norm_of_isGalois := NumberField.RingOfIntegers.isUnit_norm_of_isGalois
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.norm_norm := NumberField.RingOfIntegers.norm_norm
@[deprecated (since := "2026-11-08")]
alias RingOfIntegers.isUnit_norm := NumberField.RingOfIntegers.isUnit_norm

Messung
CHZG
9310010097

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland