number_theory.number_field.norm ⟷ Mathlib.NumberTheory.NumberField.Norm

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -68,13 +68,36 @@ theorem norm_algebraMap [IsSeparable K L] (x : π“ž K) :
 #print RingOfIntegers.isUnit_norm_of_isGalois /-
 theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
   classical
+  refine' ⟨fun hx => _, IsUnit.map _⟩
+  replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
+  refine'
+    @isUnit_of_mul_isUnit_right (π“ž L) _
+      ⟨(univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
+        prod_mem fun Οƒ hΟƒ => IsIntegral.map (Οƒ : L β†’+* L).toIntAlgHom x.2⟩
+      _ _
+  convert hx using 1
+  ext
+  push_cast
+  convert_to
+    ((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
+        ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L) =
+      _
+  Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
+  Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
 #align ring_of_integers.is_unit_norm_of_is_galois RingOfIntegers.isUnit_norm_of_isGalois
 -/
 
 #print RingOfIntegers.dvd_norm /-
 /-- If `L/K` is a finite Galois extension of fields, then, for all `(x : π“ž L)` we have that
 `x ∣ algebra_map (π“ž K) (π“ž L) (norm K x)`. -/
-theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by classical
+theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
+  classical
+  have hint : ∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x ∈ π“ž L :=
+    Subalgebra.prod_mem _ fun σ hσ =>
+      (mem_ring_of_integers _ _).2 (IsIntegral.map Οƒ (ring_of_integers.is_integral_coe x))
+  refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
+  rw [coe_algebra_map_norm K x, norm_eq_prod_automorphisms]
+  simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
 #align ring_of_integers.dvd_norm RingOfIntegers.dvd_norm
 -/
 
Diff
@@ -68,36 +68,13 @@ theorem norm_algebraMap [IsSeparable K L] (x : π“ž K) :
 #print RingOfIntegers.isUnit_norm_of_isGalois /-
 theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
   classical
-  refine' ⟨fun hx => _, IsUnit.map _⟩
-  replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
-  refine'
-    @isUnit_of_mul_isUnit_right (π“ž L) _
-      ⟨(univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
-        prod_mem fun Οƒ hΟƒ => IsIntegral.map (Οƒ : L β†’+* L).toIntAlgHom x.2⟩
-      _ _
-  convert hx using 1
-  ext
-  push_cast
-  convert_to
-    ((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
-        ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L) =
-      _
-  Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
-  Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
 #align ring_of_integers.is_unit_norm_of_is_galois RingOfIntegers.isUnit_norm_of_isGalois
 -/
 
 #print RingOfIntegers.dvd_norm /-
 /-- If `L/K` is a finite Galois extension of fields, then, for all `(x : π“ž L)` we have that
 `x ∣ algebra_map (π“ž K) (π“ž L) (norm K x)`. -/
-theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
-  classical
-  have hint : ∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x ∈ π“ž L :=
-    Subalgebra.prod_mem _ fun σ hσ =>
-      (mem_ring_of_integers _ _).2 (IsIntegral.map Οƒ (ring_of_integers.is_integral_coe x))
-  refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
-  rw [coe_algebra_map_norm K x, norm_eq_prod_automorphisms]
-  simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
+theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by classical
 #align ring_of_integers.dvd_norm RingOfIntegers.dvd_norm
 -/
 
Diff
@@ -73,7 +73,7 @@ theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x)
   refine'
     @isUnit_of_mul_isUnit_right (π“ž L) _
       ⟨(univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
-        prod_mem fun Οƒ hΟƒ => map_isIntegral (Οƒ : L β†’+* L).toIntAlgHom x.2⟩
+        prod_mem fun Οƒ hΟƒ => IsIntegral.map (Οƒ : L β†’+* L).toIntAlgHom x.2⟩
       _ _
   convert hx using 1
   ext
@@ -94,7 +94,7 @@ theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L
   classical
   have hint : ∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x ∈ π“ž L :=
     Subalgebra.prod_mem _ fun σ hσ =>
-      (mem_ring_of_integers _ _).2 (map_isIntegral Οƒ (ring_of_integers.is_integral_coe x))
+      (mem_ring_of_integers _ _).2 (IsIntegral.map Οƒ (ring_of_integers.is_integral_coe x))
   refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
   rw [coe_algebra_map_norm K x, norm_eq_prod_automorphisms]
   simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
@@ -119,7 +119,7 @@ theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :
   let L := normalClosure K F (AlgebraicClosureAux F)
   haveI : FiniteDimensional F L := FiniteDimensional.right K F L
   haveI : IsAlgClosure K (AlgebraicClosureAux F) :=
-    IsAlgClosure.ofAlgebraic K F (AlgebraicClosureAux F) (Algebra.isAlgebraic_of_finite K F)
+    IsAlgClosure.ofAlgebraic K F (AlgebraicClosureAux F) (Algebra.IsAlgebraic.of_finite K F)
   haveI : IsGalois F L := IsGalois.tower_top_of_isGalois K F L
   calc
     IsUnit (norm K x) ↔ IsUnit ((norm K) x ^ finrank F L) :=
Diff
@@ -3,8 +3,8 @@ 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
 -/
-import Mathbin.NumberTheory.NumberField.Basic
-import Mathbin.RingTheory.Norm
+import NumberTheory.NumberField.Basic
+import RingTheory.Norm
 
 #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
 
Diff
@@ -115,11 +115,11 @@ variable {F}
 #print RingOfIntegers.isUnit_norm /-
 theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :=
   by
-  letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.algebra K
-  let L := normalClosure K F (AlgebraicClosure F)
+  letI : Algebra K (AlgebraicClosureAux K) := AlgebraicClosureAux.algebra K
+  let L := normalClosure K F (AlgebraicClosureAux F)
   haveI : FiniteDimensional F L := FiniteDimensional.right K F L
-  haveI : IsAlgClosure K (AlgebraicClosure F) :=
-    IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F) (Algebra.isAlgebraic_of_finite K F)
+  haveI : IsAlgClosure K (AlgebraicClosureAux F) :=
+    IsAlgClosure.ofAlgebraic K F (AlgebraicClosureAux F) (Algebra.isAlgebraic_of_finite K F)
   haveI : IsGalois F L := IsGalois.tower_top_of_isGalois K F L
   calc
     IsUnit (norm K x) ↔ IsUnit ((norm K) x ^ finrank F L) :=
Diff
@@ -41,7 +41,7 @@ noncomputable def norm [IsSeparable K L] : π“ž L β†’* π“ž K :=
 #align ring_of_integers.norm RingOfIntegers.norm
 -/
 
-attribute [local instance] NumberField.ringOfIntegersAlgebra
+attribute [local instance] NumberField.inst_ringOfIntegersAlgebra
 
 #print RingOfIntegers.coe_algebraMap_norm /-
 theorem coe_algebraMap_norm [IsSeparable K L] (x : π“ž L) :
Diff
@@ -2,15 +2,12 @@
 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
-
-! This file was ported from Lean 3 source module number_theory.number_field.norm
-! leanprover-community/mathlib commit 1b089e3bdc3ce6b39cd472543474a0a137128c6c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.NumberTheory.NumberField.Basic
 import Mathbin.RingTheory.Norm
 
+#align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
+
 /-!
 # Norm in number fields
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Eric Rodriguez
 
 ! This file was ported from Lean 3 source module number_theory.number_field.norm
-! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
+! leanprover-community/mathlib commit 1b089e3bdc3ce6b39cd472543474a0a137128c6c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.RingTheory.Norm
 
 /-!
 # Norm in number fields
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
 Given a finite extension of number fields, we define the norm morphism as a function between the
 rings of integers.
 
Diff
@@ -33,30 +33,39 @@ namespace RingOfIntegers
 
 variable {L : Type _} (K : Type _) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L]
 
+#print RingOfIntegers.norm /-
 /-- `algebra.norm` as a morphism betwen the rings of integers. -/
 @[simps]
 noncomputable def norm [IsSeparable K L] : π“ž L β†’* π“ž K :=
   ((Algebra.norm K).restrict (π“ž L)).codRestrict (π“ž K) fun x => isIntegral_norm K x.2
 #align ring_of_integers.norm RingOfIntegers.norm
+-/
 
 attribute [local instance] NumberField.ringOfIntegersAlgebra
 
+#print RingOfIntegers.coe_algebraMap_norm /-
 theorem coe_algebraMap_norm [IsSeparable K L] (x : π“ž L) :
     (algebraMap (π“ž K) (π“ž L) (norm K x) : L) = algebraMap K L (Algebra.norm K (x : L)) :=
   rfl
 #align ring_of_integers.coe_algebra_map_norm RingOfIntegers.coe_algebraMap_norm
+-/
 
+#print RingOfIntegers.coe_norm_algebraMap /-
 theorem coe_norm_algebraMap [IsSeparable K L] (x : π“ž K) :
     (norm K (algebraMap (π“ž K) (π“ž L) x) : K) = Algebra.norm K (algebraMap K L x) :=
   rfl
 #align ring_of_integers.coe_norm_algebra_map RingOfIntegers.coe_norm_algebraMap
+-/
 
+#print RingOfIntegers.norm_algebraMap /-
 theorem norm_algebraMap [IsSeparable K L] (x : π“ž K) :
     norm K (algebraMap (π“ž K) (π“ž L) x) = x ^ finrank K L := by
   rw [← Subtype.coe_inj, RingOfIntegers.coe_norm_algebraMap, Algebra.norm_algebraMap,
     SubsemiringClass.coe_pow]
 #align ring_of_integers.norm_algebra_map RingOfIntegers.norm_algebraMap
+-/
 
+#print RingOfIntegers.isUnit_norm_of_isGalois /-
 theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
   classical
   refine' ⟨fun hx => _, IsUnit.map _⟩
@@ -76,7 +85,9 @@ theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x)
   Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
   Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
 #align ring_of_integers.is_unit_norm_of_is_galois RingOfIntegers.isUnit_norm_of_isGalois
+-/
 
+#print RingOfIntegers.dvd_norm /-
 /-- If `L/K` is a finite Galois extension of fields, then, for all `(x : π“ž L)` we have that
 `x ∣ algebra_map (π“ž K) (π“ž L) (norm K x)`. -/
 theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
@@ -88,16 +99,20 @@ theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L
   rw [coe_algebra_map_norm K x, norm_eq_prod_automorphisms]
   simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
 #align ring_of_integers.dvd_norm RingOfIntegers.dvd_norm
+-/
 
 variable (F : Type _) [Field F] [Algebra K F] [IsSeparable K F] [FiniteDimensional K F]
 
+#print RingOfIntegers.norm_norm /-
 theorem norm_norm [IsSeparable K L] [Algebra F L] [IsSeparable F L] [FiniteDimensional F L]
     [IsScalarTower K F L] (x : π“ž L) : norm K (norm F x) = norm K x := by
   rw [← Subtype.coe_inj, norm_apply_coe, norm_apply_coe, norm_apply_coe, Algebra.norm_norm]
 #align ring_of_integers.norm_norm RingOfIntegers.norm_norm
+-/
 
 variable {F}
 
+#print RingOfIntegers.isUnit_norm /-
 theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :=
   by
   letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.algebra K
@@ -116,6 +131,7 @@ theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :
     _ ↔ IsUnit (x ^ finrank F L) := (congr_arg IsUnit (norm_algebraMap F _)).to_iff
     _ ↔ IsUnit x := isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)
 #align ring_of_integers.is_unit_norm RingOfIntegers.isUnit_norm
+-/
 
 end RingOfIntegers
 
Diff
@@ -70,8 +70,8 @@ theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x)
   ext
   push_cast
   convert_to
-    (((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
-        ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L)) =
+    ((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
+        ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L) =
       _
   Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
   Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
@@ -81,7 +81,7 @@ theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x)
 `x ∣ algebra_map (π“ž K) (π“ž L) (norm K x)`. -/
 theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
   classical
-  have hint : (∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x) ∈ π“ž L :=
+  have hint : ∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x ∈ π“ž L :=
     Subalgebra.prod_mem _ fun σ hσ =>
       (mem_ring_of_integers _ _).2 (map_isIntegral Οƒ (ring_of_integers.is_integral_coe x))
   refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
Diff
@@ -115,7 +115,6 @@ theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :
     _ ↔ IsUnit (norm F (algebraMap (π“ž F) (π“ž L) x)) := (is_unit_norm_of_is_galois F).symm
     _ ↔ IsUnit (x ^ finrank F L) := (congr_arg IsUnit (norm_algebraMap F _)).to_iff
     _ ↔ IsUnit x := isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)
-    
 #align ring_of_integers.is_unit_norm RingOfIntegers.isUnit_norm
 
 end RingOfIntegers
Diff
@@ -59,33 +59,34 @@ theorem norm_algebraMap [IsSeparable K L] (x : π“ž K) :
 
 theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
   classical
-    refine' ⟨fun hx => _, IsUnit.map _⟩
-    replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
-    refine'
-      @isUnit_of_mul_isUnit_right (π“ž L) _
-        ⟨(univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
-          prod_mem fun Οƒ hΟƒ => map_isIntegral (Οƒ : L β†’+* L).toIntAlgHom x.2⟩
-        _ _
-    convert hx using 1
-    ext
-    push_cast
-    convert_to(((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
-          ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L)) =
-        _
-    Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
-    Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
+  refine' ⟨fun hx => _, IsUnit.map _⟩
+  replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
+  refine'
+    @isUnit_of_mul_isUnit_right (π“ž L) _
+      ⟨(univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
+        prod_mem fun Οƒ hΟƒ => map_isIntegral (Οƒ : L β†’+* L).toIntAlgHom x.2⟩
+      _ _
+  convert hx using 1
+  ext
+  push_cast
+  convert_to
+    (((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
+        ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L)) =
+      _
+  Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
+  Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
 #align ring_of_integers.is_unit_norm_of_is_galois RingOfIntegers.isUnit_norm_of_isGalois
 
 /-- If `L/K` is a finite Galois extension of fields, then, for all `(x : π“ž L)` we have that
 `x ∣ algebra_map (π“ž K) (π“ž L) (norm K x)`. -/
 theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L) (norm K x) := by
   classical
-    have hint : (∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x) ∈ π“ž L :=
-      Subalgebra.prod_mem _ fun σ hσ =>
-        (mem_ring_of_integers _ _).2 (map_isIntegral Οƒ (ring_of_integers.is_integral_coe x))
-    refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
-    rw [coe_algebra_map_norm K x, norm_eq_prod_automorphisms]
-    simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
+  have hint : (∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x) ∈ π“ž L :=
+    Subalgebra.prod_mem _ fun σ hσ =>
+      (mem_ring_of_integers _ _).2 (map_isIntegral Οƒ (ring_of_integers.is_integral_coe x))
+  refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
+  rw [coe_algebra_map_norm K x, norm_eq_prod_automorphisms]
+  simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
 #align ring_of_integers.dvd_norm RingOfIntegers.dvd_norm
 
 variable (F : Type _) [Field F] [Algebra K F] [IsSeparable K F] [FiniteDimensional K F]
Diff
@@ -25,7 +25,7 @@ rings of integers.
 -/
 
 
-open NumberField BigOperators
+open scoped NumberField BigOperators
 
 open Finset NumberField Algebra FiniteDimensional
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Eric Rodriguez
 
 ! This file was ported from Lean 3 source module number_theory.number_field.norm
-! leanprover-community/mathlib commit ee0c179cd3c8a45aa5bffbf1b41d8dbede452865
+! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -27,7 +27,7 @@ rings of integers.
 
 open NumberField BigOperators
 
-open Finset NumberField Algebra
+open Finset NumberField Algebra FiniteDimensional
 
 namespace RingOfIntegers
 
@@ -46,7 +46,18 @@ theorem coe_algebraMap_norm [IsSeparable K L] (x : π“ž L) :
   rfl
 #align ring_of_integers.coe_algebra_map_norm RingOfIntegers.coe_algebraMap_norm
 
-theorem isUnit_norm [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
+theorem coe_norm_algebraMap [IsSeparable K L] (x : π“ž K) :
+    (norm K (algebraMap (π“ž K) (π“ž L) x) : K) = Algebra.norm K (algebraMap K L x) :=
+  rfl
+#align ring_of_integers.coe_norm_algebra_map RingOfIntegers.coe_norm_algebraMap
+
+theorem norm_algebraMap [IsSeparable K L] (x : π“ž K) :
+    norm K (algebraMap (π“ž K) (π“ž L) x) = x ^ finrank K L := by
+  rw [← Subtype.coe_inj, RingOfIntegers.coe_norm_algebraMap, Algebra.norm_algebraMap,
+    SubsemiringClass.coe_pow]
+#align ring_of_integers.norm_algebra_map RingOfIntegers.norm_algebraMap
+
+theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x := by
   classical
     refine' ⟨fun hx => _, IsUnit.map _⟩
     replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
@@ -63,7 +74,7 @@ theorem isUnit_norm [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x
         _
     Β· rw [prod_singleton, AlgEquiv.coe_refl, id]
     Β· rw [prod_sdiff <| subset_univ _, ← norm_eq_prod_automorphisms, coe_algebra_map_norm]
-#align ring_of_integers.is_unit_norm RingOfIntegers.isUnit_norm
+#align ring_of_integers.is_unit_norm_of_is_galois RingOfIntegers.isUnit_norm_of_isGalois
 
 /-- If `L/K` is a finite Galois extension of fields, then, for all `(x : π“ž L)` we have that
 `x ∣ algebra_map (π“ž K) (π“ž L) (norm K x)`. -/
@@ -77,5 +88,34 @@ theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L
     simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
 #align ring_of_integers.dvd_norm RingOfIntegers.dvd_norm
 
+variable (F : Type _) [Field F] [Algebra K F] [IsSeparable K F] [FiniteDimensional K F]
+
+theorem norm_norm [IsSeparable K L] [Algebra F L] [IsSeparable F L] [FiniteDimensional F L]
+    [IsScalarTower K F L] (x : π“ž L) : norm K (norm F x) = norm K x := by
+  rw [← Subtype.coe_inj, norm_apply_coe, norm_apply_coe, norm_apply_coe, Algebra.norm_norm]
+#align ring_of_integers.norm_norm RingOfIntegers.norm_norm
+
+variable {F}
+
+theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :=
+  by
+  letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.algebra K
+  let L := normalClosure K F (AlgebraicClosure F)
+  haveI : FiniteDimensional F L := FiniteDimensional.right K F L
+  haveI : IsAlgClosure K (AlgebraicClosure F) :=
+    IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F) (Algebra.isAlgebraic_of_finite K F)
+  haveI : 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) := (is_unit_norm_of_is_galois K)
+    _ ↔ IsUnit (norm F (algebraMap (π“ž F) (π“ž L) x)) := (is_unit_norm_of_is_galois F).symm
+    _ ↔ IsUnit (x ^ finrank F L) := (congr_arg IsUnit (norm_algebraMap F _)).to_iff
+    _ ↔ IsUnit x := isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)
+    
+#align ring_of_integers.is_unit_norm RingOfIntegers.isUnit_norm
+
 end RingOfIntegers
 
Diff
@@ -58,8 +58,7 @@ theorem isUnit_norm [IsGalois K L] {x : π“ž L} : IsUnit (norm K x) ↔ IsUnit x
     convert hx using 1
     ext
     push_cast
-    convert_to
-      (((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
+    convert_to(((univ \ {AlgEquiv.refl}).Prod fun Οƒ : L ≃ₐ[K] L => Οƒ x) *
           ∏ Οƒ : L ≃ₐ[K] L in {AlgEquiv.refl}, Οƒ (x : L)) =
         _
     Β· rw [prod_singleton, AlgEquiv.coe_refl, id]

Changes in mathlib4

mathlib3
mathlib4
chore: superfluous parentheses part 2 (#12131)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -113,7 +113,7 @@ theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :
       (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 (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_arg IsUnit (norm_algebraMap F _)).to_iff
     _ ↔ IsUnit x := isUnit_pow_iff (pos_iff_ne_zero.mp finrank_pos)
chore: remove detrital heartbeat bumps (#10191)

With multiple changes, it is a good time to check if existing set_option maxHeartbeats and set_option synthInstance.maxHeartbeats remain necessary. This brings the number of files with such down from 23 to 9. Most are straight deletions though I did change one proof.

Diff
@@ -101,7 +101,6 @@ theorem norm_norm [IsSeparable K L] [Algebra F L] [IsSeparable F L] [FiniteDimen
 
 variable {F}
 
-set_option synthInstance.maxHeartbeats 60000 in
 theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x := by
   letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K
   let L := normalClosure K F (AlgebraicClosure F)
chore: Move a ^ m = b ^ n ↔ βˆƒ c, a = c ^ n ∧ b = c ^ m (#9505)

Those lemmas were very recently added in #9397. Also make them iffs and golf.

Part of #9411

Diff
@@ -101,6 +101,7 @@ theorem norm_norm [IsSeparable K L] [Algebra F L] [IsSeparable F L] [FiniteDimen
 
 variable {F}
 
+set_option synthInstance.maxHeartbeats 60000 in
 theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x := by
   letI : Algebra K (AlgebraicClosure K) := AlgebraicClosure.instAlgebra K
   let L := normalClosure K F (AlgebraicClosure F)
feat: add Algebra.coe_trace_int (#8513)

From flt-regular.

Diff
@@ -26,13 +26,17 @@ open scoped NumberField BigOperators
 
 open Finset NumberField Algebra FiniteDimensional
 
-section rat
+section Rat
 
-theorem Algebra.coe_norm_int {K : Type*} [Field K] [NumberField K] (x : π“ž K) :
-    Algebra.norm β„€ x = Algebra.norm β„š (x : K) :=
+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
 
-end rat
+theorem Algebra.coe_trace_int : (Algebra.trace β„€ _ x : β„š) = Algebra.trace β„š K x :=
+  (Algebra.trace_localization (R := β„€) (Rβ‚˜ := β„š) (S := π“ž K) (Sβ‚˜ := K) (nonZeroDivisors β„€) x).symm
+
+end Rat
 
 namespace RingOfIntegers
 
feat: move the lemma Algebra.coe_norm_int (#8481)

The following lemma:

theorem Algebra.coe_norm_int {K : Type*} [Field K] [NumberField K] (x : π“ž K) :
    Algebra.norm β„€ x = Algebra.norm β„š (x : K)

is currently in NumberField.Units but it belongs to NumberField.Norm

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Riccardo Brasca, Eric Rodriguez
 -/
 import Mathlib.NumberTheory.NumberField.Basic
-import Mathlib.RingTheory.Norm
+import Mathlib.RingTheory.Localization.NormTrace
 
 #align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
 
@@ -26,6 +26,14 @@ open scoped NumberField BigOperators
 
 open Finset NumberField Algebra FiniteDimensional
 
+section rat
+
+theorem Algebra.coe_norm_int {K : Type*} [Field K] [NumberField K] (x : π“ž K) :
+    Algebra.norm β„€ x = Algebra.norm β„š (x : K) :=
+  (Algebra.norm_localization (R := β„€) (Rβ‚˜ := β„š) (S := π“ž K) (Sβ‚˜ := K) (nonZeroDivisors β„€) x).symm
+
+end rat
+
 namespace RingOfIntegers
 
 variable {L : Type*} (K : Type*) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L]
chore(IntegralClosure): noncommutative generalizations and golfs (#8406)

Zulip

Initially I just wanted to add more dot notations for IsIntegral and IsAlgebraic (done in #8437); then I noticed near-duplicates Algebra.isIntegral_of_finite [Field R] [Ring A] and RingHom.IsIntegral.of_finite [CommRing R] [CommRing A] so I went on to generalize the latter to cover the former, and generalized everything in the IntegralClosure file to the noncommutative case whenever possible.

In the process I noticed more golfs, which result in this PR. Most notably, isIntegral_of_mem_of_FG is now proven using Cayley-Hamilton and doesn't depend on the Noetherian case isIntegral_of_noetherian; the latter is now proven using the former. In total the golfs makes mathlib 227 lines leaner (+487 -714).

The main changes are in the single file RingTheory/IntegralClosure:

  • Change the definition of Algebra.IsIntegral which makes it unfold to IsIntegral rather than RingHom.IsIntegralElem because the former has much more APIs.

  • Fix lemma names involving is_integral which are actually about IsIntegralElem: RingHom.is_integral_map β†’ RingHom.isIntegralElem_map RingHom.is_integral_of_mem_closure β†’ RingHom.IsIntegralElem.of_mem_closure RingHom.is_integral_zero/one β†’ RingHom.isIntegralElem_zero/one RingHom.is_integral_add/neg/sub/mul/of_mul_unit β†’ RingHom.IsIntegralElem.add/neg/sub/mul/of_mul_unit

  • Add a lemma Algebra.IsIntegral.of_injective.

  • Move isIntegral_of_(submodule_)noetherian down and golf them.

  • Remove (Algebra.)isIntegral_of_finite that work only over fields, in favor of the more general (Algebra.)isIntegral.of_finite.

  • Merge duplicate lemmas isIntegral_of_isScalarTower and isIntegral_tower_top_of_isIntegral into IsIntegral.tower_top.

  • Golf IsIntegral.of_mem_of_fg by first proving IsIntegral.of_finite using Cayley-Hamilton.

  • Add a docstring mentioning the Kurosh problem at Algebra.IsIntegral.finite. The negative solution to the problem means the theorem doesn't generalize to noncommutative algebras.

  • Golf IsIntegral.tmul and isField_of_isIntegral_of_isField(').

  • Combine isIntegral_trans_aux into isIntegral_trans and golf.

  • Add Algebra namespace to isIntegral_sup.

  • rename lemmas for dot notation: RingHom.isIntegral_trans β†’ RingHom.IsIntegral.trans RingHom.isIntegral_quotient/tower_bot/top_of_isIntegral β†’ RingHom.IsIntegral.quotient/tower_bot/top isIntegral_of_mem_closure' β†’ IsIntegral.of_mem_closure' (and the '' version) isIntegral_of_surjective β†’ Algebra.isIntegral_of_surjective

The next changed file is RingTheory/Algebraic:

  • Rename: of_larger_base β†’ tower_top (for consistency with IsIntegral) Algebra.isAlgebraic_of_finite β†’ Algebra.IsAlgebraic.of_finite Algebra.isAlgebraic_trans β†’ Algebra.IsAlgebraic.trans

  • Add new lemmasAlgebra.IsIntegral.isAlgebraic, isAlgebraic_algHom_iff, and Algebra.IsAlgebraic.of_injective to streamline some proofs.

The generalization from CommRing to Ring requires an additional lemma scaleRoots_evalβ‚‚_mul_of_commute in Polynomial/ScaleRoots.

A lemma Algebra.lmul_injective is added to Algebra/Bilinear (in order to golf the proof of IsIntegral.of_mem_of_fg).

In all other files, I merely fix the changed names, or use newly available dot notations.

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -58,7 +58,7 @@ theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x)
   replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
   refine' @isUnit_of_mul_isUnit_right (π“ž L) _
     ⟨(univ \ {AlgEquiv.refl}).prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
-      prod_mem fun Οƒ _ => IsIntegral.map (Οƒ : L β†’+* L).toIntAlgHom x.2⟩ _ _
+      prod_mem fun Οƒ _ => x.2.map (Οƒ : L β†’+* L).toIntAlgHom⟩ _ _
   convert hx using 1
   ext
   push_cast
@@ -74,7 +74,7 @@ theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L
   classical
   have hint : ∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x ∈ π“ž L :=
     Subalgebra.prod_mem _ fun Οƒ _ =>
-      (mem_ringOfIntegers _ _).2 (IsIntegral.map Οƒ (RingOfIntegers.isIntegral_coe x))
+      (mem_ringOfIntegers _ _).2 ((RingOfIntegers.isIntegral_coe x).map Οƒ)
   refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
   rw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms]
   simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
@@ -94,7 +94,7 @@ theorem isUnit_norm [CharZero K] {x : π“ž F} : IsUnit (norm K x) ↔ IsUnit x :
   let L := normalClosure K F (AlgebraicClosure F)
   haveI : FiniteDimensional F L := FiniteDimensional.right K F L
   haveI : IsAlgClosure K (AlgebraicClosure F) :=
-    IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F) (Algebra.isAlgebraic_of_finite K F)
+    IsAlgClosure.ofAlgebraic K F (AlgebraicClosure F) (Algebra.IsAlgebraic.of_finite K F)
   haveI : IsGalois F L := IsGalois.tower_top_of_isGalois K F L
   calc
     IsUnit (norm K x) ↔ IsUnit ((norm K) x ^ finrank F L) :=
chore(RingTheory/{Algebraic, Localization/Integral}): rename decls to use dot notation (#8437)

This PR tests a string-based tool for renaming declarations.

Inspired by this Zulip thread, I am trying to reduce the diff of #8406.

This PR makes the following renames:

| From | To |

Diff
@@ -58,7 +58,7 @@ theorem isUnit_norm_of_isGalois [IsGalois K L] {x : π“ž L} : IsUnit (norm K x)
   replace hx : IsUnit (algebraMap (π“ž K) (π“ž L) <| norm K x) := hx.map (algebraMap (π“ž K) <| π“ž L)
   refine' @isUnit_of_mul_isUnit_right (π“ž L) _
     ⟨(univ \ {AlgEquiv.refl}).prod fun Οƒ : L ≃ₐ[K] L => Οƒ x,
-      prod_mem fun Οƒ _ => map_isIntegral (Οƒ : L β†’+* L).toIntAlgHom x.2⟩ _ _
+      prod_mem fun Οƒ _ => IsIntegral.map (Οƒ : L β†’+* L).toIntAlgHom x.2⟩ _ _
   convert hx using 1
   ext
   push_cast
@@ -74,7 +74,7 @@ theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L
   classical
   have hint : ∏ Οƒ : L ≃ₐ[K] L in univ.erase AlgEquiv.refl, Οƒ x ∈ π“ž L :=
     Subalgebra.prod_mem _ fun Οƒ _ =>
-      (mem_ringOfIntegers _ _).2 (map_isIntegral Οƒ (RingOfIntegers.isIntegral_coe x))
+      (mem_ringOfIntegers _ _).2 (IsIntegral.map Οƒ (RingOfIntegers.isIntegral_coe x))
   refine' ⟨⟨_, hint⟩, Subtype.ext _⟩
   rw [coe_algebraMap_norm K x, norm_eq_prod_automorphisms]
   simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -28,7 +28,7 @@ open Finset NumberField Algebra FiniteDimensional
 
 namespace RingOfIntegers
 
-variable {L : Type _} (K : Type _) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L]
+variable {L : Type*} (K : Type*) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L]
 
 /-- `Algebra.norm` as a morphism betwen the rings of integers. -/
 @[simps!]
@@ -80,7 +80,7 @@ theorem dvd_norm [IsGalois K L] (x : π“ž L) : x ∣ algebraMap (π“ž K) (π“ž L
   simp [← Finset.mul_prod_erase _ _ (mem_univ AlgEquiv.refl)]
 #align ring_of_integers.dvd_norm RingOfIntegers.dvd_norm
 
-variable (F : Type _) [Field F] [Algebra K F] [IsSeparable K F] [FiniteDimensional K F]
+variable (F : Type*) [Field F] [Algebra K F] [IsSeparable K F] [FiniteDimensional K F]
 
 theorem norm_norm [IsSeparable K L] [Algebra F L] [IsSeparable F L] [FiniteDimensional F L]
     [IsScalarTower K F L] (x : π“ž L) : norm K (norm F x) = norm K x := by
chore: make ringOfIntegersAlgebra an instance (#6244)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -36,8 +36,6 @@ noncomputable def norm [IsSeparable K L] : π“ž L β†’* π“ž K :=
   ((Algebra.norm K).restrict (π“ž L)).codRestrict (π“ž K) fun x => isIntegral_norm K x.2
 #align ring_of_integers.norm RingOfIntegers.norm
 
-attribute [local instance] NumberField.ringOfIntegersAlgebra
-
 theorem coe_algebraMap_norm [IsSeparable K L] (x : π“ž L) :
     (algebraMap (π“ž K) (π“ž L) (norm K x) : L) = algebraMap K L (Algebra.norm K (x : L)) :=
   rfl
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 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
-
-! This file was ported from Lean 3 source module number_theory.number_field.norm
-! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.NumberTheory.NumberField.Basic
 import Mathlib.RingTheory.Norm
 
+#align_import number_theory.number_field.norm from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
+
 /-!
 # Norm in number fields
 Given a finite extension of number fields, we define the norm morphism as a function between the
feat: port NumberTheory.NumberField.Norm (#5353)

Dependencies 10 + 733

734 files ported (98.7%)
299508 lines ported (98.9%)
Show graph

The unported dependencies are