field_theory.is_alg_closed.basicMathlib.FieldTheory.IsAlgClosed.Basic

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
@@ -97,7 +97,7 @@ theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z
   · rw [degree_X_pow_sub_C hn x]
     exact ne_of_gt (WithBot.coe_lt_coe.2 hn)
   use z
-  simp only [eval_C, eval_X, eval_pow, eval_sub, is_root.def] at hz 
+  simp only [eval_C, eval_X, eval_pow, eval_sub, is_root.def] at hz
   exact sub_eq_zero.1 hz
 #align is_alg_closed.exists_pow_nat_eq IsAlgClosed.exists_pow_nat_eq
 -/
@@ -117,7 +117,7 @@ theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} : p.roots = 0 ↔ p = Polyn
   cases' le_or_lt (degree p) 0 with hd hd
   · exact eq_C_of_degree_le_zero hd
   · obtain ⟨z, hz⟩ := IsAlgClosed.exists_root p hd.ne'
-    rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz 
+    rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz
     simpa using hz
 #align is_alg_closed.roots_eq_zero_iff IsAlgClosed.roots_eq_zero_iff
 -/
@@ -185,7 +185,7 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
   have h : (minpoly k x).degree = 1 := degree_eq_one_of_irreducible k (minpoly.irreducible (hf x))
   have : aeval x (minpoly k x) = 0 := minpoly.aeval k x
   rw [eq_X_add_C_of_degree_eq_one h, hq, C_1, one_mul, aeval_add, aeval_X, aeval_C,
-    add_eq_zero_iff_eq_neg] at this 
+    add_eq_zero_iff_eq_neg] at this
   exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
 #align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
 -/
@@ -275,7 +275,7 @@ theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x,
   Iff.rfl
 #align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
 
-theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ;
+theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h;
   cases h; assumption
 #align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
 
@@ -316,7 +316,7 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
         intro x
         simp [ub]
         rfl⟩⟩
-  else by rw [Set.not_nonempty_iff_eq_empty] at hcn ; simp [hcn]
+  else by rw [Set.not_nonempty_iff_eq_empty] at hcn; simp [hcn]
 #align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
 
 variable (hL M)
Diff
@@ -612,8 +612,8 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
   have hx : aeval x (minpoly F x) = 0 := minpoly.aeval F x
   letI : Algebra Fx A := (AdjoinRoot.lift (algebraMap F A) a ha).toAlgebra
   letI : Algebra Fx K := (AdjoinRoot.lift (algebraMap F K) x hx).toAlgebra
-  haveI : IsScalarTower F Fx A := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ a ha)
-  haveI : IsScalarTower F Fx K := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ x hx)
+  haveI : IsScalarTower F Fx A := IsScalarTower.of_algHom (AdjoinRoot.liftHom _ a ha)
+  haveI : IsScalarTower F Fx K := IsScalarTower.of_algHom (AdjoinRoot.liftHom _ x hx)
   haveI : Fact (Irreducible <| minpoly F x) := ⟨minpoly.irreducible <| this x⟩
   let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.IsAlgebraic.tower_top F Fx hK)
   exact
Diff
@@ -348,7 +348,7 @@ theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier =
     IsAlgClosed.exists_aeval_eq_zero M (minpoly N x)
       (ne_of_gt
         (minpoly.degree_pos
-          (isAlgebraic_iff_isIntegral.1 (Algebra.isAlgebraic_of_larger_base _ _ hL x)))) with
+          (isAlgebraic_iff_isIntegral.1 (Algebra.IsAlgebraic.tower_top _ _ hL x)))) with
     y hy
   let O : Subalgebra N L := Algebra.adjoin N {(x : L)}
   let larger_emb :=
@@ -465,8 +465,8 @@ noncomputable def equiv : L ≃ₐ[R] M :=
       show Function.Surjective (algebraMap L M)
       exact
         IsAlgClosed.algebraMap_surjective_of_isAlgebraic
-          (Algebra.isAlgebraic_of_larger_base_of_injective
-            (NoZeroSMulDivisors.algebraMap_injective R _) IsAlgClosure.algebraic)⟩
+          (Algebra.IsAlgebraic.tower_top_of_injective (NoZeroSMulDivisors.algebraMap_injective R _)
+            IsAlgClosure.algebraic)⟩
 #align is_alg_closure.equiv IsAlgClosure.equiv
 -/
 
@@ -482,7 +482,7 @@ variable [Algebra K J] [Algebra J L] [IsAlgClosure J L] [Algebra K L] [IsScalarT
 /-- If `J` is an algebraic extension of `K` and `L` is an algebraic closure of `J`, then it is
   also an algebraic closure of `K`. -/
 theorem ofAlgebraic (hKJ : Algebra.IsAlgebraic K J) : IsAlgClosure K L :=
-  ⟨IsAlgClosure.alg_closed J, Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic⟩
+  ⟨IsAlgClosure.alg_closed J, Algebra.IsAlgebraic.trans hKJ IsAlgClosure.algebraic⟩
 #align is_alg_closure.of_algebraic IsAlgClosure.ofAlgebraic
 -/
 
@@ -510,7 +510,7 @@ noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
 /-- A (random) isomorphism between an algebraic closure of `K` and an algebraic closure
   of an algebraic extension of `K` -/
 noncomputable def equivOfAlgebraic (hKJ : Algebra.IsAlgebraic K J) : L ≃ₐ[K] M :=
-  equivOfAlgebraic' K J _ _ (Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic)
+  equivOfAlgebraic' K J _ _ (Algebra.IsAlgebraic.trans hKJ IsAlgClosure.algebraic)
 #align is_alg_closure.equiv_of_algebraic IsAlgClosure.equivOfAlgebraic
 -/
 
@@ -540,7 +540,7 @@ noncomputable def equivOfEquivAux (hSR : S ≃+* R) :
   haveI : NoZeroSMulDivisors R S := NoZeroSMulDivisors.of_algebraMap_injective hSR.symm.injective
   refine'
     ⟨equiv_of_algebraic' R S L M
-        (Algebra.isAlgebraic_of_larger_base_of_injective
+        (Algebra.IsAlgebraic.tower_top_of_injective
           (show Function.Injective (algebraMap S R) from hSR.injective) IsAlgClosure.algebraic),
       _⟩
   ext
@@ -615,7 +615,7 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
   haveI : IsScalarTower F Fx A := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ a ha)
   haveI : IsScalarTower F Fx K := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ x hx)
   haveI : Fact (Irreducible <| minpoly F x) := ⟨minpoly.irreducible <| this x⟩
-  let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base F Fx hK)
+  let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.IsAlgebraic.tower_top F Fx hK)
   exact
     ⟨ψ₀.restrict_scalars F,
       (congr_arg ψ₀ (AdjoinRoot.lift_root hx).symm).trans <|
Diff
@@ -251,42 +251,35 @@ variable (K L M)
 
 open Subalgebra AlgHom Function
 
-#print IsAlgClosed.lift.SubfieldWithHom /-
 /-- This structure is used to prove the existence of a homomorphism from any algebraic extension
 into an algebraic closure -/
-structure IsAlgClosed.lift.SubfieldWithHom where
+structure SubfieldWithHom where
   carrier : Subalgebra K L
   emb : carrier →ₐ[K] M
-#align lift.subfield_with_hom IsAlgClosed.lift.SubfieldWithHom
--/
+#align lift.subfield_with_hom lift.SubfieldWithHom
 
 variable {K L M hL}
 
 namespace SubfieldWithHom
 
-variable {E₁ E₂ E₃ : IsAlgClosed.lift.SubfieldWithHom K L M hL}
+variable {E₁ E₂ E₃ : SubfieldWithHom K L M hL}
 
-instance : LE (IsAlgClosed.lift.SubfieldWithHom K L M hL)
+instance : LE (SubfieldWithHom K L M hL)
     where le E₁ E₂ := ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x
 
-noncomputable instance : Inhabited (IsAlgClosed.lift.SubfieldWithHom K L M hL) :=
+noncomputable instance : Inhabited (SubfieldWithHom K L M hL) :=
   ⟨{  carrier := ⊥
       emb := (Algebra.ofId K M).comp (Algebra.botEquiv K L).toAlgHom }⟩
 
-#print IsAlgClosed.lift.SubfieldWithHom.le_def /-
-theorem IsAlgClosed.lift.SubfieldWithHom.le_def :
-    E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
+theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
   Iff.rfl
-#align lift.subfield_with_hom.le_def IsAlgClosed.lift.SubfieldWithHom.le_def
--/
+#align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
 
-#print IsAlgClosed.lift.SubfieldWithHom.compat /-
-theorem IsAlgClosed.lift.SubfieldWithHom.compat (h : E₁ ≤ E₂) :
-    ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ; cases h; assumption
-#align lift.subfield_with_hom.compat IsAlgClosed.lift.SubfieldWithHom.compat
--/
+theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ;
+  cases h; assumption
+#align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
 
-instance : Preorder (IsAlgClosed.lift.SubfieldWithHom K L M hL)
+instance : Preorder (SubfieldWithHom K L M hL)
     where
   le := (· ≤ ·)
   le_refl E := ⟨le_rfl, by simp⟩
@@ -296,12 +289,10 @@ instance : Preorder (IsAlgClosed.lift.SubfieldWithHom K L M hL)
 
 open Lattice
 
-#print IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded /-
-theorem IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
-    (c : Set (IsAlgClosed.lift.SubfieldWithHom K L M hL)) (hc : IsChain (· ≤ ·) c) :
-    ∃ ub : IsAlgClosed.lift.SubfieldWithHom K L M hL, ∀ N, N ∈ c → N ≤ ub :=
+theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL))
+    (hc : IsChain (· ≤ ·) c) : ∃ ub : SubfieldWithHom K L M hL, ∀ N, N ∈ c → N ≤ ub :=
   if hcn : c.Nonempty then
-    let ub : IsAlgClosed.lift.SubfieldWithHom K L M hL :=
+    let ub : SubfieldWithHom K L M hL :=
       haveI : Nonempty c := Set.Nonempty.to_subtype hcn
       { carrier := ⨆ i : c, (i : subfield_with_hom K L M hL).carrier
         emb :=
@@ -320,45 +311,32 @@ theorem IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
                   inclusion_self, AlgHom.id_apply x])
             _ rfl }
     ⟨ub, fun N hN =>
-      ⟨(le_iSup (fun i : c => (i : IsAlgClosed.lift.SubfieldWithHom K L M hL).carrier) ⟨N, hN⟩ : _),
+      ⟨(le_iSup (fun i : c => (i : SubfieldWithHom K L M hL).carrier) ⟨N, hN⟩ : _),
         by
         intro x
         simp [ub]
         rfl⟩⟩
   else by rw [Set.not_nonempty_iff_eq_empty] at hcn ; simp [hcn]
-#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
--/
+#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
 
 variable (hL M)
 
-#print IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom /-
-theorem IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom :
-    ∃ E : IsAlgClosed.lift.SubfieldWithHom K L M hL, ∀ N, E ≤ N → N ≤ E :=
-  exists_maximal_of_chains_bounded
-    IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded fun _ _ _ => le_trans
-#align lift.subfield_with_hom.exists_maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom
--/
+theorem exists_maximal_subfieldWithHom : ∃ E : SubfieldWithHom K L M hL, ∀ N, E ≤ N → N ≤ E :=
+  exists_maximal_of_chains_bounded maximal_subfieldWithHom_chain_bounded fun _ _ _ => le_trans
+#align lift.subfield_with_hom.exists_maximal_subfield_with_hom lift.SubfieldWithHom.exists_maximal_subfieldWithHom
 
-#print IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom /-
 /-- The maximal `subfield_with_hom`. We later prove that this is equal to `⊤`. -/
-noncomputable def IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom :
-    IsAlgClosed.lift.SubfieldWithHom K L M hL :=
-  Classical.choose (IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom M hL)
-#align lift.subfield_with_hom.maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom
--/
+noncomputable def maximalSubfieldWithHom : SubfieldWithHom K L M hL :=
+  Classical.choose (exists_maximal_subfieldWithHom M hL)
+#align lift.subfield_with_hom.maximal_subfield_with_hom lift.SubfieldWithHom.maximalSubfieldWithHom
 
-#print IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal /-
-theorem IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal :
-    ∀ N : IsAlgClosed.lift.SubfieldWithHom K L M hL,
-      IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL ≤ N →
-        N ≤ IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL :=
-  Classical.choose_spec (IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom M hL)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
--/
+theorem maximalSubfieldWithHom_is_maximal :
+    ∀ N : SubfieldWithHom K L M hL,
+      maximalSubfieldWithHom M hL ≤ N → N ≤ maximalSubfieldWithHom M hL :=
+  Classical.choose_spec (exists_maximal_subfieldWithHom M hL)
+#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
 
-#print IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top /-
-theorem IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top :
-    (IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL).carrier = ⊤ :=
+theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier = ⊤ :=
   by
   rw [eq_top_iff]
   intro x _
@@ -391,8 +369,7 @@ theorem IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top :
     simp only [O', restrict_scalars_apply, AlgHom.commutes]
   refine' (maximal_subfield_with_hom_is_maximal M hL O' hO').fst _
   exact Algebra.subset_adjoin (Set.mem_singleton x)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
--/
+#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
 
 end SubfieldWithHom
 
@@ -407,9 +384,8 @@ variable (K L M)
 
 /-- Less general version of `lift`. -/
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
-  (IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL).emb.comp <|
-    Eq.recOn (IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top M hL).symm
-      Algebra.toTop
+  (lift.SubfieldWithHom.maximalSubfieldWithHom M hL).emb.comp <|
+    Eq.recOn (lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top M hL).symm Algebra.toTop
 
 variable {R : Type u} [CommRing R]
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2020 Kenny Lau. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
 -/
-import Mathbin.FieldTheory.Normal
-import Mathbin.FieldTheory.PerfectClosure
-import Mathbin.RingTheory.Localization.Integral
+import FieldTheory.Normal
+import FieldTheory.PerfectClosure
+import RingTheory.Localization.Integral
 
 #align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
 
Diff
@@ -251,41 +251,42 @@ variable (K L M)
 
 open Subalgebra AlgHom Function
 
-#print lift.SubfieldWithHom /-
+#print IsAlgClosed.lift.SubfieldWithHom /-
 /-- This structure is used to prove the existence of a homomorphism from any algebraic extension
 into an algebraic closure -/
-structure SubfieldWithHom where
+structure IsAlgClosed.lift.SubfieldWithHom where
   carrier : Subalgebra K L
   emb : carrier →ₐ[K] M
-#align lift.subfield_with_hom lift.SubfieldWithHom
+#align lift.subfield_with_hom IsAlgClosed.lift.SubfieldWithHom
 -/
 
 variable {K L M hL}
 
 namespace SubfieldWithHom
 
-variable {E₁ E₂ E₃ : SubfieldWithHom K L M hL}
+variable {E₁ E₂ E₃ : IsAlgClosed.lift.SubfieldWithHom K L M hL}
 
-instance : LE (SubfieldWithHom K L M hL)
+instance : LE (IsAlgClosed.lift.SubfieldWithHom K L M hL)
     where le E₁ E₂ := ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x
 
-noncomputable instance : Inhabited (SubfieldWithHom K L M hL) :=
+noncomputable instance : Inhabited (IsAlgClosed.lift.SubfieldWithHom K L M hL) :=
   ⟨{  carrier := ⊥
       emb := (Algebra.ofId K M).comp (Algebra.botEquiv K L).toAlgHom }⟩
 
-#print lift.SubfieldWithHom.le_def /-
-theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
+#print IsAlgClosed.lift.SubfieldWithHom.le_def /-
+theorem IsAlgClosed.lift.SubfieldWithHom.le_def :
+    E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
   Iff.rfl
-#align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
+#align lift.subfield_with_hom.le_def IsAlgClosed.lift.SubfieldWithHom.le_def
 -/
 
-#print lift.SubfieldWithHom.compat /-
-theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ;
-  cases h; assumption
-#align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
+#print IsAlgClosed.lift.SubfieldWithHom.compat /-
+theorem IsAlgClosed.lift.SubfieldWithHom.compat (h : E₁ ≤ E₂) :
+    ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ; cases h; assumption
+#align lift.subfield_with_hom.compat IsAlgClosed.lift.SubfieldWithHom.compat
 -/
 
-instance : Preorder (SubfieldWithHom K L M hL)
+instance : Preorder (IsAlgClosed.lift.SubfieldWithHom K L M hL)
     where
   le := (· ≤ ·)
   le_refl E := ⟨le_rfl, by simp⟩
@@ -295,11 +296,12 @@ instance : Preorder (SubfieldWithHom K L M hL)
 
 open Lattice
 
-#print lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded /-
-theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL))
-    (hc : IsChain (· ≤ ·) c) : ∃ ub : SubfieldWithHom K L M hL, ∀ N, N ∈ c → N ≤ ub :=
+#print IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded /-
+theorem IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
+    (c : Set (IsAlgClosed.lift.SubfieldWithHom K L M hL)) (hc : IsChain (· ≤ ·) c) :
+    ∃ ub : IsAlgClosed.lift.SubfieldWithHom K L M hL, ∀ N, N ∈ c → N ≤ ub :=
   if hcn : c.Nonempty then
-    let ub : SubfieldWithHom K L M hL :=
+    let ub : IsAlgClosed.lift.SubfieldWithHom K L M hL :=
       haveI : Nonempty c := Set.Nonempty.to_subtype hcn
       { carrier := ⨆ i : c, (i : subfield_with_hom K L M hL).carrier
         emb :=
@@ -318,40 +320,45 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
                   inclusion_self, AlgHom.id_apply x])
             _ rfl }
     ⟨ub, fun N hN =>
-      ⟨(le_iSup (fun i : c => (i : SubfieldWithHom K L M hL).carrier) ⟨N, hN⟩ : _),
+      ⟨(le_iSup (fun i : c => (i : IsAlgClosed.lift.SubfieldWithHom K L M hL).carrier) ⟨N, hN⟩ : _),
         by
         intro x
         simp [ub]
         rfl⟩⟩
   else by rw [Set.not_nonempty_iff_eq_empty] at hcn ; simp [hcn]
-#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
+#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
 -/
 
 variable (hL M)
 
-#print lift.SubfieldWithHom.exists_maximal_subfieldWithHom /-
-theorem exists_maximal_subfieldWithHom : ∃ E : SubfieldWithHom K L M hL, ∀ N, E ≤ N → N ≤ E :=
-  exists_maximal_of_chains_bounded maximal_subfieldWithHom_chain_bounded fun _ _ _ => le_trans
-#align lift.subfield_with_hom.exists_maximal_subfield_with_hom lift.SubfieldWithHom.exists_maximal_subfieldWithHom
+#print IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom /-
+theorem IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom :
+    ∃ E : IsAlgClosed.lift.SubfieldWithHom K L M hL, ∀ N, E ≤ N → N ≤ E :=
+  exists_maximal_of_chains_bounded
+    IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded fun _ _ _ => le_trans
+#align lift.subfield_with_hom.exists_maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom
 -/
 
-#print lift.SubfieldWithHom.maximalSubfieldWithHom /-
+#print IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom /-
 /-- The maximal `subfield_with_hom`. We later prove that this is equal to `⊤`. -/
-noncomputable def maximalSubfieldWithHom : SubfieldWithHom K L M hL :=
-  Classical.choose (exists_maximal_subfieldWithHom M hL)
-#align lift.subfield_with_hom.maximal_subfield_with_hom lift.SubfieldWithHom.maximalSubfieldWithHom
+noncomputable def IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom :
+    IsAlgClosed.lift.SubfieldWithHom K L M hL :=
+  Classical.choose (IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom M hL)
+#align lift.subfield_with_hom.maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom
 -/
 
-#print lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal /-
-theorem maximalSubfieldWithHom_is_maximal :
-    ∀ N : SubfieldWithHom K L M hL,
-      maximalSubfieldWithHom M hL ≤ N → N ≤ maximalSubfieldWithHom M hL :=
-  Classical.choose_spec (exists_maximal_subfieldWithHom M hL)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
+#print IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal /-
+theorem IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal :
+    ∀ N : IsAlgClosed.lift.SubfieldWithHom K L M hL,
+      IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL ≤ N →
+        N ≤ IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL :=
+  Classical.choose_spec (IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom M hL)
+#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
 -/
 
-#print lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top /-
-theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier = ⊤ :=
+#print IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top /-
+theorem IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top :
+    (IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL).carrier = ⊤ :=
   by
   rw [eq_top_iff]
   intro x _
@@ -384,7 +391,7 @@ theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier =
     simp only [O', restrict_scalars_apply, AlgHom.commutes]
   refine' (maximal_subfield_with_hom_is_maximal M hL O' hO').fst _
   exact Algebra.subset_adjoin (Set.mem_singleton x)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
+#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
 -/
 
 end SubfieldWithHom
@@ -400,8 +407,9 @@ variable (K L M)
 
 /-- Less general version of `lift`. -/
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
-  (lift.SubfieldWithHom.maximalSubfieldWithHom M hL).emb.comp <|
-    Eq.recOn (lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top M hL).symm Algebra.toTop
+  (IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom M hL).emb.comp <|
+    Eq.recOn (IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top M hL).symm
+      Algebra.toTop
 
 variable {R : Type u} [CommRing R]
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2020 Kenny Lau. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
-
-! This file was ported from Lean 3 source module field_theory.is_alg_closed.basic
-! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
-! 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.PerfectClosure
 import Mathbin.RingTheory.Localization.Integral
 
+#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"fd4551cfe4b7484b81c2c9ba3405edae27659676"
+
 /-!
 # Algebraically Closed Field
 
Diff
@@ -62,6 +62,7 @@ class IsAlgClosed : Prop where
 #align is_alg_closed IsAlgClosed
 -/
 
+#print IsAlgClosed.splits_codomain /-
 /-- Every polynomial splits in the field extension `f : K →+* k` if `k` is algebraically closed.
 
 See also `is_alg_closed.splits_domain` for the case where `K` is algebraically closed.
@@ -69,7 +70,9 @@ See also `is_alg_closed.splits_domain` for the case where `K` is algebraically c
 theorem IsAlgClosed.splits_codomain {k K : Type _} [Field k] [IsAlgClosed k] [Field K] {f : K →+* k}
     (p : K[X]) : p.Splits f := by convert IsAlgClosed.splits (p.map f); simp [splits_map_iff]
 #align is_alg_closed.splits_codomain IsAlgClosed.splits_codomain
+-/
 
+#print IsAlgClosed.splits_domain /-
 /-- Every polynomial splits in the field extension `f : K →+* k` if `K` is algebraically closed.
 
 See also `is_alg_closed.splits_codomain` for the case where `k` is algebraically closed.
@@ -78,6 +81,7 @@ theorem IsAlgClosed.splits_domain {k K : Type _} [Field k] [IsAlgClosed k] [Fiel
     (p : k[X]) : p.Splits f :=
   Polynomial.splits_of_splits_id _ <| IsAlgClosed.splits _
 #align is_alg_closed.splits_domain IsAlgClosed.splits_domain
+-/
 
 namespace IsAlgClosed
 
@@ -89,6 +93,7 @@ theorem exists_root [IsAlgClosed k] (p : k[X]) (hp : p.degree ≠ 0) : ∃ x, Is
 #align is_alg_closed.exists_root IsAlgClosed.exists_root
 -/
 
+#print IsAlgClosed.exists_pow_nat_eq /-
 theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z, z ^ n = x :=
   by
   rcases exists_root (X ^ n - C x) _ with ⟨z, hz⟩; swap
@@ -98,13 +103,17 @@ theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z
   simp only [eval_C, eval_X, eval_pow, eval_sub, is_root.def] at hz 
   exact sub_eq_zero.1 hz
 #align is_alg_closed.exists_pow_nat_eq IsAlgClosed.exists_pow_nat_eq
+-/
 
+#print IsAlgClosed.exists_eq_mul_self /-
 theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z :=
   by
   rcases exists_pow_nat_eq x zero_lt_two with ⟨z, rfl⟩
   exact ⟨z, sq z⟩
 #align is_alg_closed.exists_eq_mul_self IsAlgClosed.exists_eq_mul_self
+-/
 
+#print IsAlgClosed.roots_eq_zero_iff /-
 theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} : p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) :=
   by
   refine' ⟨fun h => _, fun hp => by rw [hp, roots_C]⟩
@@ -114,31 +123,41 @@ theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} : p.roots = 0 ↔ p = Polyn
     rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz 
     simpa using hz
 #align is_alg_closed.roots_eq_zero_iff IsAlgClosed.roots_eq_zero_iff
+-/
 
+#print IsAlgClosed.exists_eval₂_eq_zero_of_injective /-
 theorem exists_eval₂_eq_zero_of_injective {R : Type _} [Ring R] [IsAlgClosed k] (f : R →+* k)
     (hf : Function.Injective f) (p : R[X]) (hp : p.degree ≠ 0) : ∃ x, p.eval₂ f x = 0 :=
   let ⟨x, hx⟩ := exists_root (p.map f) (by rwa [degree_map_eq_of_injective hf])
   ⟨x, by rwa [eval₂_eq_eval_map, ← is_root]⟩
 #align is_alg_closed.exists_eval₂_eq_zero_of_injective IsAlgClosed.exists_eval₂_eq_zero_of_injective
+-/
 
+#print IsAlgClosed.exists_eval₂_eq_zero /-
 theorem exists_eval₂_eq_zero {R : Type _} [Field R] [IsAlgClosed k] (f : R →+* k) (p : R[X])
     (hp : p.degree ≠ 0) : ∃ x, p.eval₂ f x = 0 :=
   exists_eval₂_eq_zero_of_injective f f.Injective p hp
 #align is_alg_closed.exists_eval₂_eq_zero IsAlgClosed.exists_eval₂_eq_zero
+-/
 
 variable (k)
 
+#print IsAlgClosed.exists_aeval_eq_zero_of_injective /-
 theorem exists_aeval_eq_zero_of_injective {R : Type _} [CommRing R] [IsAlgClosed k] [Algebra R k]
     (hinj : Function.Injective (algebraMap R k)) (p : R[X]) (hp : p.degree ≠ 0) :
     ∃ x : k, aeval x p = 0 :=
   exists_eval₂_eq_zero_of_injective (algebraMap R k) hinj p hp
 #align is_alg_closed.exists_aeval_eq_zero_of_injective IsAlgClosed.exists_aeval_eq_zero_of_injective
+-/
 
+#print IsAlgClosed.exists_aeval_eq_zero /-
 theorem exists_aeval_eq_zero {R : Type _} [Field R] [IsAlgClosed k] [Algebra R k] (p : R[X])
     (hp : p.degree ≠ 0) : ∃ x : k, aeval x p = 0 :=
   exists_eval₂_eq_zero (algebraMap R k) p hp
 #align is_alg_closed.exists_aeval_eq_zero IsAlgClosed.exists_aeval_eq_zero
+-/
 
+#print IsAlgClosed.of_exists_root /-
 theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → ∃ x, p.eval x = 0) :
     IsAlgClosed k :=
   ⟨fun p =>
@@ -150,12 +169,16 @@ theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → ∃ x, p
       let ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.NeZero) this
       degree_mul_leadingCoeff_inv q hq.NeZero ▸ degree_eq_one_of_irreducible_of_root this hx⟩
 #align is_alg_closed.of_exists_root IsAlgClosed.of_exists_root
+-/
 
+#print IsAlgClosed.degree_eq_one_of_irreducible /-
 theorem degree_eq_one_of_irreducible [IsAlgClosed k] {p : k[X]} (hp : Irreducible p) :
     p.degree = 1 :=
   degree_eq_one_of_irreducible_of_splits hp (IsAlgClosed.splits_codomain _)
 #align is_alg_closed.degree_eq_one_of_irreducible IsAlgClosed.degree_eq_one_of_irreducible
+-/
 
+#print IsAlgClosed.algebraMap_surjective_of_isIntegral /-
 theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [IsDomain K]
     [hk : IsAlgClosed k] [Algebra k K] (hf : Algebra.IsIntegral k K) :
     Function.Surjective (algebraMap k K) :=
@@ -168,26 +191,33 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
     add_eq_zero_iff_eq_neg] at this 
   exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
 #align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
+-/
 
+#print IsAlgClosed.algebraMap_surjective_of_isIntegral' /-
 theorem algebraMap_surjective_of_isIntegral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
     [hk : IsAlgClosed k] (f : k →+* K) (hf : f.IsIntegral) : Function.Surjective f :=
   @algebraMap_surjective_of_isIntegral k K _ _ _ _ f.toAlgebra hf
 #align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebraMap_surjective_of_isIntegral'
+-/
 
+#print IsAlgClosed.algebraMap_surjective_of_isAlgebraic /-
 theorem algebraMap_surjective_of_isAlgebraic {k K : Type _} [Field k] [Ring K] [IsDomain K]
     [hk : IsAlgClosed k] [Algebra k K] (hf : Algebra.IsAlgebraic k K) :
     Function.Surjective (algebraMap k K) :=
   algebraMap_surjective_of_isIntegral (Algebra.isAlgebraic_iff_isIntegral.mp hf)
 #align is_alg_closed.algebra_map_surjective_of_is_algebraic IsAlgClosed.algebraMap_surjective_of_isAlgebraic
+-/
 
 end IsAlgClosed
 
+#print IsAlgClosure /-
 /-- Typeclass for an extension being an algebraic closure. -/
 class IsAlgClosure (R : Type u) (K : Type v) [CommRing R] [Field K] [Algebra R K]
     [NoZeroSMulDivisors R K] : Prop where
   alg_closed : IsAlgClosed K
   algebraic : Algebra.IsAlgebraic R K
 #align is_alg_closure IsAlgClosure
+-/
 
 #print isAlgClosure_iff /-
 theorem isAlgClosure_iff (K : Type v) [Field K] [Algebra k K] :
@@ -204,11 +234,13 @@ instance (priority := 100) IsAlgClosure.normal (R K : Type _) [Field R] [Field K
 #align is_alg_closure.normal IsAlgClosure.normal
 -/
 
+#print IsAlgClosure.separable /-
 instance (priority := 100) IsAlgClosure.separable (R K : Type _) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] [CharZero R] : IsSeparable R K :=
   ⟨fun _ => isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _), fun _ =>
     (minpoly.irreducible (isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _))).Separable⟩
 #align is_alg_closure.separable IsAlgClosure.separable
+-/
 
 namespace lift
 
@@ -220,16 +252,16 @@ variable {K : Type u} {L : Type v} {M : Type w} [Field K] [Field L] [Algebra K L
 
 variable (K L M)
 
-include hL
-
 open Subalgebra AlgHom Function
 
+#print lift.SubfieldWithHom /-
 /-- This structure is used to prove the existence of a homomorphism from any algebraic extension
 into an algebraic closure -/
 structure SubfieldWithHom where
   carrier : Subalgebra K L
   emb : carrier →ₐ[K] M
 #align lift.subfield_with_hom lift.SubfieldWithHom
+-/
 
 variable {K L M hL}
 
@@ -244,13 +276,17 @@ noncomputable instance : Inhabited (SubfieldWithHom K L M hL) :=
   ⟨{  carrier := ⊥
       emb := (Algebra.ofId K M).comp (Algebra.botEquiv K L).toAlgHom }⟩
 
+#print lift.SubfieldWithHom.le_def /-
 theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
   Iff.rfl
 #align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
+-/
 
+#print lift.SubfieldWithHom.compat /-
 theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ;
   cases h; assumption
 #align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
+-/
 
 instance : Preorder (SubfieldWithHom K L M hL)
     where
@@ -262,6 +298,7 @@ instance : Preorder (SubfieldWithHom K L M hL)
 
 open Lattice
 
+#print lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded /-
 theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL))
     (hc : IsChain (· ≤ ·) c) : ∃ ub : SubfieldWithHom K L M hL, ∀ N, N ∈ c → N ≤ ub :=
   if hcn : c.Nonempty then
@@ -291,12 +328,15 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
         rfl⟩⟩
   else by rw [Set.not_nonempty_iff_eq_empty] at hcn ; simp [hcn]
 #align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
+-/
 
 variable (hL M)
 
+#print lift.SubfieldWithHom.exists_maximal_subfieldWithHom /-
 theorem exists_maximal_subfieldWithHom : ∃ E : SubfieldWithHom K L M hL, ∀ N, E ≤ N → N ≤ E :=
   exists_maximal_of_chains_bounded maximal_subfieldWithHom_chain_bounded fun _ _ _ => le_trans
 #align lift.subfield_with_hom.exists_maximal_subfield_with_hom lift.SubfieldWithHom.exists_maximal_subfieldWithHom
+-/
 
 #print lift.SubfieldWithHom.maximalSubfieldWithHom /-
 /-- The maximal `subfield_with_hom`. We later prove that this is equal to `⊤`. -/
@@ -305,11 +345,13 @@ noncomputable def maximalSubfieldWithHom : SubfieldWithHom K L M hL :=
 #align lift.subfield_with_hom.maximal_subfield_with_hom lift.SubfieldWithHom.maximalSubfieldWithHom
 -/
 
+#print lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal /-
 theorem maximalSubfieldWithHom_is_maximal :
     ∀ N : SubfieldWithHom K L M hL,
       maximalSubfieldWithHom M hL ≤ N → N ≤ maximalSubfieldWithHom M hL :=
   Classical.choose_spec (exists_maximal_subfieldWithHom M hL)
 #align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
+-/
 
 #print lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top /-
 theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier = ⊤ :=
@@ -359,15 +401,11 @@ variable {K : Type u} [Field K] {L : Type v} {M : Type w} [Field L] [Algebra K L
 
 variable (K L M)
 
-include hL
-
 /-- Less general version of `lift`. -/
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
   (lift.SubfieldWithHom.maximalSubfieldWithHom M hL).emb.comp <|
     Eq.recOn (lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top M hL).symm Algebra.toTop
 
-omit hL
-
 variable {R : Type u} [CommRing R]
 
 variable {S : Type v} [CommRing S] [IsDomain S] [Algebra R S] [Algebra R M] [NoZeroSMulDivisors R S]
@@ -375,8 +413,6 @@ variable {S : Type v} [CommRing S] [IsDomain S] [Algebra R S] [Algebra R M] [NoZ
 
 variable {M}
 
-include hS
-
 private theorem fraction_ring.is_algebraic :
     letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).IsDomain _
     Algebra.IsAlgebraic (FractionRing R) (FractionRing S) :=
@@ -386,6 +422,7 @@ private theorem fraction_ring.is_algebraic :
     (IsFractionRing.isAlgebraic_iff R (FractionRing R) (FractionRing S)).1
       ((IsFractionRing.isAlgebraic_iff' R S (FractionRing S)).1 hS x)
 
+#print IsAlgClosed.lift /-
 /-- A (random) homomorphism from an algebraic extension of R into an algebraically
   closed extension of R. -/
 noncomputable irreducible_def lift : S →ₐ[R] M :=
@@ -396,13 +433,14 @@ noncomputable irreducible_def lift : S →ₐ[R] M :=
   let f : FractionRing S →ₐ[FractionRing R] M := lift_aux (FractionRing R) (FractionRing S) M hfRfS
   exact (f.restrict_scalars R).comp ((Algebra.ofId S (FractionRing S)).restrictScalars R)
 #align is_alg_closed.lift IsAlgClosed.lift
+-/
 
-omit hS
-
+#print IsAlgClosed.perfectRing /-
 noncomputable instance (priority := 100) perfectRing (p : ℕ) [Fact p.Prime] [CharP k p]
     [IsAlgClosed k] : PerfectRing k p :=
   PerfectRing.ofSurjective k p fun x => IsAlgClosed.exists_pow_nat_eq _ <| NeZero.pos p
 #align is_alg_closed.perfect_ring IsAlgClosed.perfectRing
+-/
 
 /-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
 instance (priority := 500) {K : Type _} [Field K] [IsAlgClosed K] : Infinite K :=
@@ -433,6 +471,7 @@ section
 
 variable [Algebra R L] [NoZeroSMulDivisors R L] [IsAlgClosure R L]
 
+#print IsAlgClosure.equiv /-
 /-- A (random) isomorphism between two algebraic closures of `R`. -/
 noncomputable def equiv : L ≃ₐ[R] M :=
   let f : L →ₐ[R] M := IsAlgClosed.lift IsAlgClosure.algebraic
@@ -448,6 +487,7 @@ noncomputable def equiv : L ≃ₐ[R] M :=
           (Algebra.isAlgebraic_of_larger_base_of_injective
             (NoZeroSMulDivisors.algebraMap_injective R _) IsAlgClosure.algebraic)⟩
 #align is_alg_closure.equiv IsAlgClosure.equiv
+-/
 
 end
 
@@ -457,12 +497,15 @@ variable [Algebra R S] [Algebra R L] [IsScalarTower R S L]
 
 variable [Algebra K J] [Algebra J L] [IsAlgClosure J L] [Algebra K L] [IsScalarTower K J L]
 
+#print IsAlgClosure.ofAlgebraic /-
 /-- If `J` is an algebraic extension of `K` and `L` is an algebraic closure of `J`, then it is
   also an algebraic closure of `K`. -/
 theorem ofAlgebraic (hKJ : Algebra.IsAlgebraic K J) : IsAlgClosure K L :=
   ⟨IsAlgClosure.alg_closed J, Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic⟩
 #align is_alg_closure.of_algebraic IsAlgClosure.ofAlgebraic
+-/
 
+#print IsAlgClosure.equivOfAlgebraic' /-
 /-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
   an algebraic extension of `R` -/
 noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
@@ -480,12 +523,15 @@ noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
       algebraic := hRL }
   exact IsAlgClosure.equiv _ _ _
 #align is_alg_closure.equiv_of_algebraic' IsAlgClosure.equivOfAlgebraic'
+-/
 
+#print IsAlgClosure.equivOfAlgebraic /-
 /-- A (random) isomorphism between an algebraic closure of `K` and an algebraic closure
   of an algebraic extension of `K` -/
 noncomputable def equivOfAlgebraic (hKJ : Algebra.IsAlgebraic K J) : L ≃ₐ[K] M :=
   equivOfAlgebraic' K J _ _ (Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic)
 #align is_alg_closure.equiv_of_algebraic IsAlgClosure.equivOfAlgebraic
+-/
 
 end EquivOfAlgebraic
 
@@ -493,6 +539,7 @@ section EquivOfEquiv
 
 variable {R S}
 
+#print IsAlgClosure.equivOfEquivAux /-
 /-- Used in the definition of `equiv_of_equiv` -/
 noncomputable def equivOfEquivAux (hSR : S ≃+* R) :
     { e : L ≃+* M // e.toRingHom.comp (algebraMap S L) = (algebraMap R M).comp hSR.toRingHom } :=
@@ -522,41 +569,53 @@ noncomputable def equivOfEquivAux (hSR : S ≃+* R) :
   show equiv_of_algebraic' R S L M _ (algebraMap R L (hSR x)) = _
   rw [AlgEquiv.commutes]
 #align is_alg_closure.equiv_of_equiv_aux IsAlgClosure.equivOfEquivAux
+-/
 
+#print IsAlgClosure.equivOfEquiv /-
 /-- Algebraic closure of isomorphic fields are isomorphic -/
 noncomputable def equivOfEquiv (hSR : S ≃+* R) : L ≃+* M :=
   equivOfEquivAux L M hSR
 #align is_alg_closure.equiv_of_equiv IsAlgClosure.equivOfEquiv
+-/
 
+#print IsAlgClosure.equivOfEquiv_comp_algebraMap /-
 @[simp]
 theorem equivOfEquiv_comp_algebraMap (hSR : S ≃+* R) :
     (↑(equivOfEquiv L M hSR) : L →+* M).comp (algebraMap S L) = (algebraMap R M).comp hSR :=
   (equivOfEquivAux L M hSR).2
 #align is_alg_closure.equiv_of_equiv_comp_algebra_map IsAlgClosure.equivOfEquiv_comp_algebraMap
+-/
 
+#print IsAlgClosure.equivOfEquiv_algebraMap /-
 @[simp]
 theorem equivOfEquiv_algebraMap (hSR : S ≃+* R) (s : S) :
     equivOfEquiv L M hSR (algebraMap S L s) = algebraMap R M (hSR s) :=
   RingHom.ext_iff.1 (equivOfEquiv_comp_algebraMap L M hSR) s
 #align is_alg_closure.equiv_of_equiv_algebra_map IsAlgClosure.equivOfEquiv_algebraMap
+-/
 
+#print IsAlgClosure.equivOfEquiv_symm_algebraMap /-
 @[simp]
 theorem equivOfEquiv_symm_algebraMap (hSR : S ≃+* R) (r : R) :
     (equivOfEquiv L M hSR).symm (algebraMap R M r) = algebraMap S L (hSR.symm r) :=
   (equivOfEquiv L M hSR).Injective (by simp)
 #align is_alg_closure.equiv_of_equiv_symm_algebra_map IsAlgClosure.equivOfEquiv_symm_algebraMap
+-/
 
+#print IsAlgClosure.equivOfEquiv_symm_comp_algebraMap /-
 @[simp]
 theorem equivOfEquiv_symm_comp_algebraMap (hSR : S ≃+* R) :
     ((equivOfEquiv L M hSR).symm : M →+* L).comp (algebraMap R M) =
       (algebraMap S L).comp hSR.symm :=
   RingHom.ext_iff.2 (equivOfEquiv_symm_algebraMap L M hSR)
 #align is_alg_closure.equiv_of_equiv_symm_comp_algebra_map IsAlgClosure.equivOfEquiv_symm_comp_algebraMap
+-/
 
 end EquivOfEquiv
 
 end IsAlgClosure
 
+#print Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly /-
 /-- Let `A` be an algebraically closed field and let `x ∈ K`, with `K/F` an algebraic extension
   of fields. Then the images of `x` by the `F`-algebra morphisms from `K` to `A` are exactly
   the roots in `A` of the minimal polynomial of `x` over `F`. -/
@@ -581,4 +640,5 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
       (congr_arg ψ₀ (AdjoinRoot.lift_root hx).symm).trans <|
         (ψ₀.commutes _).trans <| AdjoinRoot.lift_root ha⟩
 #align algebra.is_algebraic.range_eval_eq_root_set_minpoly Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly
+-/
 
Diff
@@ -169,10 +169,10 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
   exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
 #align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
 
-theorem algebra_map_surjective_of_is_integral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
+theorem algebraMap_surjective_of_isIntegral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
     [hk : IsAlgClosed k] (f : k →+* K) (hf : f.IsIntegral) : Function.Surjective f :=
   @algebraMap_surjective_of_isIntegral k K _ _ _ _ f.toAlgebra hf
-#align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebra_map_surjective_of_is_integral'
+#align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebraMap_surjective_of_isIntegral'
 
 theorem algebraMap_surjective_of_isAlgebraic {k K : Type _} [Field k] [Ring K] [IsDomain K]
     [hk : IsAlgClosed k] [Algebra k K] (hf : Algebra.IsAlgebraic k K) :
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
 
 ! This file was ported from Lean 3 source module field_theory.is_alg_closed.basic
-! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
+! leanprover-community/mathlib commit fd4551cfe4b7484b81c2c9ba3405edae27659676
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.RingTheory.Localization.Integral
 /-!
 # Algebraically Closed Field
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we define the typeclass for algebraically closed fields and algebraic closures,
 and prove some of their properties.
 
Diff
@@ -48,6 +48,7 @@ open Polynomial
 
 variable (k : Type u) [Field k]
 
+#print IsAlgClosed /-
 /-- Typeclass for algebraically closed fields.
 
 To show `polynomial.splits p f` for an arbitrary ring homomorphism `f`,
@@ -56,6 +57,7 @@ see `is_alg_closed.splits_codomain` and `is_alg_closed.splits_domain`.
 class IsAlgClosed : Prop where
   Splits : ∀ p : k[X], p.Splits <| RingHom.id k
 #align is_alg_closed IsAlgClosed
+-/
 
 /-- Every polynomial splits in the field extension `f : K →+* k` if `k` is algebraically closed.
 
@@ -78,9 +80,11 @@ namespace IsAlgClosed
 
 variable {k}
 
+#print IsAlgClosed.exists_root /-
 theorem exists_root [IsAlgClosed k] (p : k[X]) (hp : p.degree ≠ 0) : ∃ x, IsRoot p x :=
   exists_root_of_splits _ (IsAlgClosed.splits p) hp
 #align is_alg_closed.exists_root IsAlgClosed.exists_root
+-/
 
 theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z, z ^ n = x :=
   by
@@ -182,16 +186,20 @@ class IsAlgClosure (R : Type u) (K : Type v) [CommRing R] [Field K] [Algebra R K
   algebraic : Algebra.IsAlgebraic R K
 #align is_alg_closure IsAlgClosure
 
+#print isAlgClosure_iff /-
 theorem isAlgClosure_iff (K : Type v) [Field K] [Algebra k K] :
     IsAlgClosure k K ↔ IsAlgClosed K ∧ Algebra.IsAlgebraic k K :=
   ⟨fun h => ⟨h.1, h.2⟩, fun h => ⟨h.1, h.2⟩⟩
 #align is_alg_closure_iff isAlgClosure_iff
+-/
 
+#print IsAlgClosure.normal /-
 instance (priority := 100) IsAlgClosure.normal (R K : Type _) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] : Normal R K :=
   ⟨IsAlgClosure.algebraic, fun _ =>
     @IsAlgClosed.splits_codomain _ _ _ (IsAlgClosure.alg_closed R) _ _ _⟩
 #align is_alg_closure.normal IsAlgClosure.normal
+-/
 
 instance (priority := 100) IsAlgClosure.separable (R K : Type _) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] [CharZero R] : IsSeparable R K :=
@@ -287,10 +295,12 @@ theorem exists_maximal_subfieldWithHom : ∃ E : SubfieldWithHom K L M hL, ∀ N
   exists_maximal_of_chains_bounded maximal_subfieldWithHom_chain_bounded fun _ _ _ => le_trans
 #align lift.subfield_with_hom.exists_maximal_subfield_with_hom lift.SubfieldWithHom.exists_maximal_subfieldWithHom
 
+#print lift.SubfieldWithHom.maximalSubfieldWithHom /-
 /-- The maximal `subfield_with_hom`. We later prove that this is equal to `⊤`. -/
 noncomputable def maximalSubfieldWithHom : SubfieldWithHom K L M hL :=
   Classical.choose (exists_maximal_subfieldWithHom M hL)
 #align lift.subfield_with_hom.maximal_subfield_with_hom lift.SubfieldWithHom.maximalSubfieldWithHom
+-/
 
 theorem maximalSubfieldWithHom_is_maximal :
     ∀ N : SubfieldWithHom K L M hL,
@@ -298,6 +308,7 @@ theorem maximalSubfieldWithHom_is_maximal :
   Classical.choose_spec (exists_maximal_subfieldWithHom M hL)
 #align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
 
+#print lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top /-
 theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier = ⊤ :=
   by
   rw [eq_top_iff]
@@ -332,6 +343,7 @@ theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom M hL).carrier =
   refine' (maximal_subfield_with_hom_is_maximal M hL O' hO').fst _
   exact Algebra.subset_adjoin (Set.mem_singleton x)
 #align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
+-/
 
 end SubfieldWithHom
 
Diff
@@ -88,7 +88,7 @@ theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z
   · rw [degree_X_pow_sub_C hn x]
     exact ne_of_gt (WithBot.coe_lt_coe.2 hn)
   use z
-  simp only [eval_C, eval_X, eval_pow, eval_sub, is_root.def] at hz
+  simp only [eval_C, eval_X, eval_pow, eval_sub, is_root.def] at hz 
   exact sub_eq_zero.1 hz
 #align is_alg_closed.exists_pow_nat_eq IsAlgClosed.exists_pow_nat_eq
 
@@ -104,7 +104,7 @@ theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} : p.roots = 0 ↔ p = Polyn
   cases' le_or_lt (degree p) 0 with hd hd
   · exact eq_C_of_degree_le_zero hd
   · obtain ⟨z, hz⟩ := IsAlgClosed.exists_root p hd.ne'
-    rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz
+    rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz 
     simpa using hz
 #align is_alg_closed.roots_eq_zero_iff IsAlgClosed.roots_eq_zero_iff
 
@@ -158,7 +158,7 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
   have h : (minpoly k x).degree = 1 := degree_eq_one_of_irreducible k (minpoly.irreducible (hf x))
   have : aeval x (minpoly k x) = 0 := minpoly.aeval k x
   rw [eq_X_add_C_of_degree_eq_one h, hq, C_1, one_mul, aeval_add, aeval_X, aeval_C,
-    add_eq_zero_iff_eq_neg] at this
+    add_eq_zero_iff_eq_neg] at this 
   exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
 #align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
 
@@ -177,7 +177,7 @@ end IsAlgClosed
 
 /-- Typeclass for an extension being an algebraic closure. -/
 class IsAlgClosure (R : Type u) (K : Type v) [CommRing R] [Field K] [Algebra R K]
-  [NoZeroSMulDivisors R K] : Prop where
+    [NoZeroSMulDivisors R K] : Prop where
   alg_closed : IsAlgClosed K
   algebraic : Algebra.IsAlgebraic R K
 #align is_alg_closure IsAlgClosure
@@ -237,7 +237,7 @@ theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x,
   Iff.rfl
 #align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
 
-theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h;
+theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h ;
   cases h; assumption
 #align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
 
@@ -278,7 +278,7 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
         intro x
         simp [ub]
         rfl⟩⟩
-  else by rw [Set.not_nonempty_iff_eq_empty] at hcn; simp [hcn]
+  else by rw [Set.not_nonempty_iff_eq_empty] at hcn ; simp [hcn]
 #align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
 
 variable (hL M)
@@ -550,7 +550,7 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
     (Set.range fun ψ : K →ₐ[F] A => ψ x) = (minpoly F x).rootSet A :=
   by
   have := Algebra.isAlgebraic_iff_isIntegral.1 hK
-  ext a; rw [mem_root_set_of_ne (minpoly.ne_zero (this x))] <;> [skip;infer_instance]
+  ext a; rw [mem_root_set_of_ne (minpoly.ne_zero (this x))] <;> [skip; infer_instance]
   refine' ⟨_, fun ha => _⟩
   · rintro ⟨ψ, rfl⟩; rw [aeval_alg_hom_apply ψ x, minpoly.aeval, map_zero]
   let Fx := AdjoinRoot (minpoly F x)
Diff
@@ -42,7 +42,7 @@ algebraic closure, algebraically closed
 
 universe u v w
 
-open Classical BigOperators Polynomial
+open scoped Classical BigOperators Polynomial
 
 open Polynomial
 
Diff
@@ -62,9 +62,7 @@ class IsAlgClosed : Prop where
 See also `is_alg_closed.splits_domain` for the case where `K` is algebraically closed.
 -/
 theorem IsAlgClosed.splits_codomain {k K : Type _} [Field k] [IsAlgClosed k] [Field K] {f : K →+* k}
-    (p : K[X]) : p.Splits f := by
-  convert IsAlgClosed.splits (p.map f)
-  simp [splits_map_iff]
+    (p : K[X]) : p.Splits f := by convert IsAlgClosed.splits (p.map f); simp [splits_map_iff]
 #align is_alg_closed.splits_codomain IsAlgClosed.splits_codomain
 
 /-- Every polynomial splits in the field extension `f : K →+* k` if `K` is algebraically closed.
@@ -239,11 +237,8 @@ theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x,
   Iff.rfl
 #align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
 
-theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x :=
-  by
-  rw [le_def] at h
-  cases h
-  assumption
+theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by rw [le_def] at h;
+  cases h; assumption
 #align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
 
 instance : Preorder (SubfieldWithHom K L M hL)
@@ -283,9 +278,7 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
         intro x
         simp [ub]
         rfl⟩⟩
-  else by
-    rw [Set.not_nonempty_iff_eq_empty] at hcn
-    simp [hcn]
+  else by rw [Set.not_nonempty_iff_eq_empty] at hcn; simp [hcn]
 #align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
 
 variable (hL M)
@@ -559,8 +552,7 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
   have := Algebra.isAlgebraic_iff_isIntegral.1 hK
   ext a; rw [mem_root_set_of_ne (minpoly.ne_zero (this x))] <;> [skip;infer_instance]
   refine' ⟨_, fun ha => _⟩
-  · rintro ⟨ψ, rfl⟩
-    rw [aeval_alg_hom_apply ψ x, minpoly.aeval, map_zero]
+  · rintro ⟨ψ, rfl⟩; rw [aeval_alg_hom_apply ψ x, minpoly.aeval, map_zero]
   let Fx := AdjoinRoot (minpoly F x)
   have hx : aeval x (minpoly F x) = 0 := minpoly.aeval F x
   letI : Algebra Fx A := (AdjoinRoot.lift (algebraMap F A) a ha).toAlgebra
Diff
@@ -357,7 +357,6 @@ include hL
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
   (lift.SubfieldWithHom.maximalSubfieldWithHom M hL).emb.comp <|
     Eq.recOn (lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top M hL).symm Algebra.toTop
-#align is_alg_closed.lift_aux is_alg_closed.lift_aux
 
 omit hL
 
@@ -378,7 +377,6 @@ private theorem fraction_ring.is_algebraic :
   exact
     (IsFractionRing.isAlgebraic_iff R (FractionRing R) (FractionRing S)).1
       ((IsFractionRing.isAlgebraic_iff' R S (FractionRing S)).1 hS x)
-#align is_alg_closed.fraction_ring.is_algebraic is_alg_closed.fraction_ring.is_algebraic
 
 /-- A (random) homomorphism from an algebraic extension of R into an algebraically
   closed extension of R. -/
Diff
@@ -559,7 +559,7 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
     (Set.range fun ψ : K →ₐ[F] A => ψ x) = (minpoly F x).rootSet A :=
   by
   have := Algebra.isAlgebraic_iff_isIntegral.1 hK
-  ext a; rw [mem_root_set_of_ne (minpoly.ne_zero (this x))] <;> [skip, infer_instance]
+  ext a; rw [mem_root_set_of_ne (minpoly.ne_zero (this x))] <;> [skip;infer_instance]
   refine' ⟨_, fun ha => _⟩
   · rintro ⟨ψ, rfl⟩
     rw [aeval_alg_hom_apply ψ x, minpoly.aeval, map_zero]
Diff
@@ -263,7 +263,7 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
       haveI : Nonempty c := Set.Nonempty.to_subtype hcn
       { carrier := ⨆ i : c, (i : subfield_with_hom K L M hL).carrier
         emb :=
-          Subalgebra.supᵢLift (fun i : c => (i : subfield_with_hom K L M hL).carrier)
+          Subalgebra.iSupLift (fun i : c => (i : subfield_with_hom K L M hL).carrier)
             (fun i j =>
               let ⟨k, hik, hjk⟩ := directedOn_iff_directed.1 hc.directed_on i j
               ⟨k, hik.fst, hjk.fst⟩)
@@ -278,7 +278,7 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
                   inclusion_self, AlgHom.id_apply x])
             _ rfl }
     ⟨ub, fun N hN =>
-      ⟨(le_supᵢ (fun i : c => (i : SubfieldWithHom K L M hL).carrier) ⟨N, hN⟩ : _),
+      ⟨(le_iSup (fun i : c => (i : SubfieldWithHom K L M hL).carrier) ⟨N, hN⟩ : _),
         by
         intro x
         simp [ub]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
 
 ! This file was ported from Lean 3 source module field_theory.is_alg_closed.basic
-! leanprover-community/mathlib commit 0ac3057eb6231d2c8dfcd46767cf4a166961c0f1
+! leanprover-community/mathlib commit 00f91228655eecdcd3ac97a7fd8dbcb139fe990a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -451,6 +451,12 @@ variable [Algebra R S] [Algebra R L] [IsScalarTower R S L]
 
 variable [Algebra K J] [Algebra J L] [IsAlgClosure J L] [Algebra K L] [IsScalarTower K J L]
 
+/-- If `J` is an algebraic extension of `K` and `L` is an algebraic closure of `J`, then it is
+  also an algebraic closure of `K`. -/
+theorem ofAlgebraic (hKJ : Algebra.IsAlgebraic K J) : IsAlgClosure K L :=
+  ⟨IsAlgClosure.alg_closed J, Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic⟩
+#align is_alg_closure.of_algebraic IsAlgClosure.ofAlgebraic
+
 /-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
   an algebraic extension of `R` -/
 noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
Diff
@@ -4,13 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
 
 ! This file was ported from Lean 3 source module field_theory.is_alg_closed.basic
-! leanprover-community/mathlib commit 3e00d81bdcbf77c8188bbd18f5524ddc3ed8cac6
+! 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.PerfectClosure
-import Mathbin.FieldTheory.Separable
-import Mathbin.RingTheory.Adjoin.Field
 import Mathbin.RingTheory.Localization.Integral
 
 /-!
@@ -190,6 +189,18 @@ theorem isAlgClosure_iff (K : Type v) [Field K] [Algebra k K] :
   ⟨fun h => ⟨h.1, h.2⟩, fun h => ⟨h.1, h.2⟩⟩
 #align is_alg_closure_iff isAlgClosure_iff
 
+instance (priority := 100) IsAlgClosure.normal (R K : Type _) [Field R] [Field K] [Algebra R K]
+    [IsAlgClosure R K] : Normal R K :=
+  ⟨IsAlgClosure.algebraic, fun _ =>
+    @IsAlgClosed.splits_codomain _ _ _ (IsAlgClosure.alg_closed R) _ _ _⟩
+#align is_alg_closure.normal IsAlgClosure.normal
+
+instance (priority := 100) IsAlgClosure.separable (R K : Type _) [Field R] [Field K] [Algebra R K]
+    [IsAlgClosure R K] [CharZero R] : IsSeparable R K :=
+  ⟨fun _ => isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _), fun _ =>
+    (minpoly.irreducible (isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _))).Separable⟩
+#align is_alg_closure.separable IsAlgClosure.separable
+
 namespace lift
 
 /- In this section, the homomorphism from any algebraic extension into an algebraically
Diff
@@ -252,7 +252,7 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M hL
       haveI : Nonempty c := Set.Nonempty.to_subtype hcn
       { carrier := ⨆ i : c, (i : subfield_with_hom K L M hL).carrier
         emb :=
-          Subalgebra.suprLift (fun i : c => (i : subfield_with_hom K L M hL).carrier)
+          Subalgebra.supᵢLift (fun i : c => (i : subfield_with_hom K L M hL).carrier)
             (fun i j =>
               let ⟨k, hik, hjk⟩ := directedOn_iff_directed.1 hc.directed_on i j
               ⟨k, hik.fst, hjk.fst⟩)
Diff
@@ -101,7 +101,7 @@ theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z :=
   exact ⟨z, sq z⟩
 #align is_alg_closed.exists_eq_mul_self IsAlgClosed.exists_eq_mul_self
 
-theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} : p.roots = 0 ↔ p = Polynomial.c (p.coeff 0) :=
+theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} : p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) :=
   by
   refine' ⟨fun h => _, fun hp => by rw [hp, roots_C]⟩
   cases' le_or_lt (degree p) 0 with hd hd
@@ -139,11 +139,11 @@ theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → ∃ x, p
     IsAlgClosed k :=
   ⟨fun p =>
     Or.inr fun q hq hqp =>
-      have : Irreducible (q * c (leadingCoeff q)⁻¹) :=
+      have : Irreducible (q * C (leadingCoeff q)⁻¹) :=
         by
         rw [← coe_norm_unit_of_ne_zero hq.ne_zero]
         exact (associated_normalize _).Irreducible hq
-      let ⟨x, hx⟩ := H (q * c (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.NeZero) this
+      let ⟨x, hx⟩ := H (q * C (leadingCoeff q)⁻¹) (monic_mul_leadingCoeff_inv hq.NeZero) this
       degree_mul_leadingCoeff_inv q hq.NeZero ▸ degree_eq_one_of_irreducible_of_root this hx⟩
 #align is_alg_closed.of_exists_root IsAlgClosed.of_exists_root
 

Changes in mathlib4

mathlib3
mathlib4
chore: rename IsRoot.definition back to IsRoot.def (#11999)

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

Diff
@@ -92,7 +92,7 @@ theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z
     exact ne_of_gt (WithBot.coe_lt_coe.2 hn)
   obtain ⟨z, hz⟩ := exists_root (X ^ n - C x) this
   · use z
-    simp only [eval_C, eval_X, eval_pow, eval_sub, IsRoot.definition] at hz
+    simp only [eval_C, eval_X, eval_pow, eval_sub, IsRoot.def] at hz
     exact sub_eq_zero.1 hz
 #align is_alg_closed.exists_pow_nat_eq IsAlgClosed.exists_pow_nat_eq
 
chore: rename away from 'def' (#11548)

This will become an error in 2024-03-16 nightly, possibly not permanently.

Co-authored-by: Scott Morrison <scott@tqft.net>

Diff
@@ -92,7 +92,7 @@ theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z
     exact ne_of_gt (WithBot.coe_lt_coe.2 hn)
   obtain ⟨z, hz⟩ := exists_root (X ^ n - C x) this
   · use z
-    simp only [eval_C, eval_X, eval_pow, eval_sub, IsRoot.def] at hz
+    simp only [eval_C, eval_X, eval_pow, eval_sub, IsRoot.definition] at hz
     exact sub_eq_zero.1 hz
 #align is_alg_closed.exists_pow_nat_eq IsAlgClosed.exists_pow_nat_eq
 
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
@@ -246,7 +246,6 @@ private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
     (IntermediateField.adjoin_univ K L)
 
 variable {R : Type u} [CommRing R]
-
 variable {S : Type v} [CommRing S] [IsDomain S] [Algebra R S] [Algebra R M] [NoZeroSMulDivisors R S]
   [NoZeroSMulDivisors R M] (hS : Algebra.IsAlgebraic R S)
 
chore: prepare Lean version bump with explicit simp (#10999)

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

Diff
@@ -293,7 +293,7 @@ instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K :=
   intro hfin
   set n := Fintype.card K
   set f := (X : K[X]) ^ (n + 1) - 1
-  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp) one_ne_zero
+  have hfsep : Separable f := separable_X_pow_sub_C 1 (by simp [n]) one_ne_zero
   apply Nat.not_succ_le_self (Fintype.card K)
   have hroot : n.succ = Fintype.card (f.rootSet K) := by
     erw [card_rootSet_eq_natDegree hfsep (IsAlgClosed.splits_domain _), natDegree_X_pow_sub_C]
chore: classify added instance porting notes (#10925)

Classifies by adding issue number (#10754) to porting notes claiming added instance.

Diff
@@ -317,7 +317,7 @@ variable [Algebra R L] [NoZeroSMulDivisors R L] [IsAlgClosure R L]
 
 /-- A (random) isomorphism between two algebraic closures of `R`. -/
 noncomputable def equiv : L ≃ₐ[R] M :=
-  -- Porting note: added to replace local instance above
+  -- Porting note (#10754): added to replace local instance above
   haveI : IsAlgClosed L := IsAlgClosure.alg_closed R
   haveI : IsAlgClosed M := IsAlgClosure.alg_closed R
   AlgEquiv.ofBijective _ (IsAlgClosure.algebraic.algHom_bijective₂
feat: a polynomial over a perfect field is separable iff it is square-free (#10170)

Yet another small step toward Jordan-Chevalley-Dunford.

This was far more work than expected, partly because of missing API for Squarefree, and partly because the definition IsCoprime is the wrong concept for unique factorization domains.

Diff
@@ -285,7 +285,7 @@ noncomputable instance (priority := 100) perfectRing (p : ℕ) [Fact p.Prime] [C
 
 noncomputable instance (priority := 100) perfectField [IsAlgClosed k] : PerfectField k := by
   obtain _ | ⟨p, _, _⟩ := CharP.exists' k
-  exacts [.ofCharZero k, PerfectRing.toPerfectField k p]
+  exacts [.ofCharZero, PerfectRing.toPerfectField k p]
 
 /-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
 instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
feat(FieldTheory/IsAlgClosed/Basic): add IsAlgClosed.perfectField instance (#9710)

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

Diff
@@ -283,6 +283,10 @@ noncomputable instance (priority := 100) perfectRing (p : ℕ) [Fact p.Prime] [C
   PerfectRing.ofSurjective k p fun _ => IsAlgClosed.exists_pow_nat_eq _ <| NeZero.pos p
 #align is_alg_closed.perfect_ring IsAlgClosed.perfectRing
 
+noncomputable instance (priority := 100) perfectField [IsAlgClosed k] : PerfectField k := by
+  obtain _ | ⟨p, _, _⟩ := CharP.exists' k
+  exacts [.ofCharZero k, PerfectRing.toPerfectField k p]
+
 /-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
 instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
   apply Infinite.of_not_fintype
feat (FieldTheory/Adjoin): generalize IntermediateField.exists_algHom_of_splits (#9392)
  • Extract from Lifts.exists_lift_of_splits a version that assumes integrality and splitting of minimal polynomial over an intermediate field (either actual IntermediateField or middle of IsScalarTower) rather than the base field

  • Generalize exists_algHom_adjoin_of_splits, exists_algHom_of_adjoin_splits, exists_algHom_of_splits to the same setting

  • Prove the extension lemma surjective_comp_algebraMap_of_isAlgebraic/isSeparable to be used in the proof that an epimorphism in the category of fields is a purely inseparable extension.

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

Diff
@@ -225,8 +225,19 @@ instance (priority := 100) IsAlgClosure.separable (R K : Type*) [Field R] [Field
 
 namespace IsAlgClosed
 
-variable (K : Type u) [Field K] (L : Type v) (M : Type w) [Field L] [Algebra K L] [Field M]
-  [Algebra K M] [IsAlgClosed M] (hL : Algebra.IsAlgebraic K L)
+variable {K : Type u} [Field K] {L : Type v} {M : Type w} [Field L] [Algebra K L] [Field M]
+  [Algebra K M] [IsAlgClosed M]
+
+/-- If E/L/K is a tower of field extensions with E/L algebraic, and if M is an algebraically
+  closed extension of K, then any embedding of L/K into M/K extends to an embedding of E/K.
+  Known as the extension lemma in https://math.stackexchange.com/a/687914. -/
+theorem surjective_comp_algebraMap_of_isAlgebraic {E : Type*}
+    [Field E] [Algebra K E] [Algebra L E] [IsScalarTower K L E] (hE : Algebra.IsAlgebraic L E) :
+    Function.Surjective fun φ : E →ₐ[K] M ↦ φ.comp (IsScalarTower.toAlgHom K L E) :=
+  fun f ↦ IntermediateField.exists_algHom_of_splits'
+    (E := E) f fun s ↦ ⟨(hE s).isIntegral, IsAlgClosed.splits_codomain _⟩
+
+variable (hL : Algebra.IsAlgebraic K L) (K L M)
 
 /-- Less general version of `lift`. -/
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
doc(FieldTheory/IsAlgClosed/Basic): add a TODO (#9519)

... which is: prove that if K / k is algebraic, and any monic irreducible polynomial over k has a root in K, then K is algebraically closed (in fact an algebraic closure of k).

Reference: https://kconrad.math.uconn.edu/blurbs/galoistheory/algclosure.pdf, Theorem 2. From the reference it looks like that the proof of this result needs purely inseparable argument, so probably it can't be done in this file.

Diff
@@ -34,6 +34,13 @@ polynomial in `k` splits.
 
 algebraic closure, algebraically closed
 
+## TODO
+
+- Prove that if `K / k` is algebraic, and any monic irreducible polynomial over `k` has a root
+  in `K`, then `K` is algebraically closed (in fact an algebraic closure of `k`).
+
+  Reference: <https://kconrad.math.uconn.edu/blurbs/galoistheory/algclosure.pdf>, Theorem 2
+
 -/
 
 
feat(FieldTheory/SeparableClosure): (relative) separable closure (#9338)

Main definitions:

  • separableClosure: the (relative) separable closure of E / F, or called maximal separable subextension of E / F, is defined to be the intermediate field of E / F consisting of all separable elements.
  • Field.sepDegree F E: the (infinite) separable degree [E:F]_s of an algebraic extension E / F of fields, defined to be the degree of separableClosure F E / F.
  • Field.insepDegree F E: the (infinite) inseparable degree [E:F]_i of an algebraic extension E / F of fields, defined to be the degree of E / separableClosure F E.
  • Field.finInsepDegree F E: the (finite) inseparable degree [E:F]_i of an algebraic extension E / F of fields, defined to be the degree of E / separableClosure F E as a natural number. It is zero if such field extension is not finite.

Main results:

  • le_separableClosure_iff: an intermediate field of E / F is contained in the (relative) separable closure of E / F if and only if it is separable over F.
  • separableClosure.normalClosure_eq_self: the normal closure of the (relative) separable closure of E / F is equal to itself.
  • separableClosure.normal: the (relative) separable closure of a normal extension is normal.
  • separableClosure.isSepClosure: the (relative) separable closure of a separably closed extension is a separable closure of the base field.
  • IntermediateField.isSeparable_adjoin_iff_separable: F(S) / F is a separable extension if and only if all elements of S are separable elements.
  • separableClosure.eq_top_iff: the (relative) separable closure of E / F is equal to E if and only if E / F is separable.
Diff
@@ -184,6 +184,15 @@ theorem algebraMap_surjective_of_isAlgebraic {k K : Type*} [Field k] [Ring K] [I
 
 end IsAlgClosed
 
+/-- If `k` is algebraically closed, `K / k` is a field extension, `L / k` is an intermediate field
+which is algebraic, then `L` is equal to `k`. A corollary of
+`IsAlgClosed.algebraMap_surjective_of_isAlgebraic`. -/
+theorem IntermediateField.eq_bot_of_isAlgClosed_of_isAlgebraic {k K : Type*} [Field k] [Field K]
+    [IsAlgClosed k] [Algebra k K] (L : IntermediateField k K) (hf : Algebra.IsAlgebraic k L) :
+    L = ⊥ := bot_unique fun x hx ↦ by
+  obtain ⟨y, hy⟩ := IsAlgClosed.algebraMap_surjective_of_isAlgebraic hf ⟨x, hx⟩
+  exact ⟨y, congr_arg (algebraMap L K) hy⟩
+
 /-- Typeclass for an extension being an algebraic closure. -/
 class IsAlgClosure (R : Type u) (K : Type v) [CommRing R] [Field K] [Algebra R K]
     [NoZeroSMulDivisors R K] : Prop where
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -97,7 +97,7 @@ theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z := by
 theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} :
     p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) := by
   refine' ⟨fun h => _, fun hp => by rw [hp, roots_C]⟩
-  cases' le_or_lt (degree p) 0 with hd hd
+  rcases le_or_lt (degree p) 0 with hd | hd
   · exact eq_C_of_degree_le_zero hd
   · obtain ⟨z, hz⟩ := IsAlgClosed.exists_root p hd.ne'
     rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz
chore: cleanups following #8609 and #8714 (#8962)
  • generalize image_rootSet, adjoin_rootSet_eq_range and splits_comp_of_splits in Data/Polynomial/Splits and use the last one to golf splits_of_algHom, splits_of_isScalarTower (introduced in # 8609).

  • add three new lemmas mem_range_x_of_minpoly_splits to simplify the construction of IntermediateField.algHomEquivAlgHomOfIsAlgClosed and Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed, remove the IsAlgClosed condition and rename. They could be moved to an earlier file but I refrain from doing that. (#find_home says it's already in the right place)

  • golf primitive_element_iff_algHom_eq_of_eval from # 8609, using a new lemma IsIntegral.minpoly_splits_tower_top for the last step.

  • make integralClosure_algEquiv_restrict (from # 8714) computable and rename to AlgEquiv.mapIntegralClosure to follow camelCase naming convention and enable dot notation.

Co-authored-by: Xavier-François Roblot <46200072+xroblot@users.noreply.github.com> Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -398,55 +398,47 @@ end IsAlgClosure
 
 section Algebra.IsAlgebraic
 
-variable {F K : Type*} (A : Type*) [Field F] [Field K] [Field A] [IsAlgClosed A] [Algebra F K]
-  (hK : Algebra.IsAlgebraic F K) [Algebra F A]
+variable {F K : Type*} (A : Type*) [Field F] [Field K] [Field A] [Algebra F K] [Algebra F A]
+  (hK : Algebra.IsAlgebraic F K)
 
 /-- Let `A` be an algebraically closed field and let `x ∈ K`, with `K/F` an algebraic extension
   of fields. Then the images of `x` by the `F`-algebra morphisms from `K` to `A` are exactly
   the roots in `A` of the minimal polynomial of `x` over `F`. -/
-theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly (x : K) :
+theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly [IsAlgClosed A] (x : K) :
     (Set.range fun ψ : K →ₐ[F] A ↦ ψ x) = (minpoly F x).rootSet A :=
   range_eval_eq_rootSet_minpoly_of_splits A (fun _ ↦ IsAlgClosed.splits_codomain _) hK x
 #align algebra.is_algebraic.range_eval_eq_root_set_minpoly Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly
 
-/-- All `F`-`AlgHom`s from `K` to an algebraic closed field `A` factor through any subextension of
-`A/F` in which the minimal polynomial of elements of `K` splits. -/
+/-- All `F`-embeddings of a field `K` into another field `A` factor through any intermediate
+field of `A/F` in which the minimal polynomial of elements of `K` splits. -/
 @[simps]
-def IntermediateField.algHomEquivAlgHomOfIsAlgClosed (L : IntermediateField F A)
+def IntermediateField.algHomEquivAlgHomOfSplits (L : IntermediateField F A)
     (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) :
     (K →ₐ[F] L) ≃ (K →ₐ[F] A) where
   toFun := L.val.comp
-  invFun := by
-    refine fun f => f.codRestrict _ (fun x => ?_)
-    suffices f x ∈ L.val '' rootSet (minpoly F x) L by
-      obtain ⟨z, -, hz⟩ := this
-      rw [← hz]
-      exact SetLike.coe_mem z
-    rw [image_rootSet (hL x), ← Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly _ hK]
-    exact Set.mem_range_self f
+  invFun f := f.codRestrict _ fun x ↦
+    ((hK x).isIntegral.map f).mem_intermediateField_of_minpoly_splits <| by
+      rw [minpoly.algHom_eq f f.injective]; exact hL x
   left_inv _ := rfl
   right_inv _ := by rfl
 
-theorem IntermediateField.algHomEquivAlgHomOfIsAlgClosed_apply_apply (L : IntermediateField F A)
+theorem IntermediateField.algHomEquivAlgHomOfSplits_apply_apply (L : IntermediateField F A)
     (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) (f : K →ₐ[F] L) (x : K) :
-    algHomEquivAlgHomOfIsAlgClosed A hK L hL f x = algebraMap L A (f x) := rfl
+    algHomEquivAlgHomOfSplits A hK L hL f x = algebraMap L A (f x) := rfl
 
-/-- All `F`-`AlgHom`s from `K` to an algebraic closed field `A` factor through any subfield of `A`
-in which the minimal polynomial of elements of `K` splits. -/
-noncomputable def Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed (L : Type*) [Field L]
+/-- All `F`-embeddings of a field `K` into another field `A` factor through any subextension
+of `A/F` in which the minimal polynomial of elements of `K` splits. -/
+noncomputable def Algebra.IsAlgebraic.algHomEquivAlgHomOfSplits (L : Type*) [Field L]
     [Algebra F L] [Algebra L A] [IsScalarTower F L A]
     (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) :
-    (K →ₐ[F] L) ≃ (K →ₐ[F] A) := by
-  refine (AlgEquiv.refl.arrowCongr
-    (AlgEquiv.ofInjectiveField (IsScalarTower.toAlgHom F L A))).trans ?_
-  refine IntermediateField.algHomEquivAlgHomOfIsAlgClosed
-    A hK (IsScalarTower.toAlgHom F L A).fieldRange ?_
-  exact fun x => splits_of_algHom (hL x) (AlgHom.rangeRestrict _)
-
-theorem Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed_apply_apply (L : Type*) [Field L]
+    (K →ₐ[F] L) ≃ (K →ₐ[F] A) :=
+  (AlgEquiv.refl.arrowCongr (AlgEquiv.ofInjectiveField (IsScalarTower.toAlgHom F L A))).trans <|
+    IntermediateField.algHomEquivAlgHomOfSplits A hK (IsScalarTower.toAlgHom F L A).fieldRange
+    fun x ↦ splits_of_algHom (hL x) (AlgHom.rangeRestrict _)
+
+theorem Algebra.IsAlgebraic.algHomEquivAlgHomOfSplits_apply_apply (L : Type*) [Field L]
     [Algebra F L] [Algebra L A] [IsScalarTower F L A]
     (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) (f : K →ₐ[F] L) (x : K) :
-    Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed A hK L hL f x =
-    algebraMap L A (f x) := rfl
+    Algebra.IsAlgebraic.algHomEquivAlgHomOfSplits A hK L hL f x = algebraMap L A (f x) := rfl
 
 end Algebra.IsAlgebraic
feat: Add some equivalent characterisations of primitive elements in finite extensions of fields (#8609)

See the Zulip thread

Diff
@@ -396,15 +396,57 @@ end EquivOfEquiv
 
 end IsAlgClosure
 
+section Algebra.IsAlgebraic
+
+variable {F K : Type*} (A : Type*) [Field F] [Field K] [Field A] [IsAlgClosed A] [Algebra F K]
+  (hK : Algebra.IsAlgebraic F K) [Algebra F A]
+
 /-- Let `A` be an algebraically closed field and let `x ∈ K`, with `K/F` an algebraic extension
   of fields. Then the images of `x` by the `F`-algebra morphisms from `K` to `A` are exactly
   the roots in `A` of the minimal polynomial of `x` over `F`. -/
-theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [Field K] [Field A]
-    [IsAlgClosed A] [Algebra F K] (hK : Algebra.IsAlgebraic F K) [Algebra F A] (x : K) :
-    (Set.range fun ψ : K →ₐ[F] A ↦ ψ x) = (minpoly F x).rootSet A := by
-  ext a
-  rw [mem_rootSet_of_ne (minpoly.ne_zero (hK.isIntegral x))]
-  refine ⟨fun ⟨ψ, hψ⟩ ↦ ?_, fun ha ↦ IntermediateField.exists_algHom_of_splits_of_aeval
-    (fun x ↦ ⟨hK.isIntegral x, IsAlgClosed.splits_codomain _⟩) ha⟩
-  rw [← hψ, aeval_algHom_apply ψ x, minpoly.aeval, map_zero]
+theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly (x : K) :
+    (Set.range fun ψ : K →ₐ[F] A ↦ ψ x) = (minpoly F x).rootSet A :=
+  range_eval_eq_rootSet_minpoly_of_splits A (fun _ ↦ IsAlgClosed.splits_codomain _) hK x
 #align algebra.is_algebraic.range_eval_eq_root_set_minpoly Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly
+
+/-- All `F`-`AlgHom`s from `K` to an algebraic closed field `A` factor through any subextension of
+`A/F` in which the minimal polynomial of elements of `K` splits. -/
+@[simps]
+def IntermediateField.algHomEquivAlgHomOfIsAlgClosed (L : IntermediateField F A)
+    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) :
+    (K →ₐ[F] L) ≃ (K →ₐ[F] A) where
+  toFun := L.val.comp
+  invFun := by
+    refine fun f => f.codRestrict _ (fun x => ?_)
+    suffices f x ∈ L.val '' rootSet (minpoly F x) L by
+      obtain ⟨z, -, hz⟩ := this
+      rw [← hz]
+      exact SetLike.coe_mem z
+    rw [image_rootSet (hL x), ← Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly _ hK]
+    exact Set.mem_range_self f
+  left_inv _ := rfl
+  right_inv _ := by rfl
+
+theorem IntermediateField.algHomEquivAlgHomOfIsAlgClosed_apply_apply (L : IntermediateField F A)
+    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) (f : K →ₐ[F] L) (x : K) :
+    algHomEquivAlgHomOfIsAlgClosed A hK L hL f x = algebraMap L A (f x) := rfl
+
+/-- All `F`-`AlgHom`s from `K` to an algebraic closed field `A` factor through any subfield of `A`
+in which the minimal polynomial of elements of `K` splits. -/
+noncomputable def Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed (L : Type*) [Field L]
+    [Algebra F L] [Algebra L A] [IsScalarTower F L A]
+    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) :
+    (K →ₐ[F] L) ≃ (K →ₐ[F] A) := by
+  refine (AlgEquiv.refl.arrowCongr
+    (AlgEquiv.ofInjectiveField (IsScalarTower.toAlgHom F L A))).trans ?_
+  refine IntermediateField.algHomEquivAlgHomOfIsAlgClosed
+    A hK (IsScalarTower.toAlgHom F L A).fieldRange ?_
+  exact fun x => splits_of_algHom (hL x) (AlgHom.rangeRestrict _)
+
+theorem Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed_apply_apply (L : Type*) [Field L]
+    [Algebra F L] [Algebra L A] [IsScalarTower F L A]
+    (hL : ∀ x : K, (minpoly F x).Splits (algebraMap F L)) (f : K →ₐ[F] L) (x : K) :
+    Algebra.IsAlgebraic.algHomEquivAlgHomOfIsAlgClosed A hK L hL f x =
+    algebraMap L A (f x) := rfl
+
+end Algebra.IsAlgebraic
chore: remove redundant integrality condition in IsSeparable (#8862)

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

Diff
@@ -204,8 +204,7 @@ instance (priority := 100) IsAlgClosure.normal (R K : Type*) [Field R] [Field K]
 
 instance (priority := 100) IsAlgClosure.separable (R K : Type*) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] [CharZero R] : IsSeparable R K :=
-  ⟨fun _ => (IsAlgClosure.algebraic _).isIntegral, fun _ =>
-    (minpoly.irreducible (IsAlgClosure.algebraic _).isIntegral).separable⟩
+  ⟨fun _ => (minpoly.irreducible (IsAlgClosure.algebraic _).isIntegral).separable⟩
 #align is_alg_closure.separable IsAlgClosure.separable
 
 namespace IsAlgClosed
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
@@ -179,7 +179,7 @@ theorem algebraMap_surjective_of_isIntegral' {k K : Type*} [Field k] [CommRing K
 theorem algebraMap_surjective_of_isAlgebraic {k K : Type*} [Field k] [Ring K] [IsDomain K]
     [IsAlgClosed k] [Algebra k K] (hf : Algebra.IsAlgebraic k K) :
     Function.Surjective (algebraMap k K) :=
-  algebraMap_surjective_of_isIntegral (Algebra.isAlgebraic_iff_isIntegral.mp hf)
+  algebraMap_surjective_of_isIntegral hf.isIntegral
 #align is_alg_closed.algebra_map_surjective_of_is_algebraic IsAlgClosed.algebraMap_surjective_of_isAlgebraic
 
 end IsAlgClosed
@@ -204,8 +204,8 @@ instance (priority := 100) IsAlgClosure.normal (R K : Type*) [Field R] [Field K]
 
 instance (priority := 100) IsAlgClosure.separable (R K : Type*) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] [CharZero R] : IsSeparable R K :=
-  ⟨fun _ => isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _), fun _ =>
-    (minpoly.irreducible (isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _))).separable⟩
+  ⟨fun _ => (IsAlgClosure.algebraic _).isIntegral, fun _ =>
+    (minpoly.irreducible (IsAlgClosure.algebraic _).isIntegral).separable⟩
 #align is_alg_closure.separable IsAlgClosure.separable
 
 namespace IsAlgClosed
@@ -216,7 +216,7 @@ variable (K : Type u) [Field K] (L : Type v) (M : Type w) [Field L] [Algebra K L
 /-- Less general version of `lift`. -/
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
   Classical.choice <| IntermediateField.nonempty_algHom_of_adjoin_splits
-    (fun x _ ↦ ⟨isAlgebraic_iff_isIntegral.1 (hL x), splits_codomain (minpoly K x)⟩)
+    (fun x _ ↦ ⟨(hL x).isIntegral, splits_codomain (minpoly K x)⟩)
     (IntermediateField.adjoin_univ K L)
 
 variable {R : Type u} [CommRing R]
@@ -310,7 +310,7 @@ variable [Algebra K J] [Algebra J L] [IsAlgClosure J L] [Algebra K L] [IsScalarT
 /-- If `J` is an algebraic extension of `K` and `L` is an algebraic closure of `J`, then it is
   also an algebraic closure of `K`. -/
 theorem ofAlgebraic (hKJ : Algebra.IsAlgebraic K J) : IsAlgClosure K L :=
-  ⟨IsAlgClosure.alg_closed J, Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic⟩
+  ⟨IsAlgClosure.alg_closed J, hKJ.trans IsAlgClosure.algebraic⟩
 #align is_alg_closure.of_algebraic IsAlgClosure.ofAlgebraic
 
 /-- A (random) isomorphism between an algebraic closure of `R` and an algebraic closure of
@@ -330,7 +330,7 @@ noncomputable def equivOfAlgebraic' [Nontrivial S] [NoZeroSMulDivisors R S]
 /-- A (random) isomorphism between an algebraic closure of `K` and an algebraic closure
   of an algebraic extension of `K` -/
 noncomputable def equivOfAlgebraic (hKJ : Algebra.IsAlgebraic K J) : L ≃ₐ[K] M :=
-  equivOfAlgebraic' K J _ _ (Algebra.isAlgebraic_trans hKJ IsAlgClosure.algebraic)
+  equivOfAlgebraic' K J _ _ (hKJ.trans IsAlgClosure.algebraic)
 #align is_alg_closure.equiv_of_algebraic IsAlgClosure.equivOfAlgebraic
 
 end EquivOfAlgebraic
@@ -351,11 +351,10 @@ noncomputable def equivOfEquivAux (hSR : S ≃+* R) :
   haveI : IsScalarTower S R L :=
     IsScalarTower.of_algebraMap_eq (by simp [RingHom.algebraMap_toAlgebra])
   haveI : NoZeroSMulDivisors R S := NoZeroSMulDivisors.of_algebraMap_injective hSR.symm.injective
-  refine'
+  refine
     ⟨equivOfAlgebraic' R S L M
-        (Algebra.isAlgebraic_of_larger_base_of_injective
-          (show Function.Injective (algebraMap S R) from hSR.injective) IsAlgClosure.algebraic),
-      _⟩
+        (IsAlgClosure.algebraic.tower_top_of_injective
+          (show Function.Injective (algebraMap S R) from hSR.injective)), ?_⟩
   ext x
   simp only [RingEquiv.toRingHom_eq_coe, Function.comp_apply, RingHom.coe_comp,
     AlgEquiv.coe_ringEquiv, RingEquiv.coe_toRingHom]
@@ -404,10 +403,9 @@ end IsAlgClosure
 theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [Field K] [Field A]
     [IsAlgClosed A] [Algebra F K] (hK : Algebra.IsAlgebraic F K) [Algebra F A] (x : K) :
     (Set.range fun ψ : K →ₐ[F] A ↦ ψ x) = (minpoly F x).rootSet A := by
-  have hFK := Algebra.isAlgebraic_iff_isIntegral.1 hK
   ext a
-  rw [mem_rootSet_of_ne (minpoly.ne_zero (hFK x))]
+  rw [mem_rootSet_of_ne (minpoly.ne_zero (hK.isIntegral x))]
   refine ⟨fun ⟨ψ, hψ⟩ ↦ ?_, fun ha ↦ IntermediateField.exists_algHom_of_splits_of_aeval
-    (fun x ↦ ⟨hFK x, IsAlgClosed.splits_codomain _⟩) ha⟩
+    (fun x ↦ ⟨hK.isIntegral x, IsAlgClosed.splits_codomain _⟩) ha⟩
   rw [← hψ, aeval_algHom_apply ψ x, minpoly.aeval, map_zero]
 #align algebra.is_algebraic.range_eval_eq_root_set_minpoly Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly
chore: remove SubfieldWithHom (#8333)

It has become our consensus that SubfieldWithHom should be deprecated in favor of IntermediateField.Lifts after discussing with @acmepjz in #6670. @acmepjz got rid of the use of SubfieldWithHom in IsAlgClosed.lift, so nothing depends on it now. In #8221 I extracted some proofs from SubfieldWithHom that are simpler than their Lifts counterparts, so I think now is the time to delete SubfieldWithHom completely, and get rid of this slow proof as a bonus.

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

Diff
@@ -210,146 +210,9 @@ instance (priority := 100) IsAlgClosure.separable (R K : Type*) [Field R] [Field
 
 namespace IsAlgClosed
 
-namespace lift
-
-/- In this section, the homomorphism from any algebraic extension into an algebraically
-  closed extension is proven to exist. The assumption that M is algebraically closed could probably
-  easily be switched to an assumption that M contains all the roots of polynomials in K -/
-variable {K : Type u} {L : Type v} {M : Type w} [Field K] [Field L] [Algebra K L] [Field M]
-  [Algebra K M] [IsAlgClosed M] (hL : Algebra.IsAlgebraic K L)
-
-variable (K L M)
-
-open Subalgebra AlgHom Function
-
-/-- This structure is used to prove the existence of a homomorphism from any algebraic extension
-into an algebraic closure -/
-structure SubfieldWithHom where
-  /-- The corresponding `Subalgebra` -/
-  carrier : Subalgebra K L
-  /-- The embedding into the algebraically closed field -/
-  emb : carrier →ₐ[K] M
-#align lift.subfield_with_hom IsAlgClosed.lift.SubfieldWithHom
-
-variable {K L M hL}
-
-namespace SubfieldWithHom
-
-variable {E₁ E₂ E₃ : SubfieldWithHom K L M}
-
-instance : LE (SubfieldWithHom K L M) where
-  le E₁ E₂ := ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x
-
-noncomputable instance : Inhabited (SubfieldWithHom K L M) :=
-  ⟨{  carrier := ⊥
-      emb := (Algebra.ofId K M).comp (Algebra.botEquiv K L).toAlgHom }⟩
-
-theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
-  Iff.rfl
-#align lift.subfield_with_hom.le_def IsAlgClosed.lift.SubfieldWithHom.le_def
-
-theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by
-  rw [le_def] at h; cases h; assumption
-#align lift.subfield_with_hom.compat IsAlgClosed.lift.SubfieldWithHom.compat
-
-instance : Preorder (SubfieldWithHom K L M) where
-  le := (· ≤ ·)
-  le_refl E := ⟨le_rfl, by simp⟩
-  le_trans E₁ E₂ E₃ h₁₂ h₂₃ := by
-    refine ⟨h₁₂.1.trans h₂₃.1, fun _ ↦ ?_⟩
-    erw [← inclusion_inclusion h₁₂.fst h₂₃.fst, compat h₂₃, compat h₁₂]
-
-open Lattice
-
-theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M))
-    (hc : IsChain (· ≤ ·) c) : ∃ ub : SubfieldWithHom K L M, ∀ N, N ∈ c → N ≤ ub := by
-  by_cases hcn : c.Nonempty
-  case neg => rw [Set.not_nonempty_iff_eq_empty] at hcn; simp [hcn]
-  case pos =>
-    have : Nonempty c := Set.Nonempty.to_subtype hcn
-    let ub : SubfieldWithHom K L M :=
-      ⟨⨆ i : c, (i : SubfieldWithHom K L M).carrier,
-        @Subalgebra.iSupLift _ _ _ _ _ _ _ _ _ this
-            (fun i : c => (i : SubfieldWithHom K L M).carrier)
-            (fun i j =>
-              let ⟨k, hik, hjk⟩ := directedOn_iff_directed.1 hc.directedOn i j
-              ⟨k, hik.fst, hjk.fst⟩)
-            (fun i => (i : SubfieldWithHom K L M).emb)
-            (by
-              intro i j h
-              ext x
-              cases' hc.total i.prop j.prop with hij hji
-              · simp [← hij.snd x]
-              · erw [AlgHom.comp_apply, ← hji.snd (inclusion h x), inclusion_inclusion,
-                  inclusion_self, AlgHom.id_apply x])
-            _ rfl⟩
-    exact ⟨ub, fun N hN =>
-         ⟨(le_iSup (fun i : c => (i : SubfieldWithHom K L M).carrier) ⟨N, hN⟩ : _), by
-           intro x
-           simp⟩⟩
-#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
-
-variable (K L M)
-
-theorem exists_maximal_subfieldWithHom : ∃ E : SubfieldWithHom K L M, ∀ N, E ≤ N → N ≤ E :=
-  exists_maximal_of_chains_bounded maximal_subfieldWithHom_chain_bounded le_trans
-#align lift.subfield_with_hom.exists_maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom
-
-/-- The maximal `SubfieldWithHom`. We later prove that this is equal to `⊤`. -/
-noncomputable def maximalSubfieldWithHom : SubfieldWithHom K L M :=
-  Classical.choose (exists_maximal_subfieldWithHom K L M)
-#align lift.subfield_with_hom.maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom
-
-theorem maximalSubfieldWithHom_is_maximal :
-    ∀ N : SubfieldWithHom K L M,
-      maximalSubfieldWithHom K L M ≤ N → N ≤ maximalSubfieldWithHom K L M :=
-  Classical.choose_spec (exists_maximal_subfieldWithHom K L M)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
-
--- porting note: this was much faster in lean 3
-set_option synthInstance.maxHeartbeats 200000 in
-theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier = ⊤ := by
-  rw [eq_top_iff]
-  intro x _
-  let N : Subalgebra K L := (maximalSubfieldWithHom K L M).carrier
-  letI : Field N := (Subalgebra.isField_of_algebraic N hL).toField
-  letI : Algebra N M := (maximalSubfieldWithHom K L M).emb.toRingHom.toAlgebra
-  obtain ⟨y, hy⟩ := IsAlgClosed.exists_aeval_eq_zero M (minpoly N x) <|
-    (minpoly.degree_pos
-      (isAlgebraic_iff_isIntegral.1 (Algebra.isAlgebraic_of_larger_base _ hL x))).ne'
-  let O : Subalgebra N L := Algebra.adjoin N {(x : L)}
-  letI : Algebra N O := Subalgebra.algebra O
-  -- Porting note: there are some tricky unfolds going on here:
-  -- (O.restrictScalars K : Type*) is identified with (O : Type*) in a few places
-  let larger_emb : O →ₐ[N] M := Algebra.adjoin.liftSingleton N x y hy
-  let larger_emb' : O →ₐ[K] M := AlgHom.restrictScalars K (S := N) (A := O) (B := M) larger_emb
-  have hNO : N ≤ O.restrictScalars K := by
-    intro z hz
-    show algebraMap N L ⟨z, hz⟩ ∈ O
-    exact O.algebraMap_mem _
-  let O' : SubfieldWithHom K L M :=
-    ⟨O.restrictScalars K, larger_emb'⟩
-  have hO' : maximalSubfieldWithHom K L M ≤ O' := by
-    refine' ⟨hNO, _⟩
-    intro z
-    -- Porting note: have to help Lean unfold even more here
-    show Algebra.adjoin.liftSingleton N x y hy (@algebraMap N O _ _ (Subalgebra.algebra O) z) =
-        algebraMap N M z
-    exact AlgHom.commutes _ _
-  refine' (maximalSubfieldWithHom_is_maximal K L M O' hO').fst _
-  show x ∈ Algebra.adjoin N {(x : L)}
-  exact Algebra.subset_adjoin (Set.mem_singleton x)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
-
-end SubfieldWithHom
-
-end lift
-
-variable {K : Type u} [Field K] {L : Type v} {M : Type w} [Field L] [Algebra K L] [Field M]
+variable (K : Type u) [Field K] (L : Type v) (M : Type w) [Field L] [Algebra K L] [Field M]
   [Algebra K M] [IsAlgClosed M] (hL : Algebra.IsAlgebraic K L)
 
-variable (K L M)
-
 /-- Less general version of `lift`. -/
 private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
   Classical.choice <| IntermediateField.nonempty_algHom_of_adjoin_splits
refactor: golf IntermediateField.Lifts (#8221)

Inspired by the IsAlgClosed.lift.SubfieldWithHom counterpart:

  • Change Lifts from a Sigma type to a structure with fields carrier and emb.

  • Change the definition of the partial order on Lifts to use IntermediateField.inclusion.

  • Use Subalgebra.iSupLift in the proof of Lifts.exists_upper_bound.

Also:

  • Inline multiple auxiliary definitions for Lifts.exists_upper_bound and Lifts.exists_lift_of_splits into the proofs proper.

  • Move the Supremum section much further up, in order to use the new lemma toSubalgebra_iSup_of_directed to prove stuff about Lifts (and golf a proof about CompactElement). isAlgebraic_iSup however can't be moved up, so I put it near adjoin.finiteDimensional, the last lemma it depends on.

Co-authored-by: acmepjz <acme_pjz@hotmail.com>

Diff
@@ -351,9 +351,10 @@ variable {K : Type u} [Field K] {L : Type v} {M : Type w} [Field L] [Algebra K L
 variable (K L M)
 
 /-- Less general version of `lift`. -/
-private noncomputable irreducible_def lift_aux : L →ₐ[K] M := Classical.choice <|
-  IntermediateField.algHom_mk_adjoin_splits' (IntermediateField.adjoin_univ K L)
+private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
+  Classical.choice <| IntermediateField.nonempty_algHom_of_adjoin_splits
     (fun x _ ↦ ⟨isAlgebraic_iff_isIntegral.1 (hL x), splits_codomain (minpoly K x)⟩)
+    (IntermediateField.adjoin_univ K L)
 
 variable {R : Type u} [CommRing R]
 
@@ -539,22 +540,11 @@ end IsAlgClosure
   the roots in `A` of the minimal polynomial of `x` over `F`. -/
 theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [Field K] [Field A]
     [IsAlgClosed A] [Algebra F K] (hK : Algebra.IsAlgebraic F K) [Algebra F A] (x : K) :
-    (Set.range fun ψ : K →ₐ[F] A => ψ x) = (minpoly F x).rootSet A := by
+    (Set.range fun ψ : K →ₐ[F] A ↦ ψ x) = (minpoly F x).rootSet A := by
   have hFK := Algebra.isAlgebraic_iff_isIntegral.1 hK
   ext a
   rw [mem_rootSet_of_ne (minpoly.ne_zero (hFK x))]
-  refine' ⟨_, fun ha => _⟩
-  · rintro ⟨ψ, rfl⟩; rw [aeval_algHom_apply ψ x, minpoly.aeval, map_zero]
-  let Fx := AdjoinRoot (minpoly F x)
-  have hx : aeval x (minpoly F x) = 0 := minpoly.aeval F x
-  letI : Algebra Fx A := (AdjoinRoot.lift (algebraMap F A) a ha).toAlgebra
-  letI : Algebra Fx K := (AdjoinRoot.lift (algebraMap F K) x hx).toAlgebra
-  haveI : IsScalarTower F Fx A := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ a ha)
-  haveI : IsScalarTower F Fx K := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ x hx)
-  haveI : Fact (Irreducible <| minpoly F x) := ⟨minpoly.irreducible <| hFK x⟩
-  let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base Fx hK)
-  exact
-    ⟨ψ₀.restrictScalars F,
-      (congr_arg ψ₀ (AdjoinRoot.lift_root hx).symm).trans <|
-        (ψ₀.commutes _).trans <| AdjoinRoot.lift_root ha⟩
+  refine ⟨fun ⟨ψ, hψ⟩ ↦ ?_, fun ha ↦ IntermediateField.exists_algHom_of_splits_of_aeval
+    (fun x ↦ ⟨hFK x, IsAlgClosed.splits_codomain _⟩) ha⟩
+  rw [← hψ, aeval_algHom_apply ψ x, minpoly.aeval, map_zero]
 #align algebra.is_algebraic.range_eval_eq_root_set_minpoly Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly
feat(FieldTheory/IsSepClosed): add IsSepClosed.lift and IsSepClosure.equiv (#6670)
  • IsSepClosed.lift is a map from a separable extension L of K, into any separably closed extension M of K.

  • IsSepClosure.equiv is a proof that any two separable closures of the same field are isomorphic.

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

Diff
@@ -351,10 +351,9 @@ variable {K : Type u} [Field K] {L : Type v} {M : Type w} [Field L] [Algebra K L
 variable (K L M)
 
 /-- Less general version of `lift`. -/
-private noncomputable irreducible_def lift_aux : L →ₐ[K] M :=
-  (lift.SubfieldWithHom.maximalSubfieldWithHom K L M).emb.comp <|
-    (lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top (K := K) (L := L) (M := M) (hL := hL)).symm
-      ▸ Algebra.toTop
+private noncomputable irreducible_def lift_aux : L →ₐ[K] M := Classical.choice <|
+  IntermediateField.algHom_mk_adjoin_splits' (IntermediateField.adjoin_univ K L)
+    (fun x _ ↦ ⟨isAlgebraic_iff_isIntegral.1 (hL x), splits_codomain (minpoly K x)⟩)
 
 variable {R : Type u} [CommRing R]
 
@@ -425,19 +424,11 @@ variable [Algebra R L] [NoZeroSMulDivisors R L] [IsAlgClosure R L]
 /-- A (random) isomorphism between two algebraic closures of `R`. -/
 noncomputable def equiv : L ≃ₐ[R] M :=
   -- Porting note: added to replace local instance above
+  haveI : IsAlgClosed L := IsAlgClosure.alg_closed R
   haveI : IsAlgClosed M := IsAlgClosure.alg_closed R
-  let f : L →ₐ[R] M := IsAlgClosed.lift IsAlgClosure.algebraic
-  AlgEquiv.ofBijective f
-    ⟨RingHom.injective f.toRingHom, by
-      letI : Algebra L M := RingHom.toAlgebra f
-      letI : IsScalarTower R L M := IsScalarTower.of_algebraMap_eq <| by
-        simp only [RingHom.algebraMap_toAlgebra, RingHom.coe_coe, AlgHom.commutes, forall_const]
-      letI : IsAlgClosed L := IsAlgClosure.alg_closed R
-      show Function.Surjective (algebraMap L M)
-      exact
-        IsAlgClosed.algebraMap_surjective_of_isAlgebraic
-          (Algebra.isAlgebraic_of_larger_base_of_injective
-            (NoZeroSMulDivisors.algebraMap_injective R _) IsAlgClosure.algebraic)⟩
+  AlgEquiv.ofBijective _ (IsAlgClosure.algebraic.algHom_bijective₂
+    (IsAlgClosed.lift IsAlgClosure.algebraic : L →ₐ[R] M)
+    (IsAlgClosed.lift IsAlgClosure.algebraic : M →ₐ[R] L)).1
 #align is_alg_closure.equiv IsAlgClosure.equiv
 
 end
refactor: golf Normal.of_isSplittingField (#8004)

Before: Construction only imports Normal, which transitively imports IsSplittingField Now: Normal imports Construction, Construction only imports IsSplittingField So no extra transitive import is added to any file other than Construction and Normal. As a consequence, Polynomial.SplittingField.instNormal is moved from Construction to Normal.

adjoin_rootSet_eq_range is added to IsSplittingField.

splits_of_comp in Splits is extracted from splits_of_splits in IsSplittingField.

Source of proof: https://math.stackexchange.com/a/2585087/12932

Move Algebra.adjoin.liftSingleton from IsAlgClosed/Basic to Adjoin/Field in order to speed up lift_of_splits (renamed to add namespace Polynomial).

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

Diff
@@ -306,17 +306,6 @@ theorem maximalSubfieldWithHom_is_maximal :
   Classical.choose_spec (exists_maximal_subfieldWithHom K L M)
 #align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
 
--- Porting note: split out this definition from `maximalSubfieldWithHom_eq_top`
-/-- Produce an algebra homomorphism `Adjoin R {x} →ₐ[R] T` sending `x` to
-a root of `x`'s minimal polynomial in `T`. -/
-noncomputable def _root_.Algebra.adjoin.liftSingleton (R : Type*) [Field R] {S T : Type*}
-  [CommRing S] [CommRing T] [Algebra R S] [Algebra R T]
-  (x : S) (y : T) (h : aeval y (minpoly R x) = 0) :
-  Algebra.adjoin R {x} →ₐ[R] T :=
-AlgHom.comp
-  (AdjoinRoot.liftHom _ y h)
-  (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly R x).toAlgHom
-
 -- porting note: this was much faster in lean 3
 set_option synthInstance.maxHeartbeats 200000 in
 theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier = ⊤ := by
chore: removing unneeded maxHeartbeats (#7761)

Due to recent changes in core we can reduce or remove many set_option maxHeartbeats statements.

I have tried to be careful to not leave anything too close to the line, so don't be surprised if some of these can still be reduced further.

This reduces us from 96 maxHeartbeats statements to 44. (There are 10 false positives in meta or testing code.)

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

Diff
@@ -318,7 +318,6 @@ AlgHom.comp
   (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly R x).toAlgHom
 
 -- porting note: this was much faster in lean 3
-set_option maxHeartbeats 300000 in
 set_option synthInstance.maxHeartbeats 200000 in
 theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier = ⊤ := by
   rw [eq_top_iff]
chore: update/remove heart beat bumps (#6860)

We clean up heart beat bumps after #6474.

Diff
@@ -318,8 +318,8 @@ AlgHom.comp
   (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly R x).toAlgHom
 
 -- porting note: this was much faster in lean 3
-set_option maxHeartbeats 800000 in
-set_option synthInstance.maxHeartbeats 400000 in
+set_option maxHeartbeats 300000 in
+set_option synthInstance.maxHeartbeats 200000 in
 theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier = ⊤ := by
   rw [eq_top_iff]
   intro x _
chore: redefine AlgebraicClosure to make certain instance diagrams commute (#6734)

A similar trick to the trick used in #4891 makes all the required type class diagrams commute.

I also added instances for CharP and CharZero and tests for the instance diagrams.

Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>

Diff
@@ -139,6 +139,21 @@ theorem of_exists_root (H : ∀ p : k[X], p.Monic → Irreducible p → ∃ x, p
   exact degree_mul_leadingCoeff_inv q hq.ne_zero ▸ degree_eq_one_of_irreducible_of_root this hx
 #align is_alg_closed.of_exists_root IsAlgClosed.of_exists_root
 
+theorem of_ringEquiv (k' : Type u) [Field k'] (e : k ≃+* k')
+    [IsAlgClosed k] : IsAlgClosed k' := by
+  apply IsAlgClosed.of_exists_root
+  intro p hmp hp
+  have hpe : degree (p.map e.symm.toRingHom) ≠ 0 := by
+    rw [degree_map]
+    exact ne_of_gt (degree_pos_of_irreducible hp)
+  rcases IsAlgClosed.exists_root (k := k) (p.map e.symm) hpe with ⟨x, hx⟩
+  use e x
+  rw [IsRoot] at hx
+  apply e.symm.injective
+  rw [map_zero, ← hx]
+  clear hx hpe hp hmp
+  induction p using Polynomial.induction_on <;> simp_all
+
 theorem degree_eq_one_of_irreducible [IsAlgClosed k] {p : k[X]} (hp : Irreducible p) :
     p.degree = 1 :=
   degree_eq_one_of_irreducible_of_splits hp (IsAlgClosed.splits_codomain _)
fix: remove a bad Algebra instance in FractionRing (#6724)
Diff
@@ -362,8 +362,11 @@ variable {M}
 
 private theorem FractionRing.isAlgebraic :
     letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
+    letI : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R _
     Algebra.IsAlgebraic (FractionRing R) (FractionRing S) := by
   letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
+  letI : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R _
+  have := FractionRing.isScalarTower_liftAlgebra R (FractionRing S)
   intro
   exact
     (IsFractionRing.isAlgebraic_iff R (FractionRing R) (FractionRing S)).1
@@ -373,6 +376,10 @@ private theorem FractionRing.isAlgebraic :
   closed extension of R. -/
 noncomputable irreducible_def lift : S →ₐ[R] M := by
   letI : IsDomain R := (NoZeroSMulDivisors.algebraMap_injective R S).isDomain _
+  letI := FractionRing.liftAlgebra R M
+  letI := FractionRing.liftAlgebra R (FractionRing S)
+  have := FractionRing.isScalarTower_liftAlgebra R M
+  have := FractionRing.isScalarTower_liftAlgebra R (FractionRing S)
   have : Algebra.IsAlgebraic (FractionRing R) (FractionRing S) :=
     FractionRing.isAlgebraic hS
   let f : FractionRing S →ₐ[FractionRing R] M := lift_aux (FractionRing R) (FractionRing S) M this
chore(IsAlgClosed): move some defs about lift into IsAlgClosed namespace (#6754)

Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com>

Diff
@@ -193,6 +193,8 @@ instance (priority := 100) IsAlgClosure.separable (R K : Type*) [Field R] [Field
     (minpoly.irreducible (isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _))).separable⟩
 #align is_alg_closure.separable IsAlgClosure.separable
 
+namespace IsAlgClosed
+
 namespace lift
 
 /- In this section, the homomorphism from any algebraic extension into an algebraically
@@ -208,9 +210,11 @@ open Subalgebra AlgHom Function
 /-- This structure is used to prove the existence of a homomorphism from any algebraic extension
 into an algebraic closure -/
 structure SubfieldWithHom where
+  /-- The corresponding `Subalgebra` -/
   carrier : Subalgebra K L
+  /-- The embedding into the algebraically closed field -/
   emb : carrier →ₐ[K] M
-#align lift.subfield_with_hom lift.SubfieldWithHom
+#align lift.subfield_with_hom IsAlgClosed.lift.SubfieldWithHom
 
 variable {K L M hL}
 
@@ -227,11 +231,11 @@ noncomputable instance : Inhabited (SubfieldWithHom K L M) :=
 
 theorem le_def : E₁ ≤ E₂ ↔ ∃ h : E₁.carrier ≤ E₂.carrier, ∀ x, E₂.emb (inclusion h x) = E₁.emb x :=
   Iff.rfl
-#align lift.subfield_with_hom.le_def lift.SubfieldWithHom.le_def
+#align lift.subfield_with_hom.le_def IsAlgClosed.lift.SubfieldWithHom.le_def
 
 theorem compat (h : E₁ ≤ E₂) : ∀ x, E₂.emb (inclusion h.fst x) = E₁.emb x := by
   rw [le_def] at h; cases h; assumption
-#align lift.subfield_with_hom.compat lift.SubfieldWithHom.compat
+#align lift.subfield_with_hom.compat IsAlgClosed.lift.SubfieldWithHom.compat
 
 instance : Preorder (SubfieldWithHom K L M) where
   le := (· ≤ ·)
@@ -268,24 +272,24 @@ theorem maximal_subfieldWithHom_chain_bounded (c : Set (SubfieldWithHom K L M))
          ⟨(le_iSup (fun i : c => (i : SubfieldWithHom K L M).carrier) ⟨N, hN⟩ : _), by
            intro x
            simp⟩⟩
-#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
+#align lift.subfield_with_hom.maximal_subfield_with_hom_chain_bounded IsAlgClosed.lift.SubfieldWithHom.maximal_subfieldWithHom_chain_bounded
 
 variable (K L M)
 
 theorem exists_maximal_subfieldWithHom : ∃ E : SubfieldWithHom K L M, ∀ N, E ≤ N → N ≤ E :=
   exists_maximal_of_chains_bounded maximal_subfieldWithHom_chain_bounded le_trans
-#align lift.subfield_with_hom.exists_maximal_subfield_with_hom lift.SubfieldWithHom.exists_maximal_subfieldWithHom
+#align lift.subfield_with_hom.exists_maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.exists_maximal_subfieldWithHom
 
 /-- The maximal `SubfieldWithHom`. We later prove that this is equal to `⊤`. -/
 noncomputable def maximalSubfieldWithHom : SubfieldWithHom K L M :=
   Classical.choose (exists_maximal_subfieldWithHom K L M)
-#align lift.subfield_with_hom.maximal_subfield_with_hom lift.SubfieldWithHom.maximalSubfieldWithHom
+#align lift.subfield_with_hom.maximal_subfield_with_hom IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom
 
 theorem maximalSubfieldWithHom_is_maximal :
     ∀ N : SubfieldWithHom K L M,
       maximalSubfieldWithHom K L M ≤ N → N ≤ maximalSubfieldWithHom K L M :=
   Classical.choose_spec (exists_maximal_subfieldWithHom K L M)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
+#align lift.subfield_with_hom.maximal_subfield_with_hom_is_maximal IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_is_maximal
 
 -- Porting note: split out this definition from `maximalSubfieldWithHom_eq_top`
 /-- Produce an algebra homomorphism `Adjoin R {x} →ₐ[R] T` sending `x` to
@@ -332,14 +336,12 @@ theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier =
   refine' (maximalSubfieldWithHom_is_maximal K L M O' hO').fst _
   show x ∈ Algebra.adjoin N {(x : L)}
   exact Algebra.subset_adjoin (Set.mem_singleton x)
-#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
+#align lift.subfield_with_hom.maximal_subfield_with_hom_eq_top IsAlgClosed.lift.SubfieldWithHom.maximalSubfieldWithHom_eq_top
 
 end SubfieldWithHom
 
 end lift
 
-namespace IsAlgClosed
-
 variable {K : Type u} [Field K] {L : Type v} {M : Type w} [Field L] [Algebra K L] [Field M]
   [Algebra K M] [IsAlgClosed M] (hL : Algebra.IsAlgebraic K L)
 
chore: refactor perfect rings / fields (#6182)

The main changes are:

  • we replace the data-bearing PerfectRing typeclass with a Prop-valued (non-constructive) version,
  • we introduce a new typeclass PerfectField,
  • we add a proof that a perfect field of positive characteristic has surjective Frobenius map,
  • we add some basic facts such as perfection of finite rings / fields and products of perfect rings.
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
 -/
 import Mathlib.FieldTheory.Normal
-import Mathlib.FieldTheory.PerfectClosure
+import Mathlib.FieldTheory.Perfect
 import Mathlib.RingTheory.Localization.Integral
 
 #align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
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
@@ -58,7 +58,7 @@ class IsAlgClosed : Prop where
 
 See also `IsAlgClosed.splits_domain` for the case where `K` is algebraically closed.
 -/
-theorem IsAlgClosed.splits_codomain {k K : Type _} [Field k] [IsAlgClosed k] [Field K] {f : K →+* k}
+theorem IsAlgClosed.splits_codomain {k K : Type*} [Field k] [IsAlgClosed k] [Field K] {f : K →+* k}
     (p : K[X]) : p.Splits f := by convert IsAlgClosed.splits (p.map f); simp [splits_map_iff]
 #align is_alg_closed.splits_codomain IsAlgClosed.splits_codomain
 
@@ -66,7 +66,7 @@ theorem IsAlgClosed.splits_codomain {k K : Type _} [Field k] [IsAlgClosed k] [Fi
 
 See also `IsAlgClosed.splits_codomain` for the case where `k` is algebraically closed.
 -/
-theorem IsAlgClosed.splits_domain {k K : Type _} [Field k] [IsAlgClosed k] [Field K] {f : k →+* K}
+theorem IsAlgClosed.splits_domain {k K : Type*} [Field k] [IsAlgClosed k] [Field K] {f : k →+* K}
     (p : k[X]) : p.Splits f :=
   Polynomial.splits_of_splits_id _ <| IsAlgClosed.splits _
 #align is_alg_closed.splits_domain IsAlgClosed.splits_domain
@@ -104,26 +104,26 @@ theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} :
     simp at hz
 #align is_alg_closed.roots_eq_zero_iff IsAlgClosed.roots_eq_zero_iff
 
-theorem exists_eval₂_eq_zero_of_injective {R : Type _} [Ring R] [IsAlgClosed k] (f : R →+* k)
+theorem exists_eval₂_eq_zero_of_injective {R : Type*} [Ring R] [IsAlgClosed k] (f : R →+* k)
     (hf : Function.Injective f) (p : R[X]) (hp : p.degree ≠ 0) : ∃ x, p.eval₂ f x = 0 :=
   let ⟨x, hx⟩ := exists_root (p.map f) (by rwa [degree_map_eq_of_injective hf])
   ⟨x, by rwa [eval₂_eq_eval_map, ← IsRoot]⟩
 #align is_alg_closed.exists_eval₂_eq_zero_of_injective IsAlgClosed.exists_eval₂_eq_zero_of_injective
 
-theorem exists_eval₂_eq_zero {R : Type _} [Field R] [IsAlgClosed k] (f : R →+* k) (p : R[X])
+theorem exists_eval₂_eq_zero {R : Type*} [Field R] [IsAlgClosed k] (f : R →+* k) (p : R[X])
     (hp : p.degree ≠ 0) : ∃ x, p.eval₂ f x = 0 :=
   exists_eval₂_eq_zero_of_injective f f.injective p hp
 #align is_alg_closed.exists_eval₂_eq_zero IsAlgClosed.exists_eval₂_eq_zero
 
 variable (k)
 
-theorem exists_aeval_eq_zero_of_injective {R : Type _} [CommRing R] [IsAlgClosed k] [Algebra R k]
+theorem exists_aeval_eq_zero_of_injective {R : Type*} [CommRing R] [IsAlgClosed k] [Algebra R k]
     (hinj : Function.Injective (algebraMap R k)) (p : R[X]) (hp : p.degree ≠ 0) :
     ∃ x : k, aeval x p = 0 :=
   exists_eval₂_eq_zero_of_injective (algebraMap R k) hinj p hp
 #align is_alg_closed.exists_aeval_eq_zero_of_injective IsAlgClosed.exists_aeval_eq_zero_of_injective
 
-theorem exists_aeval_eq_zero {R : Type _} [Field R] [IsAlgClosed k] [Algebra R k] (p : R[X])
+theorem exists_aeval_eq_zero {R : Type*} [Field R] [IsAlgClosed k] [Algebra R k] (p : R[X])
     (hp : p.degree ≠ 0) : ∃ x : k, aeval x p = 0 :=
   exists_eval₂_eq_zero (algebraMap R k) p hp
 #align is_alg_closed.exists_aeval_eq_zero IsAlgClosed.exists_aeval_eq_zero
@@ -144,7 +144,7 @@ theorem degree_eq_one_of_irreducible [IsAlgClosed k] {p : k[X]} (hp : Irreducibl
   degree_eq_one_of_irreducible_of_splits hp (IsAlgClosed.splits_codomain _)
 #align is_alg_closed.degree_eq_one_of_irreducible IsAlgClosed.degree_eq_one_of_irreducible
 
-theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [IsDomain K]
+theorem algebraMap_surjective_of_isIntegral {k K : Type*} [Field k] [Ring K] [IsDomain K]
     [hk : IsAlgClosed k] [Algebra k K] (hf : Algebra.IsIntegral k K) :
     Function.Surjective (algebraMap k K) := by
   refine' fun x => ⟨-(minpoly k x).coeff 0, _⟩
@@ -156,12 +156,12 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
   exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
 #align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
 
-theorem algebraMap_surjective_of_isIntegral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
+theorem algebraMap_surjective_of_isIntegral' {k K : Type*} [Field k] [CommRing K] [IsDomain K]
     [IsAlgClosed k] (f : k →+* K) (hf : f.IsIntegral) : Function.Surjective f :=
   @algebraMap_surjective_of_isIntegral k K _ _ _ _ f.toAlgebra hf
 #align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebraMap_surjective_of_isIntegral'
 
-theorem algebraMap_surjective_of_isAlgebraic {k K : Type _} [Field k] [Ring K] [IsDomain K]
+theorem algebraMap_surjective_of_isAlgebraic {k K : Type*} [Field k] [Ring K] [IsDomain K]
     [IsAlgClosed k] [Algebra k K] (hf : Algebra.IsAlgebraic k K) :
     Function.Surjective (algebraMap k K) :=
   algebraMap_surjective_of_isIntegral (Algebra.isAlgebraic_iff_isIntegral.mp hf)
@@ -181,13 +181,13 @@ theorem isAlgClosure_iff (K : Type v) [Field K] [Algebra k K] :
   ⟨fun h => ⟨h.1, h.2⟩, fun h => ⟨h.1, h.2⟩⟩
 #align is_alg_closure_iff isAlgClosure_iff
 
-instance (priority := 100) IsAlgClosure.normal (R K : Type _) [Field R] [Field K] [Algebra R K]
+instance (priority := 100) IsAlgClosure.normal (R K : Type*) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] : Normal R K :=
   ⟨IsAlgClosure.algebraic, fun _ =>
     @IsAlgClosed.splits_codomain _ _ _ (IsAlgClosure.alg_closed R) _ _ _⟩
 #align is_alg_closure.normal IsAlgClosure.normal
 
-instance (priority := 100) IsAlgClosure.separable (R K : Type _) [Field R] [Field K] [Algebra R K]
+instance (priority := 100) IsAlgClosure.separable (R K : Type*) [Field R] [Field K] [Algebra R K]
     [IsAlgClosure R K] [CharZero R] : IsSeparable R K :=
   ⟨fun _ => isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _), fun _ =>
     (minpoly.irreducible (isAlgebraic_iff_isIntegral.mp (IsAlgClosure.algebraic _))).separable⟩
@@ -290,7 +290,7 @@ theorem maximalSubfieldWithHom_is_maximal :
 -- Porting note: split out this definition from `maximalSubfieldWithHom_eq_top`
 /-- Produce an algebra homomorphism `Adjoin R {x} →ₐ[R] T` sending `x` to
 a root of `x`'s minimal polynomial in `T`. -/
-noncomputable def _root_.Algebra.adjoin.liftSingleton (R : Type _) [Field R] {S T : Type _}
+noncomputable def _root_.Algebra.adjoin.liftSingleton (R : Type*) [Field R] {S T : Type*}
   [CommRing S] [CommRing T] [Algebra R S] [Algebra R T]
   (x : S) (y : T) (h : aeval y (minpoly R x) = 0) :
   Algebra.adjoin R {x} →ₐ[R] T :=
@@ -383,7 +383,7 @@ noncomputable instance (priority := 100) perfectRing (p : ℕ) [Fact p.Prime] [C
 #align is_alg_closed.perfect_ring IsAlgClosed.perfectRing
 
 /-- Algebraically closed fields are infinite since `Xⁿ⁺¹ - 1` is separable when `#K = n` -/
-instance (priority := 500) {K : Type _} [Field K] [IsAlgClosed K] : Infinite K := by
+instance (priority := 500) {K : Type*} [Field K] [IsAlgClosed K] : Infinite K := by
   apply Infinite.of_not_fintype
   intro hfin
   set n := Fintype.card K
@@ -430,7 +430,7 @@ noncomputable def equiv : L ≃ₐ[R] M :=
 
 end
 
-variable (K : Type _) (J : Type _) (R : Type u) (S : Type _) (L : Type v) (M : Type w)
+variable (K : Type*) (J : Type*) (R : Type u) (S : Type*) (L : Type v) (M : Type w)
   [Field K] [Field J] [CommRing R] [CommRing S] [Field L] [Field M]
   [Algebra R M] [NoZeroSMulDivisors R M] [IsAlgClosure R M] [Algebra K M] [IsAlgClosure K M]
   [Algebra S L] [NoZeroSMulDivisors S L] [IsAlgClosure S L]
fix: fill in "in" in maxHeartbeats (#6206)
git ls-files '*.lean' | xargs sed -i "s=maxHeartbeats [0-9]*$=& in="

Affected files:

Mathlib/CategoryTheory/Monoidal/Braided.lean:479:set_option maxHeartbeats 400000
Mathlib/FieldTheory/Adjoin.lean:1212:set_option synthInstance.maxHeartbeats 30000
Mathlib/FieldTheory/IsAlgClosed/Basic.lean:302:set_option maxHeartbeats 800000
Mathlib/FieldTheory/IsAlgClosed/Basic.lean:303:set_option synthInstance.maxHeartbeats 400000
Mathlib/RepresentationTheory/GroupCohomology/Basic.lean:202:set_option maxHeartbeats 6400000
Mathlib/RepresentationTheory/GroupCohomology/Resolution.lean:345:set_option maxHeartbeats 800000
Mathlib/Topology/MetricSpace/GromovHausdorff.lean:415:set_option maxHeartbeats 300000

Zulip

Diff
@@ -299,8 +299,8 @@ AlgHom.comp
   (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly R x).toAlgHom
 
 -- porting note: this was much faster in lean 3
-set_option maxHeartbeats 800000
-set_option synthInstance.maxHeartbeats 400000
+set_option maxHeartbeats 800000 in
+set_option synthInstance.maxHeartbeats 400000 in
 theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier = ⊤ := by
   rw [eq_top_iff]
   intro x _
chore(FieldTheory/Adjoin): remove unnecessary assumptions in minpolynatDegree_le and minpoly.degree_le (#6152)

Also

  • fix the names of minpoly.natDegree_le and minpoly.degree_le
  • rename minpoly.ne_zero_of_finite_field_extension to minpoly.ne_zero_of_finite
  • reduce typeclass assumptions of some lemmas in RingTheory/Algebraic
  • add two lemmas isIntegral_of_finite and isAlgebraic_of_finite
  • move Algebra.isIntegral_of_finite to RingTheory/IntegralClosure
Diff
@@ -309,7 +309,7 @@ theorem maximalSubfieldWithHom_eq_top : (maximalSubfieldWithHom K L M).carrier =
   letI : Algebra N M := (maximalSubfieldWithHom K L M).emb.toRingHom.toAlgebra
   obtain ⟨y, hy⟩ := IsAlgClosed.exists_aeval_eq_zero M (minpoly N x) <|
     (minpoly.degree_pos
-      (isAlgebraic_iff_isIntegral.1 (Algebra.isAlgebraic_of_larger_base _ _ hL x))).ne'
+      (isAlgebraic_iff_isIntegral.1 (Algebra.isAlgebraic_of_larger_base _ hL x))).ne'
   let O : Subalgebra N L := Algebra.adjoin N {(x : L)}
   letI : Algebra N O := Subalgebra.algebra O
   -- Porting note: there are some tricky unfolds going on here:
@@ -549,7 +549,7 @@ theorem Algebra.IsAlgebraic.range_eval_eq_rootSet_minpoly {F K} (A) [Field F] [F
   haveI : IsScalarTower F Fx A := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ a ha)
   haveI : IsScalarTower F Fx K := IsScalarTower.of_ring_hom (AdjoinRoot.liftHom _ x hx)
   haveI : Fact (Irreducible <| minpoly F x) := ⟨minpoly.irreducible <| hFK x⟩
-  let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base F Fx hK)
+  let ψ₀ : K →ₐ[Fx] A := IsAlgClosed.lift (Algebra.isAlgebraic_of_larger_base Fx hK)
   exact
     ⟨ψ₀.restrictScalars F,
       (congr_arg ψ₀ (AdjoinRoot.lift_root hx).symm).trans <|
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 Kenny Lau. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kenny Lau
-
-! This file was ported from Lean 3 source module field_theory.is_alg_closed.basic
-! 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.FieldTheory.Normal
 import Mathlib.FieldTheory.PerfectClosure
 import Mathlib.RingTheory.Localization.Integral
 
+#align_import field_theory.is_alg_closed.basic from "leanprover-community/mathlib"@"00f91228655eecdcd3ac97a7fd8dbcb139fe990a"
+
 /-!
 # Algebraically Closed Field
 
chore: tidy various files (#4997)
Diff
@@ -98,7 +98,7 @@ theorem exists_eq_mul_self [IsAlgClosed k] (x : k) : ∃ z, x = z * z := by
 #align is_alg_closed.exists_eq_mul_self IsAlgClosed.exists_eq_mul_self
 
 theorem roots_eq_zero_iff [IsAlgClosed k] {p : k[X]} :
-  p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) := by
+    p.roots = 0 ↔ p = Polynomial.C (p.coeff 0) := by
   refine' ⟨fun h => _, fun hp => by rw [hp, roots_C]⟩
   cases' le_or_lt (degree p) 0 with hd hd
   · exact eq_C_of_degree_le_zero hd
@@ -159,10 +159,10 @@ theorem algebraMap_surjective_of_isIntegral {k K : Type _} [Field k] [Ring K] [I
   exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
 #align is_alg_closed.algebra_map_surjective_of_is_integral IsAlgClosed.algebraMap_surjective_of_isIntegral
 
-theorem algebra_map_surjective_of_is_integral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
+theorem algebraMap_surjective_of_isIntegral' {k K : Type _} [Field k] [CommRing K] [IsDomain K]
     [IsAlgClosed k] (f : k →+* K) (hf : f.IsIntegral) : Function.Surjective f :=
   @algebraMap_surjective_of_isIntegral k K _ _ _ _ f.toAlgebra hf
-#align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebra_map_surjective_of_is_integral'
+#align is_alg_closed.algebra_map_surjective_of_is_integral' IsAlgClosed.algebraMap_surjective_of_isIntegral'
 
 theorem algebraMap_surjective_of_isAlgebraic {k K : Type _} [Field k] [Ring K] [IsDomain K]
     [IsAlgClosed k] [Algebra k K] (hf : Algebra.IsAlgebraic k K) :
feat: port FieldTheory.IsAlgClosed.Spectrum (#4935)
Diff
@@ -54,7 +54,7 @@ To show `Polynomial.Splits p f` for an arbitrary ring homomorphism `f`,
 see `IsAlgClosed.splits_codomain` and `IsAlgClosed.splits_domain`.
 -/
 class IsAlgClosed : Prop where
-  Splits : ∀ p : k[X], p.Splits <| RingHom.id k
+  splits : ∀ p : k[X], p.Splits <| RingHom.id k
 #align is_alg_closed IsAlgClosed
 
 /-- Every polynomial splits in the field extension `f : K →+* k` if `k` is algebraically closed.
@@ -62,7 +62,7 @@ class IsAlgClosed : Prop where
 See also `IsAlgClosed.splits_domain` for the case where `K` is algebraically closed.
 -/
 theorem IsAlgClosed.splits_codomain {k K : Type _} [Field k] [IsAlgClosed k] [Field K] {f : K →+* k}
-    (p : K[X]) : p.Splits f := by convert IsAlgClosed.Splits (p.map f); simp [splits_map_iff]
+    (p : K[X]) : p.Splits f := by convert IsAlgClosed.splits (p.map f); simp [splits_map_iff]
 #align is_alg_closed.splits_codomain IsAlgClosed.splits_codomain
 
 /-- Every polynomial splits in the field extension `f : K →+* k` if `K` is algebraically closed.
@@ -71,7 +71,7 @@ See also `IsAlgClosed.splits_codomain` for the case where `k` is algebraically c
 -/
 theorem IsAlgClosed.splits_domain {k K : Type _} [Field k] [IsAlgClosed k] [Field K] {f : k →+* K}
     (p : k[X]) : p.Splits f :=
-  Polynomial.splits_of_splits_id _ <| IsAlgClosed.Splits _
+  Polynomial.splits_of_splits_id _ <| IsAlgClosed.splits _
 #align is_alg_closed.splits_domain IsAlgClosed.splits_domain
 
 namespace IsAlgClosed
@@ -79,7 +79,7 @@ namespace IsAlgClosed
 variable {k}
 
 theorem exists_root [IsAlgClosed k] (p : k[X]) (hp : p.degree ≠ 0) : ∃ x, IsRoot p x :=
-  exists_root_of_splits _ (IsAlgClosed.Splits p) hp
+  exists_root_of_splits _ (IsAlgClosed.splits p) hp
 #align is_alg_closed.exists_root IsAlgClosed.exists_root
 
 theorem exists_pow_nat_eq [IsAlgClosed k] (x : k) {n : ℕ} (hn : 0 < n) : ∃ z, z ^ n = x := by
feat: port FieldTheory.IsAlgClosed.Basic (#4888)

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com> Co-authored-by: Vierkantor <vierkantor@vierkantor.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Dependencies 10 + 658

659 files ported (98.5%)
274251 lines ported (98.8%)
Show graph

The unported dependencies are