ring_theory.adjoin.fieldMathlib.RingTheory.Adjoin.Field

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -3,7 +3,7 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Chris Hughes
 -/
-import Data.Polynomial.Splits
+import Algebra.Polynomial.Splits
 import RingTheory.Adjoin.Basic
 import RingTheory.AdjoinRoot
 
Diff
@@ -68,7 +68,7 @@ theorem Polynomial.lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L]
   refine' Finset.induction_on s (fun H => _) fun a s has ih H => _
   · rw [coe_empty, Algebra.adjoin_empty]
     exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
-  rw [forall_mem_insert] at H 
+  rw [forall_mem_insert] at H
   rcases H with ⟨⟨H1, H2⟩, H3⟩
   cases' ih H3 with f
   choose H3 H4 using H3
Diff
@@ -63,7 +63,36 @@ theorem Polynomial.lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L]
     [Algebra F L] (s : Finset K) :
     (∀ x ∈ s, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x)) →
       Nonempty (Algebra.adjoin F (↑s : Set K) →ₐ[F] L) :=
-  by classical
+  by
+  classical
+  refine' Finset.induction_on s (fun H => _) fun a s has ih H => _
+  · rw [coe_empty, Algebra.adjoin_empty]
+    exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
+  rw [forall_mem_insert] at H 
+  rcases H with ⟨⟨H1, H2⟩, H3⟩
+  cases' ih H3 with f
+  choose H3 H4 using H3
+  rw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]
+  letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
+  haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
+    ((Submodule.fg_iff_finiteDimensional _).1
+        (fg_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
+  letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
+  have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := IsIntegral.tower_top H1
+  have H6 :
+    (minpoly (Algebra.adjoin F (↑s : Set K)) a).Splits
+      (algebraMap (Algebra.adjoin F (↑s : Set K)) L) :=
+    by
+    refine'
+      Polynomial.splits_of_splits_of_dvd _
+        (Polynomial.map_ne_zero <| minpoly.ne_zero H1 : Polynomial.map (algebraMap _ _) _ ≠ 0)
+        ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)
+    · rw [← IsScalarTower.algebraMap_eq]; exact H2
+    · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]
+  obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm
+  refine' ⟨Subalgebra.ofRestrictScalars _ _ _⟩
+  refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
+  exact AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a
 #align lift_of_splits Polynomial.lift_of_splits
 -/
 
Diff
@@ -63,36 +63,7 @@ theorem Polynomial.lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L]
     [Algebra F L] (s : Finset K) :
     (∀ x ∈ s, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x)) →
       Nonempty (Algebra.adjoin F (↑s : Set K) →ₐ[F] L) :=
-  by
-  classical
-  refine' Finset.induction_on s (fun H => _) fun a s has ih H => _
-  · rw [coe_empty, Algebra.adjoin_empty]
-    exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
-  rw [forall_mem_insert] at H 
-  rcases H with ⟨⟨H1, H2⟩, H3⟩
-  cases' ih H3 with f
-  choose H3 H4 using H3
-  rw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]
-  letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
-  haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
-    ((Submodule.fg_iff_finiteDimensional _).1
-        (fg_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
-  letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
-  have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := IsIntegral.tower_top H1
-  have H6 :
-    (minpoly (Algebra.adjoin F (↑s : Set K)) a).Splits
-      (algebraMap (Algebra.adjoin F (↑s : Set K)) L) :=
-    by
-    refine'
-      Polynomial.splits_of_splits_of_dvd _
-        (Polynomial.map_ne_zero <| minpoly.ne_zero H1 : Polynomial.map (algebraMap _ _) _ ≠ 0)
-        ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)
-    · rw [← IsScalarTower.algebraMap_eq]; exact H2
-    · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]
-  obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm
-  refine' ⟨Subalgebra.ofRestrictScalars _ _ _⟩
-  refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
-  exact AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a
+  by classical
 #align lift_of_splits Polynomial.lift_of_splits
 -/
 
Diff
@@ -76,9 +76,9 @@ theorem Polynomial.lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L]
   letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
   haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
     ((Submodule.fg_iff_finiteDimensional _).1
-        (FG_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
+        (fg_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
   letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
-  have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := isIntegral_of_isScalarTower H1
+  have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := IsIntegral.tower_top H1
   have H6 :
     (minpoly (Algebra.adjoin F (↑s : Set K)) a).Splits
       (algebraMap (Algebra.adjoin F (↑s : Set K)) L) :=
Diff
@@ -56,11 +56,11 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Al
 
 open Finset
 
-#print lift_of_splits /-
+#print Polynomial.lift_of_splits /-
 /-- If `K` and `L` are field extensions of `F` and we have `s : finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `algebra.adjoin F s` embeds in `L`. -/
-theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
-    (s : Finset K) :
+theorem Polynomial.lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K]
+    [Algebra F L] (s : Finset K) :
     (∀ x ∈ s, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x)) →
       Nonempty (Algebra.adjoin F (↑s : Set K) →ₐ[F] L) :=
   by
@@ -93,7 +93,7 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
   refine' ⟨Subalgebra.ofRestrictScalars _ _ _⟩
   refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
   exact AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a
-#align lift_of_splits lift_of_splits
+#align lift_of_splits Polynomial.lift_of_splits
 -/
 
 end Embeddings
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Chris Hughes
 -/
-import Mathbin.Data.Polynomial.Splits
-import Mathbin.RingTheory.Adjoin.Basic
-import Mathbin.RingTheory.AdjoinRoot
+import Data.Polynomial.Splits
+import RingTheory.Adjoin.Basic
+import RingTheory.AdjoinRoot
 
 #align_import ring_theory.adjoin.field from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Chris Hughes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Chris Hughes
-
-! This file was ported from Lean 3 source module ring_theory.adjoin.field
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Polynomial.Splits
 import Mathbin.RingTheory.Adjoin.Basic
 import Mathbin.RingTheory.AdjoinRoot
 
+#align_import ring_theory.adjoin.field from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
 /-!
 # Adjoining elements to a field
 
Diff
@@ -36,6 +36,7 @@ section Embeddings
 
 variable (F : Type _) [Field F]
 
+#print AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly /-
 /-- If `p` is the minimal polynomial of `a` over `F` then `F[a] ≃ₐ[F] F[x]/(p)` -/
 def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Algebra F R] (x : R) :
     Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) :=
@@ -54,9 +55,11 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Al
           (SetLike.ext_iff.1 (Algebra.adjoin_singleton_eq_range_aeval F x) (y : R)).1 y.2
         ⟨AdjoinRoot.mk _ p, Subtype.eq hp⟩⟩
 #align alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly
+-/
 
 open Finset
 
+#print lift_of_splits /-
 /-- If `K` and `L` are field extensions of `F` and we have `s : finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
@@ -94,6 +97,7 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
   refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
   exact AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a
 #align lift_of_splits lift_of_splits
+-/
 
 end Embeddings
 
Diff
@@ -65,34 +65,34 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
       Nonempty (Algebra.adjoin F (↑s : Set K) →ₐ[F] L) :=
   by
   classical
-    refine' Finset.induction_on s (fun H => _) fun a s has ih H => _
-    · rw [coe_empty, Algebra.adjoin_empty]
-      exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
-    rw [forall_mem_insert] at H 
-    rcases H with ⟨⟨H1, H2⟩, H3⟩
-    cases' ih H3 with f
-    choose H3 H4 using H3
-    rw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]
-    letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
-    haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
-      ((Submodule.fg_iff_finiteDimensional _).1
-          (FG_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
-    letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
-    have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := isIntegral_of_isScalarTower H1
-    have H6 :
-      (minpoly (Algebra.adjoin F (↑s : Set K)) a).Splits
-        (algebraMap (Algebra.adjoin F (↑s : Set K)) L) :=
-      by
-      refine'
-        Polynomial.splits_of_splits_of_dvd _
-          (Polynomial.map_ne_zero <| minpoly.ne_zero H1 : Polynomial.map (algebraMap _ _) _ ≠ 0)
-          ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)
-      · rw [← IsScalarTower.algebraMap_eq]; exact H2
-      · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]
-    obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm
-    refine' ⟨Subalgebra.ofRestrictScalars _ _ _⟩
-    refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
-    exact AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a
+  refine' Finset.induction_on s (fun H => _) fun a s has ih H => _
+  · rw [coe_empty, Algebra.adjoin_empty]
+    exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
+  rw [forall_mem_insert] at H 
+  rcases H with ⟨⟨H1, H2⟩, H3⟩
+  cases' ih H3 with f
+  choose H3 H4 using H3
+  rw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]
+  letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
+  haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
+    ((Submodule.fg_iff_finiteDimensional _).1
+        (FG_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
+  letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
+  have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := isIntegral_of_isScalarTower H1
+  have H6 :
+    (minpoly (Algebra.adjoin F (↑s : Set K)) a).Splits
+      (algebraMap (Algebra.adjoin F (↑s : Set K)) L) :=
+    by
+    refine'
+      Polynomial.splits_of_splits_of_dvd _
+        (Polynomial.map_ne_zero <| minpoly.ne_zero H1 : Polynomial.map (algebraMap _ _) _ ≠ 0)
+        ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)
+    · rw [← IsScalarTower.algebraMap_eq]; exact H2
+    · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]
+  obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm
+  refine' ⟨Subalgebra.ofRestrictScalars _ _ _⟩
+  refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
+  exact AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly (Algebra.adjoin F (↑s : Set K)) a
 #align lift_of_splits lift_of_splits
 
 end Embeddings
Diff
@@ -68,7 +68,7 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
     refine' Finset.induction_on s (fun H => _) fun a s has ih H => _
     · rw [coe_empty, Algebra.adjoin_empty]
       exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
-    rw [forall_mem_insert] at H
+    rw [forall_mem_insert] at H 
     rcases H with ⟨⟨H1, H2⟩, H3⟩
     cases' ih H3 with f
     choose H3 H4 using H3
Diff
@@ -30,7 +30,7 @@ the minimal polynomial of each `x ∈ s` splits in `L` then `algebra.adjoin F s`
 
 noncomputable section
 
-open BigOperators Polynomial
+open scoped BigOperators Polynomial
 
 section Embeddings
 
Diff
@@ -36,12 +36,6 @@ section Embeddings
 
 variable (F : Type _) [Field F]
 
-/- warning: alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly -> AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly is a dubious translation:
-lean 3 declaration is
-  forall (F : Type.{u1}) [_inst_1 : Field.{u1} F] {R : Type.{u2}} [_inst_2 : CommRing.{u2} R] [_inst_3 : Algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2))] (x : R), AlgEquiv.{u1, u2, u1} F (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3) R (Subalgebra.setLike.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3)) (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) x))) (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Subalgebra.toSemiring.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) x))) (Ring.toSemiring.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (CommRing.toRing.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (AdjoinRoot.instCommRing.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)))) (Subalgebra.algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) x))) (AdjoinRoot.algebra.{u1, u1} F F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x) (CommRing.toCommSemiring.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1))) (Algebra.id.{u1} F (CommRing.toCommSemiring.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)))))
-but is expected to have type
-  forall (F : Type.{u1}) [_inst_1 : Field.{u1} F] {R : Type.{u2}} [_inst_2 : CommRing.{u2} R] [_inst_3 : Algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2))] (x : R), AlgEquiv.{u1, u2, u1} F (Subtype.{succ u2} R (fun (x_1 : R) => Membership.mem.{u2, u2} R (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3) (SetLike.instMembership.{u2, u2} (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3) R (Subalgebra.instSetLikeSubalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3)) x_1 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) x)))) (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Subalgebra.toSemiring.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) x))) (CommSemiring.toSemiring.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (CommRing.toCommSemiring.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (AdjoinRoot.instCommRing.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)))) (Subalgebra.algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) x))) (AdjoinRoot.instAlgebraAdjoinRootToSemiringToCommSemiringInstCommRing.{u1, u1} F F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x) (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Algebra.id.{u1} F (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1))))
-Case conversion may be inaccurate. Consider using '#align alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly AlgEquiv.adjoinSingletonEquivAdjoinRootMinpolyₓ'. -/
 /-- If `p` is the minimal polynomial of `a` over `F` then `F[a] ≃ₐ[F] F[x]/(p)` -/
 def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Algebra F R] (x : R) :
     Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) :=
@@ -63,9 +57,6 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Al
 
 open Finset
 
-/- warning: lift_of_splits -> lift_of_splits is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align lift_of_splits lift_of_splitsₓ'. -/
 /-- If `K` and `L` are field extensions of `F` and we have `s : finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
Diff
@@ -96,8 +96,7 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
         Polynomial.splits_of_splits_of_dvd _
           (Polynomial.map_ne_zero <| minpoly.ne_zero H1 : Polynomial.map (algebraMap _ _) _ ≠ 0)
           ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)
-      · rw [← IsScalarTower.algebraMap_eq]
-        exact H2
+      · rw [← IsScalarTower.algebraMap_eq]; exact H2
       · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]
     obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm
     refine' ⟨Subalgebra.ofRestrictScalars _ _ _⟩
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Chris Hughes
 
 ! This file was ported from Lean 3 source module ring_theory.adjoin.field
-! leanprover-community/mathlib commit c4658a649d216f57e99621708b09dcb3dcccbd23
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
 ! 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.AdjoinRoot
 /-!
 # Adjoining elements to a field
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Some lemmas on the ring generating by adjoining an element to a field.
 
 ## Main statements
@@ -61,10 +64,7 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Al
 open Finset
 
 /- warning: lift_of_splits -> lift_of_splits is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} {K : Type.{u2}} {L : Type.{u3}} [_inst_2 : Field.{u1} F] [_inst_3 : Field.{u2} K] [_inst_4 : Field.{u3} L] [_inst_5 : Algebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)))] [_inst_6 : Algebra.{u1, u3} F L (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u3} L (DivisionRing.toRing.{u3} L (Field.toDivisionRing.{u3} L _inst_4)))] (s : Finset.{u2} K), (forall (x : K), (Membership.Mem.{u2, u2} K (Finset.{u2} K) (Finset.hasMem.{u2} K) x s) -> (And (IsIntegral.{u1, u2} F K (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x) (Polynomial.Splits.{u1, u3} F L (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_2)) _inst_4 (algebraMap.{u1, u3} F L (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u3} L (DivisionRing.toRing.{u3} L (Field.toDivisionRing.{u3} L _inst_4))) _inst_6) (minpoly.{u1, u2} F K (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x)))) -> (Nonempty.{max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} F (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5) K (Subalgebra.setLike.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5)) (Algebra.adjoin.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} K) (Set.{u2} K) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (Finset.Set.hasCoeT.{u2} K))) s))) L (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Subalgebra.toSemiring.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} K) (Set.{u2} K) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (Finset.Set.hasCoeT.{u2} K))) s))) (Ring.toSemiring.{u3} L (DivisionRing.toRing.{u3} L (Field.toDivisionRing.{u3} L _inst_4))) (Subalgebra.algebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} K) (Set.{u2} K) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (Finset.Set.hasCoeT.{u2} K))) s))) _inst_6))
-but is expected to have type
-  forall {F : Type.{u3}} {K : Type.{u2}} {L : Type.{u1}} [_inst_2 : Field.{u3} F] [_inst_3 : Field.{u2} K] [_inst_4 : Field.{u1} L] [_inst_5 : Algebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3)))] [_inst_6 : Algebra.{u3, u1} F L (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u1} L (Semifield.toDivisionSemiring.{u1} L (Field.toSemifield.{u1} L _inst_4)))] (s : Finset.{u2} K), (forall (x : K), (Membership.mem.{u2, u2} K (Finset.{u2} K) (Finset.instMembershipFinset.{u2} K) x s) -> (And (IsIntegral.{u3, u2} F K (EuclideanDomain.toCommRing.{u3} F (Field.toEuclideanDomain.{u3} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x) (Polynomial.Splits.{u3, u1} F L (EuclideanDomain.toCommRing.{u3} F (Field.toEuclideanDomain.{u3} F _inst_2)) _inst_4 (algebraMap.{u3, u1} F L (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u1} L (Semifield.toDivisionSemiring.{u1} L (Field.toSemifield.{u1} L _inst_4))) _inst_6) (minpoly.{u3, u2} F K (EuclideanDomain.toCommRing.{u3} F (Field.toEuclideanDomain.{u3} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x)))) -> (Nonempty.{max (succ u1) (succ u2)} (AlgHom.{u3, u2, u1} F (Subtype.{succ u2} K (fun (x : K) => Membership.mem.{u2, u2} K (Subalgebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5) (SetLike.instMembership.{u2, u2} (Subalgebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5) K (Subalgebra.instSetLikeSubalgebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5)) x (Algebra.adjoin.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Finset.toSet.{u2} K s)))) L (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (Subalgebra.toSemiring.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Finset.toSet.{u2} K s))) (DivisionSemiring.toSemiring.{u1} L (Semifield.toDivisionSemiring.{u1} L (Field.toSemifield.{u1} L _inst_4))) (Subalgebra.algebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Finset.toSet.{u2} K s))) _inst_6))
+<too large>
 Case conversion may be inaccurate. Consider using '#align lift_of_splits lift_of_splitsₓ'. -/
 /-- If `K` and `L` are field extensions of `F` and we have `s : finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `algebra.adjoin F s` embeds in `L`. -/
Diff
@@ -33,6 +33,12 @@ section Embeddings
 
 variable (F : Type _) [Field F]
 
+/- warning: alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly -> AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly is a dubious translation:
+lean 3 declaration is
+  forall (F : Type.{u1}) [_inst_1 : Field.{u1} F] {R : Type.{u2}} [_inst_2 : CommRing.{u2} R] [_inst_3 : Algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2))] (x : R), AlgEquiv.{u1, u2, u1} F (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3) R (Subalgebra.setLike.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3)) (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) x))) (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Subalgebra.toSemiring.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) x))) (Ring.toSemiring.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (CommRing.toRing.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (AdjoinRoot.instCommRing.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)))) (Subalgebra.algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) x))) (AdjoinRoot.algebra.{u1, u1} F F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x) (CommRing.toCommSemiring.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1))) (Algebra.id.{u1} F (CommRing.toCommSemiring.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)))))
+but is expected to have type
+  forall (F : Type.{u1}) [_inst_1 : Field.{u1} F] {R : Type.{u2}} [_inst_2 : CommRing.{u2} R] [_inst_3 : Algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2))] (x : R), AlgEquiv.{u1, u2, u1} F (Subtype.{succ u2} R (fun (x_1 : R) => Membership.mem.{u2, u2} R (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3) (SetLike.instMembership.{u2, u2} (Subalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3) R (Subalgebra.instSetLikeSubalgebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3)) x_1 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) x)))) (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Subalgebra.toSemiring.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) x))) (CommSemiring.toSemiring.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (CommRing.toCommSemiring.{u1} (AdjoinRoot.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)) (AdjoinRoot.instCommRing.{u1} F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x)))) (Subalgebra.algebra.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Algebra.adjoin.{u1, u2} F R (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_2)) _inst_3 (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) x))) (AdjoinRoot.instAlgebraAdjoinRootToSemiringToCommSemiringInstCommRing.{u1, u1} F F (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (minpoly.{u1, u2} F R (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_1)) (CommRing.toRing.{u2} R _inst_2) _inst_3 x) (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1)) (Algebra.id.{u1} F (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_1))))
+Case conversion may be inaccurate. Consider using '#align alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly AlgEquiv.adjoinSingletonEquivAdjoinRootMinpolyₓ'. -/
 /-- If `p` is the minimal polynomial of `a` over `F` then `F[a] ≃ₐ[F] F[x]/(p)` -/
 def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Algebra F R] (x : R) :
     Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) :=
@@ -54,6 +60,12 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Al
 
 open Finset
 
+/- warning: lift_of_splits -> lift_of_splits is a dubious translation:
+lean 3 declaration is
+  forall {F : Type.{u1}} {K : Type.{u2}} {L : Type.{u3}} [_inst_2 : Field.{u1} F] [_inst_3 : Field.{u2} K] [_inst_4 : Field.{u3} L] [_inst_5 : Algebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)))] [_inst_6 : Algebra.{u1, u3} F L (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u3} L (DivisionRing.toRing.{u3} L (Field.toDivisionRing.{u3} L _inst_4)))] (s : Finset.{u2} K), (forall (x : K), (Membership.Mem.{u2, u2} K (Finset.{u2} K) (Finset.hasMem.{u2} K) x s) -> (And (IsIntegral.{u1, u2} F K (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x) (Polynomial.Splits.{u1, u3} F L (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_2)) _inst_4 (algebraMap.{u1, u3} F L (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u3} L (DivisionRing.toRing.{u3} L (Field.toDivisionRing.{u3} L _inst_4))) _inst_6) (minpoly.{u1, u2} F K (EuclideanDomain.toCommRing.{u1} F (Field.toEuclideanDomain.{u1} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x)))) -> (Nonempty.{max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} F (coeSort.{succ u2, succ (succ u2)} (Subalgebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5) Type.{u2} (SetLike.hasCoeToSort.{u2, u2} (Subalgebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5) K (Subalgebra.setLike.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5)) (Algebra.adjoin.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} K) (Set.{u2} K) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (Finset.Set.hasCoeT.{u2} K))) s))) L (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Subalgebra.toSemiring.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} K) (Set.{u2} K) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (Finset.Set.hasCoeT.{u2} K))) s))) (Ring.toSemiring.{u3} L (DivisionRing.toRing.{u3} L (Field.toDivisionRing.{u3} L _inst_4))) (Subalgebra.algebra.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u1, u2} F K (Semifield.toCommSemiring.{u1} F (Field.toSemifield.{u1} F _inst_2)) (Ring.toSemiring.{u2} K (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3))) _inst_5 ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} K) (Set.{u2} K) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} K) (Set.{u2} K) (Finset.Set.hasCoeT.{u2} K))) s))) _inst_6))
+but is expected to have type
+  forall {F : Type.{u3}} {K : Type.{u2}} {L : Type.{u1}} [_inst_2 : Field.{u3} F] [_inst_3 : Field.{u2} K] [_inst_4 : Field.{u1} L] [_inst_5 : Algebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3)))] [_inst_6 : Algebra.{u3, u1} F L (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u1} L (Semifield.toDivisionSemiring.{u1} L (Field.toSemifield.{u1} L _inst_4)))] (s : Finset.{u2} K), (forall (x : K), (Membership.mem.{u2, u2} K (Finset.{u2} K) (Finset.instMembershipFinset.{u2} K) x s) -> (And (IsIntegral.{u3, u2} F K (EuclideanDomain.toCommRing.{u3} F (Field.toEuclideanDomain.{u3} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x) (Polynomial.Splits.{u3, u1} F L (EuclideanDomain.toCommRing.{u3} F (Field.toEuclideanDomain.{u3} F _inst_2)) _inst_4 (algebraMap.{u3, u1} F L (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u1} L (Semifield.toDivisionSemiring.{u1} L (Field.toSemifield.{u1} L _inst_4))) _inst_6) (minpoly.{u3, u2} F K (EuclideanDomain.toCommRing.{u3} F (Field.toEuclideanDomain.{u3} F _inst_2)) (DivisionRing.toRing.{u2} K (Field.toDivisionRing.{u2} K _inst_3)) _inst_5 x)))) -> (Nonempty.{max (succ u1) (succ u2)} (AlgHom.{u3, u2, u1} F (Subtype.{succ u2} K (fun (x : K) => Membership.mem.{u2, u2} K (Subalgebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5) (SetLike.instMembership.{u2, u2} (Subalgebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5) K (Subalgebra.instSetLikeSubalgebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5)) x (Algebra.adjoin.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Finset.toSet.{u2} K s)))) L (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (Subalgebra.toSemiring.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Finset.toSet.{u2} K s))) (DivisionSemiring.toSemiring.{u1} L (Semifield.toDivisionSemiring.{u1} L (Field.toSemifield.{u1} L _inst_4))) (Subalgebra.algebra.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Algebra.adjoin.{u3, u2} F K (Semifield.toCommSemiring.{u3} F (Field.toSemifield.{u3} F _inst_2)) (DivisionSemiring.toSemiring.{u2} K (Semifield.toDivisionSemiring.{u2} K (Field.toSemifield.{u2} K _inst_3))) _inst_5 (Finset.toSet.{u2} K s))) _inst_6))
+Case conversion may be inaccurate. Consider using '#align lift_of_splits lift_of_splitsₓ'. -/
 /-- If `K` and `L` are field extensions of `F` and we have `s : finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
Diff
@@ -73,7 +73,7 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
     letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
     haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
       ((Submodule.fg_iff_finiteDimensional _).1
-          (fG_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
+          (FG_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
     letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
     have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := isIntegral_of_isScalarTower H1
     have H6 :
Diff
@@ -73,7 +73,7 @@ theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F
     letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
     haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
       ((Submodule.fg_iff_finiteDimensional _).1
-          (fg_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
+          (fG_adjoin_of_finite s.finite_to_set H3)).of_subalgebra_toSubmodule
     letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
     have H5 : IsIntegral (Algebra.adjoin F (↑s : Set K)) a := isIntegral_of_isScalarTower H1
     have H6 :

Changes in mathlib4

mathlib3
mathlib4
move(Polynomial): Move out of Data (#11751)

Polynomial and MvPolynomial are algebraic objects, hence should be under Algebra (or at least not under Data)

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Chris Hughes
 -/
-import Mathlib.Data.Polynomial.Splits
+import Mathlib.Algebra.Polynomial.Splits
 import Mathlib.RingTheory.Adjoin.Basic
 import Mathlib.RingTheory.AdjoinRoot
 
feat({Ring|Field}Theory/Adjoin): add various results on adjoin (#9790)

Main changes:

  • for intermediate fields: add extendScalars_adjoin, restrictScalars_adjoin_of_algEquiv, sup_toSubalgebra_of_isAlgebraic, adjoin_toSubalgebra_of_isAlgebraic, adjoin_rank_le_of_isAlgebraic, and golf sup_toSubalgebra
  • for subalgebras: add adjoin_eq_span_of_eq_span, adjoin_eq_span_basis, restrictScalars_adjoin, restrictScalars_adjoin_of_algEquiv, adjoin_rank_le

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

Diff
@@ -108,3 +108,14 @@ theorem IsIntegral.minpoly_splits_tower_top [Algebra K L] [IsScalarTower R K L]
     Splits (algebraMap K L) (minpoly K x) := by
   rw [IsScalarTower.algebraMap_eq R K L] at h
   exact int.minpoly_splits_tower_top' h
+
+/-- If `K / E / F` is a ring extension tower, `L` is a subalgebra of `K / F`,
+then `[E[L] : E] ≤ [L : F]`. -/
+lemma Subalgebra.adjoin_rank_le {F : Type*} (E : Type*) {K : Type*}
+    [CommRing F] [StrongRankCondition F] [CommRing E] [StrongRankCondition E] [Ring K]
+    [SMul F E] [Algebra E K] [Algebra F K] [IsScalarTower F E K]
+    (L : Subalgebra F K) [Module.Free F L] :
+    Module.rank E (Algebra.adjoin E (L : Set K)) ≤ Module.rank F L := by
+  rw [← rank_toSubmodule, Module.Free.rank_eq_card_chooseBasisIndex F L,
+    L.adjoin_eq_span_basis E (Module.Free.chooseBasis F L)]
+  exact rank_span_le _ |>.trans Cardinal.mk_range_le
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
@@ -95,10 +95,16 @@ theorem IsIntegral.mem_range_algebraMap_of_minpoly_splits [Algebra K L] [IsScala
     x ∈ (algebraMap K L).range :=
   int.mem_range_algHom_of_minpoly_splits h (IsScalarTower.toAlgHom R K L)
 
-theorem IsIntegral.minpoly_splits_tower_top
-    [Algebra K L] [IsScalarTower R K L] [Algebra K M] [IsScalarTower R K M]
-    {x : M} (int : IsIntegral R x) (h : Splits (algebraMap R L) (minpoly R x)) :
+variable [Algebra K M] [IsScalarTower R K M] {x : M} (int : IsIntegral R x)
+
+theorem IsIntegral.minpoly_splits_tower_top' {f : K →+* L}
+    (h : Splits (f.comp <| algebraMap R K) (minpoly R x)) :
+    Splits f (minpoly K x) :=
+  splits_of_splits_of_dvd _ ((minpoly.monic int).map _).ne_zero
+    ((splits_map_iff _ _).mpr h) (minpoly.dvd_map_of_isScalarTower R _ x)
+
+theorem IsIntegral.minpoly_splits_tower_top [Algebra K L] [IsScalarTower R K L]
+    (h : Splits (algebraMap R L) (minpoly R x)) :
     Splits (algebraMap K L) (minpoly K x) := by
   rw [IsScalarTower.algebraMap_eq R K L] at h
-  exact splits_of_splits_of_dvd _ ((minpoly.monic int).map _).ne_zero
-    ((splits_map_iff _ _).mpr h) (minpoly.dvd_map_of_isScalarTower R _ x)
+  exact int.minpoly_splits_tower_top' h
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
@@ -82,3 +82,23 @@ theorem Polynomial.lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L]
 #align lift_of_splits Polynomial.lift_of_splits
 
 end Embeddings
+
+variable {R K L M : Type*} [CommRing R] [Field K] [Field L] [CommRing M] [Algebra R K] [Algebra R L]
+  [Algebra R M] {x : L} (int : IsIntegral R x) (h : Splits (algebraMap R K) (minpoly R x))
+
+theorem IsIntegral.mem_range_algHom_of_minpoly_splits (f : K →ₐ[R] L) : x ∈ f.range :=
+  show x ∈ Set.range f from Set.image_subset_range _ _ <| by
+    rw [image_rootSet h f, mem_rootSet']
+    exact ⟨((minpoly.monic int).map _).ne_zero, minpoly.aeval R x⟩
+
+theorem IsIntegral.mem_range_algebraMap_of_minpoly_splits [Algebra K L] [IsScalarTower R K L] :
+    x ∈ (algebraMap K L).range :=
+  int.mem_range_algHom_of_minpoly_splits h (IsScalarTower.toAlgHom R K L)
+
+theorem IsIntegral.minpoly_splits_tower_top
+    [Algebra K L] [IsScalarTower R K L] [Algebra K M] [IsScalarTower R K M]
+    {x : M} (int : IsIntegral R x) (h : Splits (algebraMap R L) (minpoly R x)) :
+    Splits (algebraMap K L) (minpoly K x) := by
+  rw [IsScalarTower.algebraMap_eq R K L] at h
+  exact splits_of_splits_of_dvd _ ((minpoly.monic int).map _).ne_zero
+    ((splits_map_iff _ _).mpr h) (minpoly.dvd_map_of_isScalarTower R _ x)
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
@@ -70,7 +70,7 @@ theorem Polynomial.lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L]
       (fg_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule
     letI := fieldOfFiniteDimensional F Ks
     letI := (f : Ks →+* L).toAlgebra
-    have H5 : IsIntegral Ks a := isIntegral_of_isScalarTower H1
+    have H5 : IsIntegral Ks a := H1.tower_top
     have H6 : (minpoly Ks a).Splits (algebraMap Ks L) := by
       refine splits_of_splits_of_dvd _ ((minpoly.monic H1).map (algebraMap F Ks)).ne_zero
         ((splits_map_iff _ _).2 ?_) (minpoly.dvd _ _ ?_)
chore(RingTheory/{Algebraic, Localization/Integral}): rename decls to use dot notation (#8437)

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

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

This PR makes the following renames:

| From | To |

Diff
@@ -67,7 +67,7 @@ theorem Polynomial.lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L]
     rw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]
     set Ks := Algebra.adjoin F (s : Set K)
     haveI : FiniteDimensional F Ks := ((Submodule.fg_iff_finiteDimensional _).1
-      (FG_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule
+      (fg_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule
     letI := fieldOfFiniteDimensional F Ks
     letI := (f : Ks →+* L).toAlgebra
     have H5 : IsIntegral Ks a := isIntegral_of_isScalarTower H1
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
@@ -41,16 +41,23 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Alg
     rwa [Minpoly.toAdjoin_apply', liftHom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe] at hP₁
 #align alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly
 
+/-- Produce an algebra homomorphism `Adjoin R {x} →ₐ[R] T` sending `x` to
+a root of `x`'s minimal polynomial in `T`. -/
+noncomputable def Algebra.adjoin.liftSingleton {S T : Type*}
+    [CommRing S] [CommRing T] [Algebra F S] [Algebra F T]
+    (x : S) (y : T) (h : aeval y (minpoly F x) = 0) :
+    Algebra.adjoin F {x} →ₐ[F] T :=
+  (AdjoinRoot.liftHom _ y h).comp (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly F x).toAlgHom
+
 open Finset
 
-set_option synthInstance.maxHeartbeats 40000 in
 /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
-theorem lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
-    (s : Finset K) : (∀ x ∈ s, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x)) →
-      Nonempty (Algebra.adjoin F (↑s : Set K) →ₐ[F] L) := by
+theorem Polynomial.lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K]
+    [Algebra F L] (s : Finset K) : (∀ x ∈ s, IsIntegral F x ∧
+      Splits (algebraMap F L) (minpoly F x)) → Nonempty (Algebra.adjoin F (s : Set K) →ₐ[F] L) := by
   classical
-    refine' Finset.induction_on s (fun _ => _) fun a s _ ih H => _
+    refine Finset.induction_on s (fun _ ↦ ?_) fun a s _ ih H ↦ ?_
     · rw [coe_empty, Algebra.adjoin_empty]
       exact ⟨(Algebra.ofId F L).comp (Algebra.botEquiv F K)⟩
     rw [forall_mem_insert] at H
@@ -58,26 +65,20 @@ theorem lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F
     cases' ih H3 with f
     choose H3 _ using H3
     rw [coe_insert, Set.insert_eq, Set.union_comm, Algebra.adjoin_union_eq_adjoin_adjoin]
-    letI := (f : Algebra.adjoin F (↑s : Set K) →+* L).toAlgebra
-    haveI : FiniteDimensional F (Algebra.adjoin F (↑s : Set K)) :=
-      ((Submodule.fg_iff_finiteDimensional _).1
-        (FG_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule
-    letI := fieldOfFiniteDimensional F (Algebra.adjoin F (↑s : Set K))
-    have H5 : IsIntegral (Algebra.adjoin F (s : Set K)) a := isIntegral_of_isScalarTower H1
-    have H6 : (minpoly (Algebra.adjoin F (s : Set K)) a).Splits
-        (algebraMap (Algebra.adjoin F (s : Set K)) L) := by
-      have : Polynomial.map (algebraMap F (Algebra.adjoin F (s : Set K))) (minpoly F a) ≠ 0 :=
-        Polynomial.map_ne_zero <| minpoly.ne_zero H1
-      refine' Polynomial.splits_of_splits_of_dvd _ this
-        ((Polynomial.splits_map_iff _ _).2 _) (minpoly.dvd _ _ _)
+    set Ks := Algebra.adjoin F (s : Set K)
+    haveI : FiniteDimensional F Ks := ((Submodule.fg_iff_finiteDimensional _).1
+      (FG_adjoin_of_finite s.finite_toSet H3)).of_subalgebra_toSubmodule
+    letI := fieldOfFiniteDimensional F Ks
+    letI := (f : Ks →+* L).toAlgebra
+    have H5 : IsIntegral Ks a := isIntegral_of_isScalarTower H1
+    have H6 : (minpoly Ks a).Splits (algebraMap Ks L) := by
+      refine splits_of_splits_of_dvd _ ((minpoly.monic H1).map (algebraMap F Ks)).ne_zero
+        ((splits_map_iff _ _).2 ?_) (minpoly.dvd _ _ ?_)
       · rw [← IsScalarTower.algebraMap_eq]
         exact H2
       · rw [Polynomial.aeval_map_algebraMap, minpoly.aeval]
-    obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (ne_of_lt (minpoly.degree_pos H5)).symm
-    refine' ⟨Subalgebra.ofRestrictScalars F _ _⟩
-    refine' (AdjoinRoot.liftHom (minpoly (Algebra.adjoin F (↑s : Set K)) a) y hy).comp _
-    exact (AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly
-      (Algebra.adjoin F (↑s : Set K)) a).toAlgHom
-#align lift_of_splits lift_of_splits
+    obtain ⟨y, hy⟩ := Polynomial.exists_root_of_splits _ H6 (minpoly.degree_pos H5).ne'
+    exact ⟨Subalgebra.ofRestrictScalars F _ <| Algebra.adjoin.liftSingleton Ks a y hy⟩
+#align lift_of_splits Polynomial.lift_of_splits
 
 end Embeddings
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
@@ -43,8 +43,7 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Alg
 
 open Finset
 
-set_option maxHeartbeats 400000 in
-set_option synthInstance.maxHeartbeats 160000 in
+set_option synthInstance.maxHeartbeats 40000 in
 /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
chore: relax unnecessarily strict heartbeats (#7651)

This was causing failures in unrelated PRs.

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

Diff
@@ -44,7 +44,7 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Alg
 open Finset
 
 set_option maxHeartbeats 400000 in
-set_option synthInstance.maxHeartbeats 80000 in
+set_option synthInstance.maxHeartbeats 160000 in
 /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
chore(RingTheory): golf, generalize, fix docs (#7500)

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

Diff
@@ -29,29 +29,16 @@ open BigOperators Polynomial
 section Embeddings
 
 variable (F : Type*) [Field F]
--- Porting note: timed out in term mode.
--- Using `apply` appears to be faster than using `refine/exact`.
+
+open AdjoinRoot in
 /-- If `p` is the minimal polynomial of `a` over `F` then `F[a] ≃ₐ[F] F[x]/(p)` -/
 def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Algebra F R] (x : R) :
-    Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) := by
-  refine AlgEquiv.symm ?_
-  refine AlgEquiv.ofBijective
-      (AlgHom.codRestrict (AdjoinRoot.liftHom _ x <| minpoly.aeval F x) _ fun p => ?_) ⟨?_, ?_⟩
-  · induction p using AdjoinRoot.induction_on with
-    | ih p => exact (Algebra.adjoin_singleton_eq_range_aeval F x).symm ▸
-        (Polynomial.aeval _).mem_range.mpr ⟨p, rfl⟩
-  · apply (AlgHom.injective_codRestrict _ _ _).2
-    apply (injective_iff_map_eq_zero _).2
-    intro p
-    induction p using AdjoinRoot.induction_on with
-    | ih p =>
-      intro hp
-      apply Ideal.Quotient.eq_zero_iff_mem.2
-      apply Ideal.mem_span_singleton.2
-      apply minpoly.dvd F x hp
-  · intro y
-    let ⟨p, hp⟩ := (SetLike.ext_iff.1 (Algebra.adjoin_singleton_eq_range_aeval F x) (y : R)).1 y.2
-    exact ⟨AdjoinRoot.mk _ p, Subtype.eq hp⟩
+    Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) :=
+  AlgEquiv.symm <| AlgEquiv.ofBijective (Minpoly.toAdjoin F x) <| by
+    refine ⟨(injective_iff_map_eq_zero _).2 fun P₁ hP₁ ↦ ?_, Minpoly.toAdjoin.surjective F x⟩
+    obtain ⟨P, rfl⟩ := mk_surjective P₁
+    refine AdjoinRoot.mk_eq_zero.mpr (minpoly.dvd F x ?_)
+    rwa [Minpoly.toAdjoin_apply', liftHom_mk, ← Subalgebra.coe_eq_zero, aeval_subalgebra_coe] at hP₁
 #align alg_equiv.adjoin_singleton_equiv_adjoin_root_minpoly AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly
 
 open Finset
chore: update/remove heart beat bumps (#6860)

We clean up heart beat bumps after #6474.

Diff
@@ -56,8 +56,8 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Alg
 
 open Finset
 
-set_option maxHeartbeats 500000 in
-set_option synthInstance.maxHeartbeats 120000 in
+set_option maxHeartbeats 400000 in
+set_option synthInstance.maxHeartbeats 80000 in
 /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
chore: banish Type _ and Sort _ (#6499)

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

This has nice performance benefits.

Diff
@@ -28,11 +28,11 @@ open BigOperators Polynomial
 
 section Embeddings
 
-variable (F : Type _) [Field F]
+variable (F : Type*) [Field F]
 -- Porting note: timed out in term mode.
 -- Using `apply` appears to be faster than using `refine/exact`.
 /-- If `p` is the minimal polynomial of `a` over `F` then `F[a] ≃ₐ[F] F[x]/(p)` -/
-def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Algebra F R] (x : R) :
+def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type*} [CommRing R] [Algebra F R] (x : R) :
     Algebra.adjoin F ({x} : Set R) ≃ₐ[F] AdjoinRoot (minpoly F x) := by
   refine AlgEquiv.symm ?_
   refine AlgEquiv.ofBijective
@@ -60,7 +60,7 @@ set_option maxHeartbeats 500000 in
 set_option synthInstance.maxHeartbeats 120000 in
 /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
-theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
+theorem lift_of_splits {F K L : Type*} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
     (s : Finset K) : (∀ x ∈ s, IsIntegral F x ∧ Polynomial.Splits (algebraMap F L) (minpoly F x)) →
       Nonempty (Algebra.adjoin F (↑s : Set K) →ₐ[F] L) := by
   classical
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) 2018 Chris Hughes. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Chris Hughes
-
-! This file was ported from Lean 3 source module ring_theory.adjoin.field
-! leanprover-community/mathlib commit c4658a649d216f57e99621708b09dcb3dcccbd23
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Polynomial.Splits
 import Mathlib.RingTheory.Adjoin.Basic
 import Mathlib.RingTheory.AdjoinRoot
 
+#align_import ring_theory.adjoin.field from "leanprover-community/mathlib"@"c4658a649d216f57e99621708b09dcb3dcccbd23"
+
 /-!
 # Adjoining elements to a field
 
chore: change Field.toEuclideanDomain (#5266)

Modifying the definition of Field.toEuclideanDomain makes some declaration faster.

Co-authored-by: Sébastien Gouëzel

Diff
@@ -59,8 +59,8 @@ def AlgEquiv.adjoinSingletonEquivAdjoinRootMinpoly {R : Type _} [CommRing R] [Al
 
 open Finset
 
-set_option maxHeartbeats 950000 in
-set_option synthInstance.maxHeartbeats 140000 in
+set_option maxHeartbeats 500000 in
+set_option synthInstance.maxHeartbeats 120000 in
 /-- If `K` and `L` are field extensions of `F` and we have `s : Finset K` such that
 the minimal polynomial of each `x ∈ s` splits in `L` then `Algebra.adjoin F s` embeds in `L`. -/
 theorem lift_of_splits {F K L : Type _} [Field F] [Field K] [Field L] [Algebra F K] [Algebra F L]
feat: port RingTheory.Adjoin.Field (#4303)

Co-authored-by: adomani <adomani@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 10 + 638

639 files ported (98.5%)
267418 lines ported (98.7%)
Show graph

The unported dependencies are