field_theory.galoisMathlib.FieldTheory.Galois

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -470,7 +470,7 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
   by
   have h : IsIntegral K x :=
     IsIntegral.tower_top (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)
-  have h1 : p ≠ 0 := fun hp => by rwa [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx 
+  have h1 : p ≠ 0 := fun hp => by rwa [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx
   have h2 : minpoly K x ∣ p.map (algebraMap F K) :=
     by
     apply minpoly.dvd
@@ -514,7 +514,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   let P : IntermediateField F E → Prop := fun K => Fintype.card (K →ₐ[F] E) = finrank F K
   suffices P (IntermediateField.adjoin F ↑s)
     by
-    rw [AdjoinRoot] at this 
+    rw [AdjoinRoot] at this
     apply of_card_aut_eq_finrank
     rw [← Eq.trans this (LinearEquiv.finrank_eq intermediate_field.top_equiv.to_linear_equiv)]
     exact
@@ -525,9 +525,9 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   · have key :=
       IntermediateField.card_algHom_adjoin_integral F
         (show IsIntegral F (0 : E) from isIntegral_zero)
-    rw [minpoly.zero, Polynomial.natDegree_X] at key 
+    rw [minpoly.zero, Polynomial.natDegree_X] at key
     specialize key Polynomial.separable_X (Polynomial.splits_X (algebraMap F E))
-    rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key 
+    rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key
     refine' Eq.trans _ key
     apply Fintype.card_congr
     rw [IntermediateField.adjoin_zero]
Diff
@@ -286,6 +286,16 @@ theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixe
   by
   have H_le : H ≤ fixingSubgroup (fixed_field H) := (le_iff_le _ _).mp le_rfl
   classical
+  suffices Fintype.card H = Fintype.card (fixingSubgroup (fixed_field H)) by
+    exact
+      SetLike.coe_injective
+        (Set.eq_of_inclusion_surjective
+            ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr
+                ⟨Set.inclusion_injective H_le, this⟩).2).symm
+  apply Fintype.card_congr
+  refine' (FixedPoints.toAlgHomEquiv H E).trans _
+  refine' (algEquivEquivAlgHom (fixed_field H) E).toEquiv.symm.trans _
+  exact (fixing_subgroup_equiv (fixed_field H)).toEquiv.symm
 #align intermediate_field.fixing_subgroup_fixed_field IntermediateField.fixingSubgroup_fixedField
 -/
 
@@ -325,6 +335,9 @@ theorem fixedField_fixingSubgroup [FiniteDimensional F E] [h : IsGalois F E] :
     finrank K E = finrank (IntermediateField.fixedField (IntermediateField.fixingSubgroup K)) E by
     exact (IntermediateField.eq_of_le_of_finrank_eq' K_le this).symm
   classical
+  rw [IntermediateField.finrank_fixedField_eq_card,
+    Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]
+  exact (card_aut_eq_finrank K E).symm
 #align is_galois.fixed_field_fixing_subgroup IsGalois.fixedField_fixingSubgroup
 -/
 
@@ -415,7 +428,7 @@ theorem of_fixedField_eq_bot [FiniteDimensional F E]
     (h : IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E)) = ⊥) : IsGalois F E :=
   by
   rw [← isGalois_iff_isGalois_bot, ← h]
-  classical
+  classical exact IsGalois.of_fixed_field E (⊤ : Subgroup (E ≃ₐ[F] E))
 #align is_galois.of_fixed_field_eq_bot IsGalois.of_fixedField_eq_bot
 -/
 
@@ -426,6 +439,14 @@ theorem of_card_aut_eq_finrank [FiniteDimensional F E]
   apply of_fixed_field_eq_bot
   have p : 0 < finrank (IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E))) E := finrank_pos
   classical
+  rw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm,
+    finrank_mul_finrank, ← h, one_mul, IntermediateField.finrank_fixedField_eq_card]
+  apply Fintype.card_congr
+  exact
+    { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
+      invFun := coe
+      left_inv := fun g => rfl
+      right_inv := fun _ => by ext; rfl }
 #align is_galois.of_card_aut_eq_finrank IsGalois.of_card_aut_eq_finrank
 -/
 
Diff
@@ -286,16 +286,6 @@ theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixe
   by
   have H_le : H ≤ fixingSubgroup (fixed_field H) := (le_iff_le _ _).mp le_rfl
   classical
-  suffices Fintype.card H = Fintype.card (fixingSubgroup (fixed_field H)) by
-    exact
-      SetLike.coe_injective
-        (Set.eq_of_inclusion_surjective
-            ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr
-                ⟨Set.inclusion_injective H_le, this⟩).2).symm
-  apply Fintype.card_congr
-  refine' (FixedPoints.toAlgHomEquiv H E).trans _
-  refine' (algEquivEquivAlgHom (fixed_field H) E).toEquiv.symm.trans _
-  exact (fixing_subgroup_equiv (fixed_field H)).toEquiv.symm
 #align intermediate_field.fixing_subgroup_fixed_field IntermediateField.fixingSubgroup_fixedField
 -/
 
@@ -335,9 +325,6 @@ theorem fixedField_fixingSubgroup [FiniteDimensional F E] [h : IsGalois F E] :
     finrank K E = finrank (IntermediateField.fixedField (IntermediateField.fixingSubgroup K)) E by
     exact (IntermediateField.eq_of_le_of_finrank_eq' K_le this).symm
   classical
-  rw [IntermediateField.finrank_fixedField_eq_card,
-    Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]
-  exact (card_aut_eq_finrank K E).symm
 #align is_galois.fixed_field_fixing_subgroup IsGalois.fixedField_fixingSubgroup
 -/
 
@@ -428,7 +415,7 @@ theorem of_fixedField_eq_bot [FiniteDimensional F E]
     (h : IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E)) = ⊥) : IsGalois F E :=
   by
   rw [← isGalois_iff_isGalois_bot, ← h]
-  classical exact IsGalois.of_fixed_field E (⊤ : Subgroup (E ≃ₐ[F] E))
+  classical
 #align is_galois.of_fixed_field_eq_bot IsGalois.of_fixedField_eq_bot
 -/
 
@@ -439,14 +426,6 @@ theorem of_card_aut_eq_finrank [FiniteDimensional F E]
   apply of_fixed_field_eq_bot
   have p : 0 < finrank (IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E))) E := finrank_pos
   classical
-  rw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm,
-    finrank_mul_finrank, ← h, one_mul, IntermediateField.finrank_fixedField_eq_card]
-  apply Fintype.card_congr
-  exact
-    { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
-      invFun := coe
-      left_inv := fun g => rfl
-      right_inv := fun _ => by ext; rfl }
 #align is_galois.of_card_aut_eq_finrank IsGalois.of_card_aut_eq_finrank
 -/
 
Diff
@@ -469,7 +469,7 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
     Fintype.card (K⟮⟯.restrictScalars F →ₐ[F] E) = Fintype.card (K →ₐ[F] E) * finrank K K⟮⟯ :=
   by
   have h : IsIntegral K x :=
-    isIntegral_of_isScalarTower (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)
+    IsIntegral.tower_top (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)
   have h1 : p ≠ 0 := fun hp => by rwa [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx 
   have h2 : minpoly K x ∣ p.map (algebraMap F K) :=
     by
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2020 Thomas Browning, Patrick Lutz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 -/
-import Mathbin.FieldTheory.PrimitiveElement
-import Mathbin.FieldTheory.Fixed
-import Mathbin.GroupTheory.GroupAction.FixingSubgroup
+import FieldTheory.PrimitiveElement
+import FieldTheory.Fixed
+import GroupTheory.GroupAction.FixingSubgroup
 
 #align_import field_theory.galois from "leanprover-community/mathlib"@"2a0ce625dbb0ffbc7d1316597de0b25c1ec75303"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2020 Thomas Browning, Patrick Lutz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
-
-! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit 2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.FieldTheory.PrimitiveElement
 import Mathbin.FieldTheory.Fixed
 import Mathbin.GroupTheory.GroupAction.FixingSubgroup
 
+#align_import field_theory.galois from "leanprover-community/mathlib"@"2a0ce625dbb0ffbc7d1316597de0b25c1ec75303"
+
 /-!
 # Galois Extensions
 
Diff
@@ -48,20 +48,24 @@ section
 
 variable (F : Type _) [Field F] (E : Type _) [Field E] [Algebra F E]
 
+#print IsGalois /-
 /-- A field extension E/F is galois if it is both separable and normal. Note that in mathlib
 a separable extension of fields is by definition algebraic. -/
 class IsGalois : Prop where
   [to_isSeparable : IsSeparable F E]
   [to_normal : Normal F E]
 #align is_galois IsGalois
+-/
 
 variable {F E}
 
+#print isGalois_iff /-
 theorem isGalois_iff : IsGalois F E ↔ IsSeparable F E ∧ Normal F E :=
   ⟨fun h => ⟨h.1, h.2⟩, fun h =>
     { to_isSeparable := h.1
       to_normal := h.2 }⟩
 #align is_galois_iff isGalois_iff
+-/
 
 attribute [instance 100] IsGalois.to_isSeparable IsGalois.to_normal
 
@@ -70,30 +74,40 @@ variable (F E)
 
 namespace IsGalois
 
+#print IsGalois.self /-
 instance self : IsGalois F F :=
   ⟨⟩
 #align is_galois.self IsGalois.self
+-/
 
 variable (F) {E}
 
+#print IsGalois.integral /-
 theorem integral [IsGalois F E] (x : E) : IsIntegral F x :=
   to_normal.IsIntegral x
 #align is_galois.integral IsGalois.integral
+-/
 
+#print IsGalois.separable /-
 theorem separable [IsGalois F E] (x : E) : (minpoly F x).Separable :=
   IsSeparable.separable F x
 #align is_galois.separable IsGalois.separable
+-/
 
+#print IsGalois.splits /-
 theorem splits [IsGalois F E] (x : E) : (minpoly F x).Splits (algebraMap F E) :=
   Normal.splits' x
 #align is_galois.splits IsGalois.splits
+-/
 
 variable (F E)
 
+#print IsGalois.of_fixed_field /-
 instance of_fixed_field (G : Type _) [Group G] [Finite G] [MulSemiringAction G E] :
     IsGalois (FixedPoints.subfield G E) E :=
   ⟨⟩
 #align is_galois.of_fixed_field IsGalois.of_fixed_field
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
@@ -102,6 +116,7 @@ instance of_fixed_field (G : Type _) [Group G] [Finite G] [MulSemiringAction G E
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
+#print IsGalois.IntermediateField.AdjoinSimple.card_aut_eq_finrank /-
 theorem IntermediateField.AdjoinSimple.card_aut_eq_finrank [FiniteDimensional F E] {α : E}
     (hα : IsIntegral F α) (h_sep : (minpoly F α).Separable)
     (h_splits : (minpoly F α).Splits (algebraMap F F⟮⟯)) :
@@ -112,10 +127,12 @@ theorem IntermediateField.AdjoinSimple.card_aut_eq_finrank [FiniteDimensional F
   rw [← IntermediateField.card_algHom_adjoin_integral F hα h_sep h_splits]
   exact Fintype.card_congr (algEquivEquivAlgHom F F⟮⟯)
 #align is_galois.intermediate_field.adjoin_simple.card_aut_eq_finrank IsGalois.IntermediateField.AdjoinSimple.card_aut_eq_finrank
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
+#print IsGalois.card_aut_eq_finrank /-
 theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
     Fintype.card (E ≃ₐ[F] E) = finrank F E :=
   by
@@ -143,6 +160,7 @@ theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
   · intro ϕ; ext1; simp only [trans_apply, apply_symm_apply]
   · intro ϕ; ext1; simp only [trans_apply, symm_apply_apply]
 #align is_galois.card_aut_eq_finrank IsGalois.card_aut_eq_finrank
+-/
 
 end IsGalois
 
@@ -154,19 +172,24 @@ variable (F K E : Type _) [Field F] [Field K] [Field E] {E' : Type _} [Field E']
 
 variable [Algebra F K] [Algebra F E] [Algebra K E] [IsScalarTower F K E]
 
+#print IsGalois.tower_top_of_isGalois /-
 theorem IsGalois.tower_top_of_isGalois [IsGalois F E] : IsGalois K E :=
   { to_isSeparable := isSeparable_tower_top_of_isSeparable F K E
     to_normal := Normal.tower_top_of_normal F K E }
 #align is_galois.tower_top_of_is_galois IsGalois.tower_top_of_isGalois
+-/
 
 variable {F E}
 
+#print IsGalois.tower_top_intermediateField /-
 -- see Note [lower instance priority]
 instance (priority := 100) IsGalois.tower_top_intermediateField (K : IntermediateField F E)
     [h : IsGalois F E] : IsGalois K E :=
   IsGalois.tower_top_of_isGalois F K E
 #align is_galois.tower_top_intermediate_field IsGalois.tower_top_intermediateField
+-/
 
+#print isGalois_iff_isGalois_bot /-
 theorem isGalois_iff_isGalois_bot : IsGalois (⊥ : IntermediateField F E) E ↔ IsGalois F E :=
   by
   constructor
@@ -174,23 +197,32 @@ theorem isGalois_iff_isGalois_bot : IsGalois (⊥ : IntermediateField F E) E ↔
     exact IsGalois.tower_top_of_isGalois (⊥ : IntermediateField F E) F E
   · intro h; infer_instance
 #align is_galois_iff_is_galois_bot isGalois_iff_isGalois_bot
+-/
 
+#print IsGalois.of_algEquiv /-
 theorem IsGalois.of_algEquiv [h : IsGalois F E] (f : E ≃ₐ[F] E') : IsGalois F E' :=
   { to_isSeparable := IsSeparable.of_algHom F E f.symm
     to_normal := Normal.of_algEquiv f }
 #align is_galois.of_alg_equiv IsGalois.of_algEquiv
+-/
 
+#print AlgEquiv.transfer_galois /-
 theorem AlgEquiv.transfer_galois (f : E ≃ₐ[F] E') : IsGalois F E ↔ IsGalois F E' :=
   ⟨fun h => IsGalois.of_algEquiv f, fun h => IsGalois.of_algEquiv f.symm⟩
 #align alg_equiv.transfer_galois AlgEquiv.transfer_galois
+-/
 
+#print isGalois_iff_isGalois_top /-
 theorem isGalois_iff_isGalois_top : IsGalois F (⊤ : IntermediateField F E) ↔ IsGalois F E :=
   (IntermediateField.topEquiv : (⊤ : IntermediateField F E) ≃ₐ[F] E).transfer_galois
 #align is_galois_iff_is_galois_top isGalois_iff_isGalois_top
+-/
 
+#print isGalois_bot /-
 instance isGalois_bot : IsGalois F (⊥ : IntermediateField F E) :=
   (IntermediateField.botEquiv F E).transfer_galois.mpr (IsGalois.self F)
 #align is_galois_bot isGalois_bot
+-/
 
 end IsGaloisTower
 
@@ -200,6 +232,7 @@ variable {F : Type _} [Field F] {E : Type _} [Field E] [Algebra F E]
 
 variable (H : Subgroup (E ≃ₐ[F] E)) (K : IntermediateField F E)
 
+#print FixedPoints.intermediateField /-
 /-- The intermediate field of fixed points fixed by a monoid action that commutes with the
 `F`-action on `E`. -/
 def FixedPoints.intermediateField (M : Type _) [Monoid M] [MulSemiringAction M E]
@@ -208,28 +241,38 @@ def FixedPoints.intermediateField (M : Type _) [Monoid M] [MulSemiringAction M E
     carrier := MulAction.fixedPoints M E
     algebraMap_mem' := fun a g => by rw [Algebra.algebraMap_eq_smul_one, smul_comm, smul_one] }
 #align fixed_points.intermediate_field FixedPoints.intermediateField
+-/
 
 namespace IntermediateField
 
+#print IntermediateField.fixedField /-
 /-- The intermediate_field fixed by a subgroup -/
 def fixedField : IntermediateField F E :=
   FixedPoints.intermediateField H
 #align intermediate_field.fixed_field IntermediateField.fixedField
+-/
 
+#print IntermediateField.finrank_fixedField_eq_card /-
 theorem finrank_fixedField_eq_card [FiniteDimensional F E] [DecidablePred (· ∈ H)] :
     finrank (fixedField H) E = Fintype.card H :=
   FixedPoints.finrank_eq_card H E
 #align intermediate_field.finrank_fixed_field_eq_card IntermediateField.finrank_fixedField_eq_card
+-/
 
+#print IntermediateField.fixingSubgroup /-
 /-- The subgroup fixing an intermediate_field -/
 def fixingSubgroup : Subgroup (E ≃ₐ[F] E) :=
   fixingSubgroup (E ≃ₐ[F] E) (K : Set E)
 #align intermediate_field.fixing_subgroup IntermediateField.fixingSubgroup
+-/
 
+#print IntermediateField.le_iff_le /-
 theorem le_iff_le : K ≤ fixedField H ↔ H ≤ fixingSubgroup K :=
   ⟨fun h g hg x => h (Subtype.mem x) ⟨g, hg⟩, fun h x hx g => h (Subtype.mem g) ⟨x, hx⟩⟩
 #align intermediate_field.le_iff_le IntermediateField.le_iff_le
+-/
 
+#print IntermediateField.fixingSubgroupEquiv /-
 /-- The fixing_subgroup of `K : intermediate_field F E` is isomorphic to `E ≃ₐ[K] E` -/
 def fixingSubgroupEquiv : fixingSubgroup K ≃* E ≃ₐ[K] E
     where
@@ -239,7 +282,9 @@ def fixingSubgroupEquiv : fixingSubgroup K ≃* E ≃ₐ[K] E
   right_inv _ := by ext; rfl
   map_mul' _ _ := by ext; rfl
 #align intermediate_field.fixing_subgroup_equiv IntermediateField.fixingSubgroupEquiv
+-/
 
+#print IntermediateField.fixingSubgroup_fixedField /-
 theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixedField H) = H :=
   by
   have H_le : H ≤ fixingSubgroup (fixed_field H) := (le_iff_le _ _).mp le_rfl
@@ -255,7 +300,9 @@ theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixe
   refine' (algEquivEquivAlgHom (fixed_field H) E).toEquiv.symm.trans _
   exact (fixing_subgroup_equiv (fixed_field H)).toEquiv.symm
 #align intermediate_field.fixing_subgroup_fixed_field IntermediateField.fixingSubgroup_fixedField
+-/
 
+#print IntermediateField.fixedField.algebra /-
 instance fixedField.algebra : Algebra K (fixedField (fixingSubgroup K))
     where
   smul x y :=
@@ -269,15 +316,19 @@ instance fixedField.algebra : Algebra K (fixedField (fixingSubgroup K))
   commutes' _ _ := mul_comm _ _
   smul_def' _ _ := rfl
 #align intermediate_field.fixed_field.algebra IntermediateField.fixedField.algebra
+-/
 
+#print IntermediateField.fixedField.isScalarTower /-
 instance fixedField.isScalarTower : IsScalarTower K (fixedField (fixingSubgroup K)) E :=
   ⟨fun _ _ _ => mul_assoc _ _ _⟩
 #align intermediate_field.fixed_field.is_scalar_tower IntermediateField.fixedField.isScalarTower
+-/
 
 end IntermediateField
 
 namespace IsGalois
 
+#print IsGalois.fixedField_fixingSubgroup /-
 theorem fixedField_fixingSubgroup [FiniteDimensional F E] [h : IsGalois F E] :
     IntermediateField.fixedField (IntermediateField.fixingSubgroup K) = K :=
   by
@@ -291,7 +342,9 @@ theorem fixedField_fixingSubgroup [FiniteDimensional F E] [h : IsGalois F E] :
     Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]
   exact (card_aut_eq_finrank K E).symm
 #align is_galois.fixed_field_fixing_subgroup IsGalois.fixedField_fixingSubgroup
+-/
 
+#print IsGalois.card_fixingSubgroup_eq_finrank /-
 theorem card_fixingSubgroup_eq_finrank [DecidablePred (· ∈ IntermediateField.fixingSubgroup K)]
     [FiniteDimensional F E] [IsGalois F E] :
     Fintype.card (IntermediateField.fixingSubgroup K) = finrank K E := by
@@ -299,7 +352,9 @@ theorem card_fixingSubgroup_eq_finrank [DecidablePred (· ∈ IntermediateField.
     rhs
     rw [← fixed_field_fixing_subgroup K, IntermediateField.finrank_fixedField_eq_card]
 #align is_galois.card_fixing_subgroup_eq_finrank IsGalois.card_fixingSubgroup_eq_finrank
+-/
 
+#print IsGalois.intermediateFieldEquivSubgroup /-
 /-- The Galois correspondence from intermediate fields to subgroups -/
 def intermediateFieldEquivSubgroup [FiniteDimensional F E] [IsGalois F E] :
     IntermediateField F E ≃o (Subgroup (E ≃ₐ[F] E))ᵒᵈ
@@ -313,7 +368,9 @@ def intermediateFieldEquivSubgroup [FiniteDimensional F E] [IsGalois F E] :
     rw [← fixed_field_fixing_subgroup L, IntermediateField.le_iff_le, fixed_field_fixing_subgroup L]
     rfl
 #align is_galois.intermediate_field_equiv_subgroup IsGalois.intermediateFieldEquivSubgroup
+-/
 
+#print IsGalois.galoisInsertionIntermediateFieldSubgroup /-
 /-- The Galois correspondence as a galois_insertion -/
 def galoisInsertionIntermediateFieldSubgroup [FiniteDimensional F E] :
     GaloisInsertion
@@ -327,7 +384,9 @@ def galoisInsertionIntermediateFieldSubgroup [FiniteDimensional F E] :
   le_l_u H := le_of_eq (IntermediateField.fixingSubgroup_fixedField H).symm
   choice_eq K _ := rfl
 #align is_galois.galois_insertion_intermediate_field_subgroup IsGalois.galoisInsertionIntermediateFieldSubgroup
+-/
 
+#print IsGalois.galoisCoinsertionIntermediateFieldSubgroup /-
 /-- The Galois correspondence as a galois_coinsertion -/
 def galoisCoinsertionIntermediateFieldSubgroup [FiniteDimensional F E] [IsGalois F E] :
     GaloisCoinsertion
@@ -341,6 +400,7 @@ def galoisCoinsertionIntermediateFieldSubgroup [FiniteDimensional F E] [IsGalois
   u_l_le K := le_of_eq (fixedField_fixingSubgroup K)
   choice_eq H _ := rfl
 #align is_galois.galois_coinsertion_intermediate_field_subgroup IsGalois.galoisCoinsertionIntermediateFieldSubgroup
+-/
 
 end IsGalois
 
@@ -352,6 +412,7 @@ variable (F : Type _) [Field F] (E : Type _) [Field E] [Algebra F E]
 
 namespace IsGalois
 
+#print IsGalois.is_separable_splitting_field /-
 theorem is_separable_splitting_field [FiniteDimensional F E] [IsGalois F E] :
     ∃ p : F[X], p.Separable ∧ p.IsSplittingField F E :=
   by
@@ -363,14 +424,18 @@ theorem is_separable_splitting_field [FiniteDimensional F E] [IsGalois F E] :
   rw [Set.singleton_subset_iff, Polynomial.mem_rootSet]
   exact ⟨minpoly.ne_zero (integral F α), minpoly.aeval _ _⟩
 #align is_galois.is_separable_splitting_field IsGalois.is_separable_splitting_field
+-/
 
+#print IsGalois.of_fixedField_eq_bot /-
 theorem of_fixedField_eq_bot [FiniteDimensional F E]
     (h : IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E)) = ⊥) : IsGalois F E :=
   by
   rw [← isGalois_iff_isGalois_bot, ← h]
   classical exact IsGalois.of_fixed_field E (⊤ : Subgroup (E ≃ₐ[F] E))
 #align is_galois.of_fixed_field_eq_bot IsGalois.of_fixedField_eq_bot
+-/
 
+#print IsGalois.of_card_aut_eq_finrank /-
 theorem of_card_aut_eq_finrank [FiniteDimensional F E]
     (h : Fintype.card (E ≃ₐ[F] E) = finrank F E) : IsGalois F E :=
   by
@@ -386,6 +451,7 @@ theorem of_card_aut_eq_finrank [FiniteDimensional F E]
       left_inv := fun g => rfl
       right_inv := fun _ => by ext; rfl }
 #align is_galois.of_card_aut_eq_finrank IsGalois.of_card_aut_eq_finrank
+-/
 
 variable {F} {E} {p : F[X]}
 
@@ -396,6 +462,7 @@ variable {F} {E} {p : F[X]}
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:192:11: unsupported (impossible) -/
+#print IsGalois.of_separable_splitting_field_aux /-
 theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.IsSplittingField F E]
     (hp : p.Separable) (K : Type _) [Field K] [Algebra F K] [Algebra K E] [IsScalarTower F K E]
     {x : E} (hx : x ∈ (p.map (algebraMap F E)).roots)
@@ -433,7 +500,9 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
     rw [Polynomial.splits_map_iff, ← IsScalarTower.algebraMap_eq]
     exact sp.splits
 #align is_galois.of_separable_splitting_field_aux IsGalois.of_separable_splitting_field_aux
+-/
 
+#print IsGalois.of_separable_splitting_field /-
 theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separable) :
     IsGalois F E :=
   by
@@ -472,9 +541,11 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   refine' LinearEquiv.finrank_eq _
   rfl
 #align is_galois.of_separable_splitting_field IsGalois.of_separable_splitting_field
+-/
 
+#print IsGalois.tfae /-
 /-- Equivalent characterizations of a Galois extension of finite degree-/
-theorem tFAE [FiniteDimensional F E] :
+theorem tfae [FiniteDimensional F E] :
     TFAE
       [IsGalois F E, IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E)) = ⊥,
         Fintype.card (E ≃ₐ[F] E) = finrank F E, ∃ p : F[X], p.Separable ∧ p.IsSplittingField F E] :=
@@ -492,7 +563,8 @@ theorem tFAE [FiniteDimensional F E] :
   tfae_have 4 → 1
   · rintro ⟨h, hp1, _⟩; exact of_separable_splitting_field hp1
   tfae_finish
-#align is_galois.tfae IsGalois.tFAE
+#align is_galois.tfae IsGalois.tfae
+-/
 
 end IsGalois
 
@@ -503,17 +575,21 @@ section normalClosure
 variable (k K F : Type _) [Field k] [Field K] [Field F] [Algebra k K] [Algebra k F] [Algebra K F]
   [IsScalarTower k K F] [IsGalois k F]
 
+#print IsGalois.normalClosure /-
 instance IsGalois.normalClosure : IsGalois k (normalClosure k K F)
     where to_isSeparable := isSeparable_tower_bot_of_isSeparable k _ F
 #align is_galois.normal_closure IsGalois.normalClosure
+-/
 
 end normalClosure
 
 section IsAlgClosure
 
+#print IsAlgClosure.isGalois /-
 instance (priority := 100) IsAlgClosure.isGalois (k K : Type _) [Field k] [Field K] [Algebra k K]
     [IsAlgClosure k K] [CharZero k] : IsGalois k K where
 #align is_alg_closure.is_galois IsAlgClosure.isGalois
+-/
 
 end IsAlgClosure
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 
 ! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit 9fb8964792b4237dac6200193a0d533f1b3f7423
+! leanprover-community/mathlib commit 2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.GroupTheory.GroupAction.FixingSubgroup
 /-!
 # Galois Extensions
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we define Galois extensions as extensions which are both separable and normal.
 
 ## Main definitions
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 
 ! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
+! leanprover-community/mathlib commit 9fb8964792b4237dac6200193a0d533f1b3f7423
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -357,11 +357,8 @@ theorem is_separable_splitting_field [FiniteDimensional F E] [IsGalois F E] :
   rw [eq_top_iff, ← IntermediateField.top_toSubalgebra, ← h1]
   rw [IntermediateField.adjoin_simple_toSubalgebra_of_integral (integral F α)]
   apply Algebra.adjoin_mono
-  rw [Set.singleton_subset_iff, Finset.mem_coe, Multiset.mem_toFinset, Polynomial.mem_roots]
-  · dsimp only [Polynomial.IsRoot]
-    rw [Polynomial.eval_map, ← Polynomial.aeval_def]
-    exact minpoly.aeval _ _
-  · exact Polynomial.map_ne_zero (minpoly.ne_zero (integral F α))
+  rw [Set.singleton_subset_iff, Polynomial.mem_rootSet]
+  exact ⟨minpoly.ne_zero (integral F α), minpoly.aeval _ _⟩
 #align is_galois.is_separable_splitting_field IsGalois.is_separable_splitting_field
 
 theorem of_fixedField_eq_bot [FiniteDimensional F E]
@@ -443,7 +440,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   have adjoin_root : IntermediateField.adjoin F ↑s = ⊤ :=
     by
     apply IntermediateField.toSubalgebra_injective
-    rw [IntermediateField.top_toSubalgebra, ← top_le_iff, ← sp.adjoin_roots]
+    rw [IntermediateField.top_toSubalgebra, ← top_le_iff, ← sp.adjoin_root_set]
     apply IntermediateField.algebra_adjoin_le_adjoin
   let P : IntermediateField F E → Prop := fun K => Fintype.card (K →ₐ[F] E) = finrank F K
   suffices P (IntermediateField.adjoin F ↑s)
Diff
@@ -241,16 +241,16 @@ theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixe
   by
   have H_le : H ≤ fixingSubgroup (fixed_field H) := (le_iff_le _ _).mp le_rfl
   classical
-    suffices Fintype.card H = Fintype.card (fixingSubgroup (fixed_field H)) by
-      exact
-        SetLike.coe_injective
-          (Set.eq_of_inclusion_surjective
-              ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr
-                  ⟨Set.inclusion_injective H_le, this⟩).2).symm
-    apply Fintype.card_congr
-    refine' (FixedPoints.toAlgHomEquiv H E).trans _
-    refine' (algEquivEquivAlgHom (fixed_field H) E).toEquiv.symm.trans _
-    exact (fixing_subgroup_equiv (fixed_field H)).toEquiv.symm
+  suffices Fintype.card H = Fintype.card (fixingSubgroup (fixed_field H)) by
+    exact
+      SetLike.coe_injective
+        (Set.eq_of_inclusion_surjective
+            ((Fintype.bijective_iff_injective_and_card (Set.inclusion H_le)).mpr
+                ⟨Set.inclusion_injective H_le, this⟩).2).symm
+  apply Fintype.card_congr
+  refine' (FixedPoints.toAlgHomEquiv H E).trans _
+  refine' (algEquivEquivAlgHom (fixed_field H) E).toEquiv.symm.trans _
+  exact (fixing_subgroup_equiv (fixed_field H)).toEquiv.symm
 #align intermediate_field.fixing_subgroup_fixed_field IntermediateField.fixingSubgroup_fixedField
 
 instance fixedField.algebra : Algebra K (fixedField (fixingSubgroup K))
@@ -284,9 +284,9 @@ theorem fixedField_fixingSubgroup [FiniteDimensional F E] [h : IsGalois F E] :
     finrank K E = finrank (IntermediateField.fixedField (IntermediateField.fixingSubgroup K)) E by
     exact (IntermediateField.eq_of_le_of_finrank_eq' K_le this).symm
   classical
-    rw [IntermediateField.finrank_fixedField_eq_card,
-      Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]
-    exact (card_aut_eq_finrank K E).symm
+  rw [IntermediateField.finrank_fixedField_eq_card,
+    Fintype.card_congr (IntermediateField.fixingSubgroupEquiv K).toEquiv]
+  exact (card_aut_eq_finrank K E).symm
 #align is_galois.fixed_field_fixing_subgroup IsGalois.fixedField_fixingSubgroup
 
 theorem card_fixingSubgroup_eq_finrank [DecidablePred (· ∈ IntermediateField.fixingSubgroup K)]
@@ -377,14 +377,14 @@ theorem of_card_aut_eq_finrank [FiniteDimensional F E]
   apply of_fixed_field_eq_bot
   have p : 0 < finrank (IntermediateField.fixedField (⊤ : Subgroup (E ≃ₐ[F] E))) E := finrank_pos
   classical
-    rw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm,
-      finrank_mul_finrank, ← h, one_mul, IntermediateField.finrank_fixedField_eq_card]
-    apply Fintype.card_congr
-    exact
-      { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
-        invFun := coe
-        left_inv := fun g => rfl
-        right_inv := fun _ => by ext; rfl }
+  rw [← IntermediateField.finrank_eq_one_iff, ← mul_left_inj' (ne_of_lt p).symm,
+    finrank_mul_finrank, ← h, one_mul, IntermediateField.finrank_fixedField_eq_card]
+  apply Fintype.card_congr
+  exact
+    { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
+      invFun := coe
+      left_inv := fun g => rfl
+      right_inv := fun _ => by ext; rfl }
 #align is_galois.of_card_aut_eq_finrank IsGalois.of_card_aut_eq_finrank
 
 variable {F} {E} {p : F[X]}
Diff
@@ -406,7 +406,7 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
   by
   have h : IsIntegral K x :=
     isIntegral_of_isScalarTower (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)
-  have h1 : p ≠ 0 := fun hp => by rwa [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx
+  have h1 : p ≠ 0 := fun hp => by rwa [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx 
   have h2 : minpoly K x ∣ p.map (algebraMap F K) :=
     by
     apply minpoly.dvd
@@ -415,9 +415,9 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
     exact (Polynomial.mem_roots (Polynomial.map_ne_zero h1)).mp hx
   let key_equiv :
     (K⟮⟯.restrictScalars F →ₐ[F] E) ≃
-      Σf : K →ₐ[F] E, @AlgHom K K⟮⟯ E _ _ _ _ (RingHom.toAlgebra f) :=
+      Σ f : K →ₐ[F] E, @AlgHom K K⟮⟯ E _ _ _ _ (RingHom.toAlgebra f) :=
     by
-    change (K⟮⟯ →ₐ[F] E) ≃ Σf : K →ₐ[F] E, _
+    change (K⟮⟯ →ₐ[F] E) ≃ Σ f : K →ₐ[F] E, _
     exact algHomEquivSigma
   haveI : ∀ f : K →ₐ[F] E, Fintype (@AlgHom K K⟮⟯ E _ _ _ _ (RingHom.toAlgebra f)) := fun f =>
     by
@@ -448,7 +448,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   let P : IntermediateField F E → Prop := fun K => Fintype.card (K →ₐ[F] E) = finrank F K
   suffices P (IntermediateField.adjoin F ↑s)
     by
-    rw [AdjoinRoot] at this
+    rw [AdjoinRoot] at this 
     apply of_card_aut_eq_finrank
     rw [← Eq.trans this (LinearEquiv.finrank_eq intermediate_field.top_equiv.to_linear_equiv)]
     exact
@@ -459,9 +459,9 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   · have key :=
       IntermediateField.card_algHom_adjoin_integral F
         (show IsIntegral F (0 : E) from isIntegral_zero)
-    rw [minpoly.zero, Polynomial.natDegree_X] at key
+    rw [minpoly.zero, Polynomial.natDegree_X] at key 
     specialize key Polynomial.separable_X (Polynomial.splits_X (algebraMap F E))
-    rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key
+    rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key 
     refine' Eq.trans _ key
     apply Fintype.card_congr
     rw [IntermediateField.adjoin_zero]
@@ -482,9 +482,9 @@ theorem tFAE [FiniteDimensional F E] :
   tfae_have 1 → 2
   · exact fun h => OrderIso.map_bot (@intermediate_field_equiv_subgroup F _ E _ _ _ h).symm
   tfae_have 1 → 3
-  · intro ; exact card_aut_eq_finrank F E
+  · intro; exact card_aut_eq_finrank F E
   tfae_have 1 → 4
-  · intro ; exact is_separable_splitting_field F E
+  · intro; exact is_separable_splitting_field F E
   tfae_have 2 → 1
   · exact of_fixed_field_eq_bot F E
   tfae_have 3 → 1
Diff
@@ -37,7 +37,7 @@ Together, these two results prove the Galois correspondence.
 -/
 
 
-open Polynomial
+open scoped Polynomial
 
 open FiniteDimensional AlgEquiv
 
Diff
@@ -119,13 +119,8 @@ theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
   cases' Field.exists_primitive_element F E with α hα
   let iso : F⟮⟯ ≃ₐ[F] E :=
     { toFun := fun e => e.val
-      invFun := fun e =>
-        ⟨e, by
-          rw [hα]
-          exact IntermediateField.mem_top⟩
-      left_inv := fun _ => by
-        ext
-        rfl
+      invFun := fun e => ⟨e, by rw [hα]; exact IntermediateField.mem_top⟩
+      left_inv := fun _ => by ext; rfl
       right_inv := fun _ => rfl
       map_mul' := fun _ _ => rfl
       map_add' := fun _ _ => rfl
@@ -134,9 +129,7 @@ theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
   have h_sep : (minpoly F α).Separable := IsGalois.separable F α
   have h_splits : (minpoly F α).Splits (algebraMap F E) := IsGalois.splits F α
   replace h_splits : Polynomial.Splits (algebraMap F F⟮⟯) (minpoly F α)
-  · have p : iso.symm.to_alg_hom.to_ring_hom.comp (algebraMap F E) = algebraMap F ↥F⟮⟯ :=
-      by
-      ext
+  · have p : iso.symm.to_alg_hom.to_ring_hom.comp (algebraMap F E) = algebraMap F ↥F⟮⟯ := by ext;
       simp
     simpa [p] using
       Polynomial.splits_comp_of_splits (algebraMap F E) iso.symm.to_alg_hom.to_ring_hom h_splits
@@ -144,12 +137,8 @@ theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
   rw [← intermediate_field.adjoin_simple.card_aut_eq_finrank F E H h_sep h_splits]
   apply Fintype.card_congr
   apply Equiv.mk (fun ϕ => iso.trans (trans ϕ iso.symm)) fun ϕ => iso.symm.trans (trans ϕ iso)
-  · intro ϕ
-    ext1
-    simp only [trans_apply, apply_symm_apply]
-  · intro ϕ
-    ext1
-    simp only [trans_apply, symm_apply_apply]
+  · intro ϕ; ext1; simp only [trans_apply, apply_symm_apply]
+  · intro ϕ; ext1; simp only [trans_apply, symm_apply_apply]
 #align is_galois.card_aut_eq_finrank IsGalois.card_aut_eq_finrank
 
 end IsGalois
@@ -180,8 +169,7 @@ theorem isGalois_iff_isGalois_bot : IsGalois (⊥ : IntermediateField F E) E ↔
   constructor
   · intro h
     exact IsGalois.tower_top_of_isGalois (⊥ : IntermediateField F E) F E
-  · intro h
-    infer_instance
+  · intro h; infer_instance
 #align is_galois_iff_is_galois_bot isGalois_iff_isGalois_bot
 
 theorem IsGalois.of_algEquiv [h : IsGalois F E] (f : E ≃ₐ[F] E') : IsGalois F E' :=
@@ -244,15 +232,9 @@ def fixingSubgroupEquiv : fixingSubgroup K ≃* E ≃ₐ[K] E
     where
   toFun ϕ := { AlgEquiv.toRingEquiv ↑ϕ with commutes' := ϕ.Mem }
   invFun ϕ := ⟨ϕ.restrictScalars _, ϕ.commutes⟩
-  left_inv _ := by
-    ext
-    rfl
-  right_inv _ := by
-    ext
-    rfl
-  map_mul' _ _ := by
-    ext
-    rfl
+  left_inv _ := by ext; rfl
+  right_inv _ := by ext; rfl
+  map_mul' _ _ := by ext; rfl
 #align intermediate_field.fixing_subgroup_equiv IntermediateField.fixingSubgroupEquiv
 
 theorem fixingSubgroup_fixedField [FiniteDimensional F E] : fixingSubgroup (fixedField H) = H :=
@@ -402,9 +384,7 @@ theorem of_card_aut_eq_finrank [FiniteDimensional F E]
       { toFun := fun g => ⟨g, Subgroup.mem_top g⟩
         invFun := coe
         left_inv := fun g => rfl
-        right_inv := fun _ => by
-          ext
-          rfl }
+        right_inv := fun _ => by ext; rfl }
 #align is_galois.of_card_aut_eq_finrank IsGalois.of_card_aut_eq_finrank
 
 variable {F} {E} {p : F[X]}
@@ -447,8 +427,7 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
   apply Finset.sum_const_nat
   intro f hf
   rw [← @IntermediateField.card_algHom_adjoin_integral K _ E _ _ x E _ (RingHom.toAlgebra f) h]
-  · apply Fintype.card_congr
-    rfl
+  · apply Fintype.card_congr; rfl
   · exact Polynomial.Separable.of_dvd ((Polynomial.separable_map (algebraMap F K)).mpr hp) h2
   · refine' Polynomial.splits_of_splits_of_dvd _ (Polynomial.map_ne_zero h1) _ h2
     rw [Polynomial.splits_map_iff, ← IsScalarTower.algebraMap_eq]
@@ -503,18 +482,15 @@ theorem tFAE [FiniteDimensional F E] :
   tfae_have 1 → 2
   · exact fun h => OrderIso.map_bot (@intermediate_field_equiv_subgroup F _ E _ _ _ h).symm
   tfae_have 1 → 3
-  · intro
-    exact card_aut_eq_finrank F E
+  · intro ; exact card_aut_eq_finrank F E
   tfae_have 1 → 4
-  · intro
-    exact is_separable_splitting_field F E
+  · intro ; exact is_separable_splitting_field F E
   tfae_have 2 → 1
   · exact of_fixed_field_eq_bot F E
   tfae_have 3 → 1
   · exact of_card_aut_eq_finrank F E
   tfae_have 4 → 1
-  · rintro ⟨h, hp1, _⟩
-    exact of_separable_splitting_field hp1
+  · rintro ⟨h, hp1, _⟩; exact of_separable_splitting_field hp1
   tfae_finish
 #align is_galois.tfae IsGalois.tFAE
 
Diff
@@ -481,7 +481,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
       IntermediateField.card_algHom_adjoin_integral F
         (show IsIntegral F (0 : E) from isIntegral_zero)
     rw [minpoly.zero, Polynomial.natDegree_X] at key
-    specialize key Polynomial.separable_x (Polynomial.splits_X (algebraMap F E))
+    specialize key Polynomial.separable_X (Polynomial.splits_X (algebraMap F E))
     rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key
     refine' Eq.trans _ key
     apply Fintype.card_congr
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 
 ! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
+! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -522,6 +522,17 @@ end IsGalois
 
 end GaloisEquivalentDefinitions
 
+section normalClosure
+
+variable (k K F : Type _) [Field k] [Field K] [Field F] [Algebra k K] [Algebra k F] [Algebra K F]
+  [IsScalarTower k K F] [IsGalois k F]
+
+instance IsGalois.normalClosure : IsGalois k (normalClosure k K F)
+    where to_isSeparable := isSeparable_tower_bot_of_isSeparable k _ F
+#align is_galois.normal_closure IsGalois.normalClosure
+
+end normalClosure
+
 section IsAlgClosure
 
 instance (priority := 100) IsAlgClosure.isGalois (k K : Type _) [Field k] [Field K] [Algebra k K]
Diff
@@ -4,11 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 
 ! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit 0ac3057eb6231d2c8dfcd46767cf4a166961c0f1
+! leanprover-community/mathlib commit f0c8bf9245297a541f468be517f1bde6195105e9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.FieldTheory.IsAlgClosed.AlgebraicClosure
 import Mathbin.FieldTheory.PrimitiveElement
 import Mathbin.FieldTheory.Fixed
 import Mathbin.GroupTheory.GroupAction.FixingSubgroup
Diff
@@ -61,7 +61,7 @@ theorem isGalois_iff : IsGalois F E ↔ IsSeparable F E ∧ Normal F E :=
       to_normal := h.2 }⟩
 #align is_galois_iff isGalois_iff
 
-attribute [instance] IsGalois.to_isSeparable IsGalois.to_normal
+attribute [instance 100] IsGalois.to_isSeparable IsGalois.to_normal
 
 -- see Note [lower instance priority]
 variable (F E)
Diff
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 
 ! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 0ac3057eb6231d2c8dfcd46767cf4a166961c0f1
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.FieldTheory.Normal
+import Mathbin.FieldTheory.IsAlgClosed.AlgebraicClosure
 import Mathbin.FieldTheory.PrimitiveElement
 import Mathbin.FieldTheory.Fixed
 import Mathbin.GroupTheory.GroupAction.FixingSubgroup
@@ -523,3 +523,11 @@ end IsGalois
 
 end GaloisEquivalentDefinitions
 
+section IsAlgClosure
+
+instance (priority := 100) IsAlgClosure.isGalois (k K : Type _) [Field k] [Field K] [Algebra k K]
+    [IsAlgClosure k K] [CharZero k] : IsGalois k K where
+#align is_alg_closure.is_galois IsAlgClosure.isGalois
+
+end IsAlgClosure
+
Diff
@@ -482,7 +482,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
       IntermediateField.card_algHom_adjoin_integral F
         (show IsIntegral F (0 : E) from isIntegral_zero)
     rw [minpoly.zero, Polynomial.natDegree_X] at key
-    specialize key Polynomial.separable_x (Polynomial.splits_x (algebraMap F E))
+    specialize key Polynomial.separable_x (Polynomial.splits_X (algebraMap F E))
     rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key
     refine' Eq.trans _ key
     apply Fintype.card_congr
Diff
@@ -481,7 +481,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   · have key :=
       IntermediateField.card_algHom_adjoin_integral F
         (show IsIntegral F (0 : E) from isIntegral_zero)
-    rw [minpoly.zero, Polynomial.natDegree_x] at key
+    rw [minpoly.zero, Polynomial.natDegree_X] at key
     specialize key Polynomial.separable_x (Polynomial.splits_x (algebraMap F E))
     rw [← @Subalgebra.finrank_bot F E _ _ _, ← IntermediateField.bot_toSubalgebra] at key
     refine' Eq.trans _ key

Changes in mathlib4

mathlib3
mathlib4
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -132,7 +132,6 @@ end
 section IsGaloisTower
 
 variable (F K E : Type*) [Field F] [Field K] [Field E] {E' : Type*} [Field E'] [Algebra F E']
-
 variable [Algebra F K] [Algebra F E] [Algebra K E] [IsScalarTower F K E]
 
 theorem IsGalois.tower_top_of_isGalois [IsGalois F E] : IsGalois K E :=
@@ -177,7 +176,6 @@ end IsGaloisTower
 section GaloisCorrespondence
 
 variable {F : Type*} [Field F] {E : Type*} [Field E] [Algebra F E]
-
 variable (H : Subgroup (E ≃ₐ[F] E)) (K : IntermediateField F E)
 
 /-- The intermediate field of fixed points fixed by a monoid action that commutes with the
@@ -353,7 +351,6 @@ theorem of_card_aut_eq_finrank [FiniteDimensional F E]
 #align is_galois.of_card_aut_eq_finrank IsGalois.of_card_aut_eq_finrank
 
 variable {F} {E}
-
 variable {p : F[X]}
 
 theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.IsSplittingField F E]
refactor: use smul_algebraMap to simply proof of FixedPoints.intermediateField.algebraMap_mem' (#11025)

Uses smul_algebraMap to simplify the proof of FixedPoints.intermediateField.algebraMap_mem'.

Amusingly, the current tactic-mode proof is very nearly identical to the body of smul_algebraMap: https://github.com/leanprover-community/mathlib4/blob/bb9eaa6b041bc19ca8615a24fa48e463c672c150/Mathlib/Algebra/Algebra/Basic.lean#L403-L405

After making this simplificiation, I observe the time reported by trace.profiler to drop from 0.13 to 0.12 seconds.

Diff
@@ -186,7 +186,7 @@ def FixedPoints.intermediateField (M : Type*) [Monoid M] [MulSemiringAction M E]
     [SMulCommClass M F E] : IntermediateField F E :=
   { FixedPoints.subfield M E with
     carrier := MulAction.fixedPoints M E
-    algebraMap_mem' := fun a g => by rw [Algebra.algebraMap_eq_smul_one, smul_comm, smul_one] }
+    algebraMap_mem' := fun a g => smul_algebraMap g a }
 #align fixed_points.intermediate_field FixedPoints.intermediateField
 
 namespace IntermediateField
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -418,7 +418,7 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
     apply @Fintype.card_congr _ _ _ (_) _
     rw [IntermediateField.adjoin_zero]
   intro K x hx hK
-  simp only at *
+  simp only [P] at *
   -- Porting note: need to specify two implicit arguments of `finrank_mul_finrank`
   letI := K⟮x⟯.module
   letI := K⟮x⟯.isScalarTower (R := F)
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -114,8 +114,8 @@ theorem card_aut_eq_finrank [FiniteDimensional F E] [IsGalois F E] :
   have H : IsIntegral F α := IsGalois.integral F α
   have h_sep : (minpoly F α).Separable := IsGalois.separable F α
   have h_splits : (minpoly F α).Splits (algebraMap F E) := IsGalois.splits F α
-  replace h_splits : Polynomial.Splits (algebraMap F F⟮α⟯) (minpoly F α)
-  · simpa using
+  replace h_splits : Polynomial.Splits (algebraMap F F⟮α⟯) (minpoly F α) := by
+    simpa using
       Polynomial.splits_comp_of_splits (algebraMap F E) iso.symm.toAlgHom.toRingHom h_splits
   rw [← LinearEquiv.finrank_eq iso.toLinearEquiv]
   rw [← IntermediateField.AdjoinSimple.card_aut_eq_finrank F E H h_sep h_splits]
feat: generalize FiniteDimensional.finrank_mul_finrank (#9046)

Generalize the conditions of the tower law FiniteDimensional.finrank_mul_finrank' in FieldTheory/Tower from [CommRing F] [Algebra F K] to [Ring F] [Module F K], and remove the [Module.Finite F K] and [Module.Finite K A] conditions.

The generalized version applies to situations when we have a tower C/B/A where the A-module structure on C is induced from the B-module structure via a RingHom from A to B, and the A-module structure on B is induced by the same RingHom. In particular, it applies when the A-module structure on B and the B-module structure on C come from two RingHoms, and the A-module structure on C comes from the composition of them, regardless of whether A and B are commutative or not.

As prerequisites, I also generalized lemmas originally introduced by @kckennylau in [mathlib3#3355](https://github.com/leanprover-community/mathlib/pull/3355/files) to prove the tower law. They were split into three PRs:

  • LinearAlgebra/Span #9380: add span_eq_closure and closure_induction which say that Submodule.span R s is generated by R • s as an AddSubmonoid. I feel that the existing span_induction should be replaced by closure_induction as the latter is stronger, and allow us to remove the commutativity condition in span_smul_of_span_eq_top in Algebra/Tower.

  • Algebra/Tower #9382: switching from CommSemiring/Algebra to Semiring/Module here requires proving the curious lemma IsScalarTower.isLinearMap which states that for a tower of modules A/S/R, any S-linear map from S to A is also R-linear. If the map is injective, we can deduce that S/S/R also form a tower. (By ringHomEquivModuleIsScalarTower in #9381, there is therefore a canonical RingHom from R to S.)

  • Lemmas for free modules over rings including finrank_mul_finrank' are moved from FieldTheory/Tower to LinearAlgebra/Dimension/Free

Zulip

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -420,8 +420,9 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
   intro K x hx hK
   simp only at *
   -- Porting note: need to specify two implicit arguments of `finrank_mul_finrank`
-  rw [of_separable_splitting_field_aux hp K (Multiset.mem_toFinset.mp hx), hK,
-    @finrank_mul_finrank _ _ _ _ _ _ _ K⟮x⟯.module _ K⟮x⟯.isScalarTower _]
+  letI := K⟮x⟯.module
+  letI := K⟮x⟯.isScalarTower (R := F)
+  rw [of_separable_splitting_field_aux hp K (Multiset.mem_toFinset.mp hx), hK, finrank_mul_finrank]
   symm
   refine' LinearEquiv.finrank_eq _
   rfl
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_mapRingHom.isIntegralElem_map RingHom.is_integral_of_mem_closureRingHom.IsIntegralElem.of_mem_closure RingHom.is_integral_zero/oneRingHom.isIntegralElem_zero/one RingHom.is_integral_add/neg/sub/mul/of_mul_unitRingHom.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_transRingHom.IsIntegral.trans RingHom.isIntegral_quotient/tower_bot/top_of_isIntegralRingHom.IsIntegral.quotient/tower_bot/top isIntegral_of_mem_closure'IsIntegral.of_mem_closure' (and the '' version) isIntegral_of_surjectiveAlgebra.isIntegral_of_surjective

The next changed file is RingTheory/Algebraic:

  • Rename: of_larger_basetower_top (for consistency with IsIntegral) Algebra.isAlgebraic_of_finiteAlgebra.IsAlgebraic.of_finite Algebra.isAlgebraic_transAlgebra.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
@@ -363,8 +363,7 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
     [Fintype (K →ₐ[F] E)]
     [Fintype (K⟮x⟯.restrictScalars F →ₐ[F] E)] :
     Fintype.card (K⟮x⟯.restrictScalars F →ₐ[F] E) = Fintype.card (K →ₐ[F] E) * finrank K K⟮x⟯ := by
-  have h : IsIntegral K x :=
-    isIntegral_of_isScalarTower (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)
+  have h : IsIntegral K x := (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x).tower_top
   have h1 : p ≠ 0 := fun hp => by
     rw [hp, Polynomial.aroots_zero] at hx
     exact Multiset.not_mem_zero x hx
chore: Scope the adjoin element notation (#7938)
Diff
@@ -35,7 +35,7 @@ Together, these two results prove the Galois correspondence.
 -/
 
 
-open scoped Polynomial
+open scoped Polynomial IntermediateField
 
 open FiniteDimensional AlgEquiv
 
style: fix wrapping of where (#7149)
Diff
@@ -456,8 +456,8 @@ section normalClosure
 variable (k K F : Type*) [Field k] [Field K] [Field F] [Algebra k K] [Algebra k F] [Algebra K F]
   [IsScalarTower k K F] [IsGalois k F]
 
-instance IsGalois.normalClosure : IsGalois k (normalClosure k K F)
-    where to_isSeparable := isSeparable_tower_bot_of_isSeparable k _ F
+instance IsGalois.normalClosure : IsGalois k (normalClosure k K F) where
+  to_isSeparable := isSeparable_tower_bot_of_isSeparable k _ F
 #align is_galois.normal_closure IsGalois.normalClosure
 
 end normalClosure
feat: roots in an algebra (#6740)

Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Diff
@@ -358,7 +358,7 @@ variable {p : F[X]}
 
 theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.IsSplittingField F E]
     (hp : p.Separable) (K : Type*) [Field K] [Algebra F K] [Algebra K E] [IsScalarTower F K E]
-    {x : E} (hx : x ∈ (p.map (algebraMap F E)).roots)
+    {x : E} (hx : x ∈ p.aroots E)
     -- these are both implied by `hFE`, but as they carry data this makes the lemma more general
     [Fintype (K →ₐ[F] E)]
     [Fintype (K⟮x⟯.restrictScalars F →ₐ[F] E)] :
@@ -366,7 +366,7 @@ theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.I
   have h : IsIntegral K x :=
     isIntegral_of_isScalarTower (isIntegral_of_noetherian (IsNoetherian.iff_fg.2 hFE) x)
   have h1 : p ≠ 0 := fun hp => by
-    rw [hp, Polynomial.map_zero, Polynomial.roots_zero] at hx
+    rw [hp, Polynomial.aroots_zero] at hx
     exact Multiset.not_mem_zero x hx
   have h2 : minpoly K x ∣ p.map (algebraMap F K) := by
     apply minpoly.dvd
@@ -396,19 +396,19 @@ theorem of_separable_splitting_field [sp : p.IsSplittingField F E] (hp : p.Separ
     IsGalois F E := by
   haveI hFE : FiniteDimensional F E := Polynomial.IsSplittingField.finiteDimensional E p
   letI := Classical.decEq E
-  let s := (p.map (algebraMap F E)).roots.toFinset
-  have adjoin_root : IntermediateField.adjoin F (s : Set E) = ⊤ := by
+  let s := p.rootSet E
+  have adjoin_root : IntermediateField.adjoin F s = ⊤ := by
     apply IntermediateField.toSubalgebra_injective
     rw [IntermediateField.top_toSubalgebra, ← top_le_iff, ← sp.adjoin_rootSet]
     apply IntermediateField.algebra_adjoin_le_adjoin
   let P : IntermediateField F E → Prop := fun K => Fintype.card (K →ₐ[F] E) = finrank F K
-  suffices P (IntermediateField.adjoin F ↑s) by
+  suffices P (IntermediateField.adjoin F s) by
     rw [adjoin_root] at this
     apply of_card_aut_eq_finrank
     rw [← Eq.trans this (LinearEquiv.finrank_eq IntermediateField.topEquiv.toLinearEquiv)]
     exact Fintype.card_congr ((algEquivEquivAlgHom F E).toEquiv.trans
       (IntermediateField.topEquiv.symm.arrowCongr AlgEquiv.refl))
-  apply IntermediateField.induction_on_adjoin_finset s P
+  apply IntermediateField.induction_on_adjoin_finset _ P
   · have key := IntermediateField.card_algHom_adjoin_integral F (K := E)
       (show IsIntegral F (0 : E) from isIntegral_zero)
     rw [minpoly.zero, Polynomial.natDegree_X] at key
refactor(FieldTheory): remove redundant axiom neg_mem' from IntermediateField (#6669)
Diff
@@ -186,7 +186,6 @@ def FixedPoints.intermediateField (M : Type*) [Monoid M] [MulSemiringAction M E]
     [SMulCommClass M F E] : IntermediateField F E :=
   { FixedPoints.subfield M E with
     carrier := MulAction.fixedPoints M E
-    neg_mem' := fun x => by simp
     algebraMap_mem' := fun a g => by rw [Algebra.algebraMap_eq_smul_one, smul_comm, smul_one] }
 #align fixed_points.intermediate_field FixedPoints.intermediateField
 
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
@@ -41,7 +41,7 @@ open FiniteDimensional AlgEquiv
 
 section
 
-variable (F : Type _) [Field F] (E : Type _) [Field E] [Algebra F E]
+variable (F : Type*) [Field F] (E : Type*) [Field E] [Algebra F E]
 
 /-- A field extension E/F is Galois if it is both separable and normal. Note that in mathlib
 a separable extension of fields is by definition algebraic. -/
@@ -85,7 +85,7 @@ theorem splits [IsGalois F E] (x : E) : (minpoly F x).Splits (algebraMap F E) :=
 
 variable (E)
 
-instance of_fixed_field (G : Type _) [Group G] [Finite G] [MulSemiringAction G E] :
+instance of_fixed_field (G : Type*) [Group G] [Finite G] [MulSemiringAction G E] :
     IsGalois (FixedPoints.subfield G E) E :=
   ⟨⟩
 #align is_galois.of_fixed_field IsGalois.of_fixed_field
@@ -131,7 +131,7 @@ end
 
 section IsGaloisTower
 
-variable (F K E : Type _) [Field F] [Field K] [Field E] {E' : Type _} [Field E'] [Algebra F E']
+variable (F K E : Type*) [Field F] [Field K] [Field E] {E' : Type*} [Field E'] [Algebra F E']
 
 variable [Algebra F K] [Algebra F E] [Algebra K E] [IsScalarTower F K E]
 
@@ -176,13 +176,13 @@ end IsGaloisTower
 
 section GaloisCorrespondence
 
-variable {F : Type _} [Field F] {E : Type _} [Field E] [Algebra F E]
+variable {F : Type*} [Field F] {E : Type*} [Field E] [Algebra F E]
 
 variable (H : Subgroup (E ≃ₐ[F] E)) (K : IntermediateField F E)
 
 /-- The intermediate field of fixed points fixed by a monoid action that commutes with the
 `F`-action on `E`. -/
-def FixedPoints.intermediateField (M : Type _) [Monoid M] [MulSemiringAction M E]
+def FixedPoints.intermediateField (M : Type*) [Monoid M] [MulSemiringAction M E]
     [SMulCommClass M F E] : IntermediateField F E :=
   { FixedPoints.subfield M E with
     carrier := MulAction.fixedPoints M E
@@ -317,7 +317,7 @@ end GaloisCorrespondence
 
 section GaloisEquivalentDefinitions
 
-variable (F : Type _) [Field F] (E : Type _) [Field E] [Algebra F E]
+variable (F : Type*) [Field F] (E : Type*) [Field E] [Algebra F E]
 
 namespace IsGalois
 
@@ -358,7 +358,7 @@ variable {F} {E}
 variable {p : F[X]}
 
 theorem of_separable_splitting_field_aux [hFE : FiniteDimensional F E] [sp : p.IsSplittingField F E]
-    (hp : p.Separable) (K : Type _) [Field K] [Algebra F K] [Algebra K E] [IsScalarTower F K E]
+    (hp : p.Separable) (K : Type*) [Field K] [Algebra F K] [Algebra K E] [IsScalarTower F K E]
     {x : E} (hx : x ∈ (p.map (algebraMap F E)).roots)
     -- these are both implied by `hFE`, but as they carry data this makes the lemma more general
     [Fintype (K →ₐ[F] E)]
@@ -454,7 +454,7 @@ end GaloisEquivalentDefinitions
 
 section normalClosure
 
-variable (k K F : Type _) [Field k] [Field K] [Field F] [Algebra k K] [Algebra k F] [Algebra K F]
+variable (k K F : Type*) [Field k] [Field K] [Field F] [Algebra k K] [Algebra k F] [Algebra K F]
   [IsScalarTower k K F] [IsGalois k F]
 
 instance IsGalois.normalClosure : IsGalois k (normalClosure k K F)
@@ -465,7 +465,7 @@ end normalClosure
 
 section IsAlgClosure
 
-instance (priority := 100) IsAlgClosure.isGalois (k K : Type _) [Field k] [Field K] [Algebra k K]
+instance (priority := 100) IsAlgClosure.isGalois (k K : Type*) [Field k] [Field K] [Algebra k K]
     [IsAlgClosure k K] [CharZero k] : IsGalois k K where
 #align is_alg_closure.is_galois IsAlgClosure.isGalois
 
refactor(FieldTheory/NormalClosure): move to new file (#6273)

This PR moves normalClosure to a separate file, in preparation for #6163.

Co-authored-by: Thomas Browning <tb65536@users.noreply.github.com>

Diff
@@ -3,8 +3,9 @@ Copyright (c) 2020 Thomas Browning, Patrick Lutz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
 -/
-import Mathlib.FieldTheory.PrimitiveElement
 import Mathlib.FieldTheory.Fixed
+import Mathlib.FieldTheory.NormalClosure
+import Mathlib.FieldTheory.PrimitiveElement
 import Mathlib.GroupTheory.GroupAction.FixingSubgroup
 
 #align_import field_theory.galois from "leanprover-community/mathlib"@"9fb8964792b4237dac6200193a0d533f1b3f7423"
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,16 +2,13 @@
 Copyright (c) 2020 Thomas Browning, Patrick Lutz. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Thomas Browning, Patrick Lutz
-
-! This file was ported from Lean 3 source module field_theory.galois
-! leanprover-community/mathlib commit 9fb8964792b4237dac6200193a0d533f1b3f7423
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.FieldTheory.PrimitiveElement
 import Mathlib.FieldTheory.Fixed
 import Mathlib.GroupTheory.GroupAction.FixingSubgroup
 
+#align_import field_theory.galois from "leanprover-community/mathlib"@"9fb8964792b4237dac6200193a0d533f1b3f7423"
+
 /-!
 # Galois Extensions
 
feat: port FieldTheory.Galois (#5115)

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Dependencies 10 + 690

691 files ported (98.6%)
284353 lines ported (98.8%)
Show graph

The unported dependencies are