[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ ↑⊥ = Set.range ↑(algebraMap F E)
[PROOFSTEP]
change ↑(Subfield.closure (Set.range (algebraMap F E) ∪ ∅)) = Set.range (algebraMap F E)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ ↑(Subfield.closure (Set.range ↑(algebraMap F E) ∪ ∅)) = Set.range ↑(algebraMap F E)
[PROOFSTEP]
rw [Set.union_empty, ← Set.image_univ, ← RingHom.map_field_closure]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ ↑(Subfield.map (algebraMap F E) (Subfield.closure Set.univ)) = ↑(algebraMap F E) '' Set.univ
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ ⊥.toSubalgebra = ⊥
[PROOFSTEP]
ext
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
x✝ : E
⊢ x✝ ∈ ⊥.toSubalgebra ↔ x✝ ∈ ⊥
[PROOFSTEP]
rw [mem_toSubalgebra, Algebra.mem_bot, mem_bot]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set (IntermediateField F E)
⊢ ↑(sInf S).toSubalgebra = ↑(sInf (toSubalgebra '' S))
[PROOFSTEP]
simp [Set.sUnion_image]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set (IntermediateField F E)
⊢ ↑(toSubfield (sInf S)) = ↑(sInf (toSubfield '' S))
[PROOFSTEP]
simp [Set.sUnion_image]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
ι : Sort u_3
S : ι → IntermediateField F E
⊢ ↑(iInf S) = ⋂ (i : ι), ↑(S i)
[PROOFSTEP]
simp [iInf]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
ι : Sort u_3
S : ι → IntermediateField F E
⊢ ↑(iInf S).toSubalgebra = ↑(⨅ (i : ι), (S i).toSubalgebra)
[PROOFSTEP]
simp [iInf]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
ι : Sort u_3
S : ι → IntermediateField F E
⊢ ↑(toSubfield (iInf S)) = ↑(⨅ (i : ι), toSubfield (S i))
[PROOFSTEP]
simp [iInf]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
⊢ { x // x ∈ S } ≃ₐ[F] { x // x ∈ T }
[PROOFSTEP]
refine'
  { toFun := fun x => ⟨x, _⟩
    invFun := fun x => ⟨x, _⟩
    left_inv := fun _ => by ext; simp
    right_inv := fun _ => by ext; simp
    map_mul' := fun _ _ => by ext; simp
    map_add' := fun _ _ => by ext; simp
    commutes' := fun _ => by ext; rfl }
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝ : { x // x ∈ S }
⊢ (fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x✝) = x✝
[PROOFSTEP]
ext
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝ : { x // x ∈ S }
⊢ ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x✝)) = ↑x✝
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝ : { x // x ∈ T }
⊢ (fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x✝) = x✝
[PROOFSTEP]
ext
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝ : { x // x ∈ T }
⊢ ↑((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x✝)) = ↑x✝
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝¹ x✝ : { x // x ∈ S }
⊢ Equiv.toFun
      { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
        invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
        left_inv :=
          (_ :
            ∀ (x : { x // x ∈ S }),
              (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                  ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                x),
        right_inv :=
          (_ :
            ∀ (x : { x // x ∈ T }),
              (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                  ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                x) }
      (x✝¹ * x✝) =
    Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        x✝¹ *
      Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        x✝
[PROOFSTEP]
ext
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝¹ x✝ : { x // x ∈ S }
⊢ ↑(Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        (x✝¹ * x✝)) =
    ↑(Equiv.toFun
          { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
            invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
            left_inv :=
              (_ :
                ∀ (x : { x // x ∈ S }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : { x // x ∈ T }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                    x) }
          x✝¹ *
        Equiv.toFun
          { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
            invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
            left_inv :=
              (_ :
                ∀ (x : { x // x ∈ S }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : { x // x ∈ T }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                    x) }
          x✝)
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝¹ x✝ : { x // x ∈ S }
⊢ Equiv.toFun
      { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
        invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
        left_inv :=
          (_ :
            ∀ (x : { x // x ∈ S }),
              (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                  ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                x),
        right_inv :=
          (_ :
            ∀ (x : { x // x ∈ T }),
              (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                  ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                x) }
      (x✝¹ + x✝) =
    Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        x✝¹ +
      Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        x✝
[PROOFSTEP]
ext
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝¹ x✝ : { x // x ∈ S }
⊢ ↑(Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        (x✝¹ + x✝)) =
    ↑(Equiv.toFun
          { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
            invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
            left_inv :=
              (_ :
                ∀ (x : { x // x ∈ S }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : { x // x ∈ T }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                    x) }
          x✝¹ +
        Equiv.toFun
          { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
            invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
            left_inv :=
              (_ :
                ∀ (x : { x // x ∈ S }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : { x // x ∈ T }),
                  (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                      ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                    x) }
          x✝)
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝ : F
⊢ Equiv.toFun
      { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
        invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
        left_inv :=
          (_ :
            ∀ (x : { x // x ∈ S }),
              (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                  ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                x),
        right_inv :=
          (_ :
            ∀ (x : { x // x ∈ T }),
              (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                  ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                x) }
      (↑(algebraMap F { x // x ∈ S }) x✝) =
    ↑(algebraMap F { x // x ∈ T }) x✝
[PROOFSTEP]
ext
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x✝ : F
⊢ ↑(Equiv.toFun
        { toFun := fun x => { val := ↑x, property := (_ : ↑x ∈ T) },
          invFun := fun x => { val := ↑x, property := (_ : ↑x ∈ S) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ S }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ S) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ T) }) x) =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ T }),
                (fun x => { val := ↑x, property := (_ : ↑x ∈ T) })
                    ((fun x => { val := ↑x, property := (_ : ↑x ∈ S) }) x) =
                  x) }
        (↑(algebraMap F { x // x ∈ S }) x✝)) =
    ↑(↑(algebraMap F { x // x ∈ T }) x✝)
[PROOFSTEP]
rfl
[GOAL]
case refine'_1
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x : { x // x ∈ S }
⊢ ↑x ∈ T
[PROOFSTEP]
aesop
[GOAL]
case refine'_2
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : IntermediateField F E
h : S = T
x : { x // x ∈ T }
⊢ ↑x ∈ S
[PROOFSTEP]
aesop
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : IntermediateField F E
⊢ equivOfEq (_ : S = S) = AlgEquiv.refl
[PROOFSTEP]
ext
[GOAL]
case h.a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : IntermediateField F E
a✝ : { x // x ∈ S }
⊢ ↑(↑(equivOfEq (_ : S = S)) a✝) = ↑(↑AlgEquiv.refl a✝)
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
x : F
⊢ ↑(botEquiv F E) (↑(algebraMap F { x // x ∈ ⊥ }) x) = x
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ ∀ (x : { x // x ∈ ⊥ }), ↑(algebraMap { x // x ∈ ⊥ } E) x = ↑(algebraMap F E) (↑(algebraMap { x // x ∈ ⊥ } F) x)
[PROOFSTEP]
intro x
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
x : { x // x ∈ ⊥ }
⊢ ↑(algebraMap { x // x ∈ ⊥ } E) x = ↑(algebraMap F E) (↑(algebraMap { x // x ∈ ⊥ } F) x)
[PROOFSTEP]
obtain ⟨y, rfl⟩ := (botEquiv F E).symm.surjective x
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
y : F
⊢ ↑(algebraMap { x // x ∈ ⊥ } E) (↑(AlgEquiv.symm (botEquiv F E)) y) =
    ↑(algebraMap F E) (↑(algebraMap { x // x ∈ ⊥ } F) (↑(AlgEquiv.symm (botEquiv F E)) y))
[PROOFSTEP]
rw [coe_algebraMap_over_bot, (botEquiv F E).apply_symm_apply, botEquiv_symm,
  IsScalarTower.algebraMap_apply F (⊥ : IntermediateField F E) E]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
K : IntermediateField F E
⊢ restrictScalars F ⊥ = K
[PROOFSTEP]
ext x
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
K : IntermediateField F E
x : E
⊢ x ∈ restrictScalars F ⊥ ↔ x ∈ K
[PROOFSTEP]
rw [mem_restrictScalars, mem_bot]
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
K : IntermediateField F E
x : E
⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ K } E) ↔ x ∈ K
[PROOFSTEP]
exact Set.ext_iff.mp Subtype.range_coe x
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
⊢ Set.range ↑(algebraMap F E) ⊆ ↑(adjoin F S)
[PROOFSTEP]
intro x hx
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
x : E
hx : x ∈ Set.range ↑(algebraMap F E)
⊢ x ∈ ↑(adjoin F S)
[PROOFSTEP]
cases' hx with f hf
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
x : E
f : F
hf : ↑(algebraMap F E) f = x
⊢ x ∈ ↑(adjoin F S)
[PROOFSTEP]
rw [← hf]
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
x : E
f : F
hf : ↑(algebraMap F E) f = x
⊢ ↑(algebraMap F E) f ∈ ↑(adjoin F S)
[PROOFSTEP]
exact adjoin.algebraMap_mem F S f
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : Subfield E
HF : Set.range ↑(algebraMap F E) ⊆ ↑K
HS : S ⊆ ↑K
⊢ toSubfield (adjoin F S) ≤ K
[PROOFSTEP]
apply Subfield.closure_le.mpr
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : Subfield E
HF : Set.range ↑(algebraMap F E) ⊆ ↑K
HS : S ⊆ ↑K
⊢ Set.range ↑(algebraMap F E) ∪ S ⊆ ↑K
[PROOFSTEP]
rw [Set.union_subset_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : Subfield E
HF : Set.range ↑(algebraMap F E) ⊆ ↑K
HS : S ⊆ ↑K
⊢ Set.range ↑(algebraMap F E) ⊆ ↑K ∧ S ⊆ ↑K
[PROOFSTEP]
exact ⟨HF, HS⟩
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ restrictScalars F (adjoin { x // x ∈ adjoin F S } T) = adjoin F (S ∪ T)
[PROOFSTEP]
rw [SetLike.ext'_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ ↑(restrictScalars F (adjoin { x // x ∈ adjoin F S } T)) = ↑(adjoin F (S ∪ T))
[PROOFSTEP]
change (↑(adjoin (adjoin F S) T) : Set E) = _
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ ↑(adjoin { x // x ∈ adjoin F S } T) = ↑(adjoin F (S ∪ T))
[PROOFSTEP]
apply Set.eq_of_subset_of_subset
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ ↑(adjoin { x // x ∈ adjoin F S } T) ⊆ ↑(adjoin F (S ∪ T))
[PROOFSTEP]
rw [adjoin_subset_adjoin_iff]
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ ↑(adjoin F (S ∪ T)) ⊆ ↑(adjoin { x // x ∈ adjoin F S } T)
[PROOFSTEP]
rw [adjoin_subset_adjoin_iff]
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E) ⊆ ↑(adjoin F (S ∪ T)) ∧ T ⊆ ↑(adjoin F (S ∪ T))
[PROOFSTEP]
constructor
[GOAL]
case a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ Set.range ↑(algebraMap F E) ⊆ ↑(adjoin { x // x ∈ adjoin F S } T) ∧ S ∪ T ⊆ ↑(adjoin { x // x ∈ adjoin F S } T)
[PROOFSTEP]
constructor
[GOAL]
case a.left
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E) ⊆ ↑(adjoin F (S ∪ T))
[PROOFSTEP]
rintro _ ⟨⟨x, hx⟩, rfl⟩
[GOAL]
case a.left.intro.mk
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ adjoin F S
⊢ ↑(algebraMap { x // x ∈ adjoin F S } E) { val := x, property := hx } ∈ ↑(adjoin F (S ∪ T))
[PROOFSTEP]
exact adjoin.mono _ _ _ (Set.subset_union_left _ _) hx
[GOAL]
case a.right
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ T ⊆ ↑(adjoin F (S ∪ T))
[PROOFSTEP]
exact
  subset_adjoin_of_subset_right _ _
    (Set.subset_union_right _ _)
      -- Porting note: orginal proof times out
[GOAL]
case a.left
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ Set.range ↑(algebraMap F E) ⊆ ↑(adjoin { x // x ∈ adjoin F S } T)
[PROOFSTEP]
rintro x ⟨f, rfl⟩
[GOAL]
case a.left.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
f : F
⊢ ↑(algebraMap F E) f ∈ ↑(adjoin { x // x ∈ adjoin F S } T)
[PROOFSTEP]
refine' Subfield.subset_closure _
[GOAL]
case a.left.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
f : F
⊢ ↑(algebraMap F E) f ∈ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E) ∪ T
[PROOFSTEP]
left
[GOAL]
case a.left.intro.h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
f : F
⊢ ↑(algebraMap F E) f ∈ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E)
[PROOFSTEP]
exact
  ⟨f, rfl⟩
    -- Porting note: orginal proof times out
[GOAL]
case a.right
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ S ∪ T ⊆ ↑(adjoin { x // x ∈ adjoin F S } T)
[PROOFSTEP]
refine' Set.union_subset (fun x hx => Subfield.subset_closure _) (fun x hx => Subfield.subset_closure _)
[GOAL]
case a.right.refine'_1
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ S
⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E) ∪ T
[PROOFSTEP]
left
[GOAL]
case a.right.refine'_1.h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ S
⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E)
[PROOFSTEP]
refine' ⟨⟨x, Subfield.subset_closure _⟩, rfl⟩
[GOAL]
case a.right.refine'_1.h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ S
⊢ x ∈ Set.range ↑(algebraMap F E) ∪ S
[PROOFSTEP]
right
[GOAL]
case a.right.refine'_1.h.h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ S
⊢ x ∈ S
[PROOFSTEP]
exact hx
[GOAL]
case a.right.refine'_2
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ T
⊢ x ∈ Set.range ↑(algebraMap { x // x ∈ adjoin F S } E) ∪ T
[PROOFSTEP]
right
[GOAL]
case a.right.refine'_2.h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
x : E
hx : x ∈ T
⊢ x ∈ T
[PROOFSTEP]
exact hx
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S T : Set E
⊢ restrictScalars F (adjoin { x // x ∈ adjoin F S } T) = restrictScalars F (adjoin { x // x ∈ adjoin F T } S)
[PROOFSTEP]
rw [adjoin_adjoin_left, adjoin_adjoin_left, Set.union_comm]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_3
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
⊢ map f (adjoin F S) = adjoin F (↑f '' S)
[PROOFSTEP]
ext x
[GOAL]
case h
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_3
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
x : E'
⊢ x ∈ map f (adjoin F S) ↔ x ∈ adjoin F (↑f '' S)
[PROOFSTEP]
show
  x ∈ (Subfield.closure (Set.range (algebraMap F E) ∪ S)).map (f : E →+* E') ↔
    x ∈ Subfield.closure (Set.range (algebraMap F E') ∪ f '' S)
[GOAL]
case h
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_3
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
x : E'
⊢ x ∈ Subfield.map (↑f) (Subfield.closure (Set.range ↑(algebraMap F E) ∪ S)) ↔
    x ∈ Subfield.closure (Set.range ↑(algebraMap F E') ∪ ↑f '' S)
[PROOFSTEP]
rw [RingHom.map_field_closure, Set.image_union, ← Set.range_comp, ← RingHom.coe_comp, f.comp_algebraMap]
[GOAL]
case h
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
S : Set E
E' : Type u_3
inst✝¹ : Field E'
inst✝ : Algebra F E'
f : E →ₐ[F] E'
x : E'
⊢ x ∈ Subfield.closure (Set.range ↑(algebraMap F E') ∪ ↑↑f '' S) ↔
    x ∈ Subfield.closure (Set.range ↑(algebraMap F E') ∪ ↑f '' S)
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
⊢ K = adjoin F S
[PROOFSTEP]
apply toSubalgebra_injective
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
⊢ K.toSubalgebra = (adjoin F S).toSubalgebra
[PROOFSTEP]
rw [h]
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
⊢ Algebra.adjoin F S = (adjoin F S).toSubalgebra
[PROOFSTEP]
refine' (adjoin_eq_algebra_adjoin F _ _).symm
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
⊢ ∀ (x : E), x ∈ Algebra.adjoin F S → x⁻¹ ∈ Algebra.adjoin F S
[PROOFSTEP]
intro x
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
x : E
⊢ x ∈ Algebra.adjoin F S → x⁻¹ ∈ Algebra.adjoin F S
[PROOFSTEP]
convert K.inv_mem (x := x)
[GOAL]
case h.a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
x : E
⊢ x ∈ Algebra.adjoin F S ↔ x ∈ K
[PROOFSTEP]
rw [← h]
[GOAL]
case h'.a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
x : E
a✝ : x ∈ K
⊢ x⁻¹ ∈ Algebra.adjoin F S ↔ x⁻¹ ∈ K
[PROOFSTEP]
rw [← h]
[GOAL]
case h.a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
x : E
⊢ x ∈ K.toSubalgebra ↔ x ∈ K
[PROOFSTEP]
rfl
[GOAL]
case h'.a
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
K : IntermediateField F E
h : K.toSubalgebra = Algebra.adjoin F S
x : E
a✝ : x ∈ K
⊢ x⁻¹ ∈ K.toSubalgebra ↔ x⁻¹ ∈ K
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ IsIntegral F (gen F α) ↔ IsIntegral F α
[PROOFSTEP]
conv_rhs => rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
| IsIntegral F α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
| IsIntegral F α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
| IsIntegral F α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ IsIntegral F (gen F α) ↔ IsIntegral F (↑(algebraMap { x // x ∈ F⟮α⟯ } E) (gen F α))
[PROOFSTEP]
rw [isIntegral_algebraMap_iff (algebraMap F⟮α⟯ E).injective]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsAlgebraic F x
⊢ (adjoin F S).toSubalgebra = Algebra.adjoin F S
[PROOFSTEP]
simp only [isAlgebraic_iff_isIntegral] at hS 
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsIntegral F x
⊢ (adjoin F S).toSubalgebra = Algebra.adjoin F S
[PROOFSTEP]
have : Algebra.IsIntegral F (Algebra.adjoin F S) := by rwa [← le_integralClosure_iff_isIntegral, Algebra.adjoin_le_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsIntegral F x
⊢ Algebra.IsIntegral F { x // x ∈ Algebra.adjoin F S }
[PROOFSTEP]
rwa [← le_integralClosure_iff_isIntegral, Algebra.adjoin_le_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsIntegral F x
this : Algebra.IsIntegral F { x // x ∈ Algebra.adjoin F S }
⊢ (adjoin F S).toSubalgebra = Algebra.adjoin F S
[PROOFSTEP]
have := isField_of_isIntegral_of_isField' this (Field.toIsField F)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsIntegral F x
this✝ : Algebra.IsIntegral F { x // x ∈ Algebra.adjoin F S }
this : IsField { x // x ∈ Algebra.adjoin F S }
⊢ (adjoin F S).toSubalgebra = Algebra.adjoin F S
[PROOFSTEP]
rw [← ((Algebra.adjoin F S).toIntermediateField' this).eq_adjoin_of_eq_algebra_adjoin F S]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsIntegral F x
this✝ : Algebra.IsIntegral F { x // x ∈ Algebra.adjoin F S }
this : IsField { x // x ∈ Algebra.adjoin F S }
⊢ (Subalgebra.toIntermediateField' (Algebra.adjoin F S) this).toSubalgebra = Algebra.adjoin F S
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Set E
hS : ∀ (x : E), x ∈ S → IsIntegral F x
this✝ : Algebra.IsIntegral F { x // x ∈ Algebra.adjoin F S }
this : IsField { x // x ∈ Algebra.adjoin F S }
⊢ (Subalgebra.toIntermediateField' (Algebra.adjoin F S) this).toSubalgebra = Algebra.adjoin F S
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
hα : IsIntegral F α
⊢ F⟮α⟯.toSubalgebra = Algebra.adjoin F {α}
[PROOFSTEP]
apply adjoin_algebraic_toSubalgebra
[GOAL]
case hS
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
hα : IsIntegral F α
⊢ ∀ (x : E), x ∈ {α} → IsAlgebraic F x
[PROOFSTEP]
rintro x (rfl : x = α)
[GOAL]
case hS
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
x : E
hα : IsIntegral F x
⊢ IsAlgebraic F x
[PROOFSTEP]
rwa [isAlgebraic_iff_isIntegral]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ IsSplittingField F { x // x ∈ K } p ↔ Splits (algebraMap F { x // x ∈ K }) p ∧ K = adjoin F (rootSet p E)
[PROOFSTEP]
suffices _ → (Algebra.adjoin F (p.rootSet K) = ⊤ ↔ K = adjoin F (p.rootSet E)) by
  exact ⟨fun h => ⟨h.1, (this h.1).mp h.2⟩, fun h => ⟨h.1, (this h.1).mpr h.2⟩⟩
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
this : ?m.764281 → (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K = adjoin F (rootSet p E))
⊢ IsSplittingField F { x // x ∈ K } p ↔ Splits (algebraMap F { x // x ∈ K }) p ∧ K = adjoin F (rootSet p E)
[PROOFSTEP]
exact ⟨fun h => ⟨h.1, (this h.1).mp h.2⟩, fun h => ⟨h.1, (this h.1).mpr h.2⟩⟩
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ Splits (algebraMap F { x // x ∈ K }) p →
    (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K = adjoin F (rootSet p E))
[PROOFSTEP]
simp_rw [SetLike.ext_iff, ← mem_toSubalgebra, ← SetLike.ext_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ Splits (algebraMap F { x // x ∈ K }) p →
    (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K.toSubalgebra = (adjoin F (rootSet p E)).toSubalgebra)
[PROOFSTEP]
rw [adjoin_algebraic_toSubalgebra fun x => isAlgebraic_of_mem_rootSet]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
⊢ Splits (algebraMap F { x // x ∈ K }) p →
    (Algebra.adjoin F (rootSet p { x // x ∈ K }) = ⊤ ↔ K.toSubalgebra = Algebra.adjoin F (rootSet p E))
[PROOFSTEP]
refine' fun hp => (adjoin_rootSet_eq_range hp K.val).symm.trans _
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
p : F[X]
K : IntermediateField F E
hp : Splits (algebraMap F { x // x ∈ K }) p
⊢ Algebra.adjoin F (rootSet p E) = AlgHom.range (val K) ↔ K.toSubalgebra = Algebra.adjoin F (rootSet p E)
[PROOFSTEP]
rw [← K.range_val, eq_comm]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
t : ι → IntermediateField F E
p : ι → F[X]
s : Finset ι
h0 : ∏ i in s, p i ≠ 0
h : ∀ (i : ι), i ∈ s → IsSplittingField F { x // x ∈ t i } (p i)
⊢ IsSplittingField F { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i } (∏ i in s, p i)
[PROOFSTEP]
let K : IntermediateField F E := ⨆ i ∈ s, t i
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
t : ι → IntermediateField F E
p : ι → F[X]
s : Finset ι
h0 : ∏ i in s, p i ≠ 0
h : ∀ (i : ι), i ∈ s → IsSplittingField F { x // x ∈ t i } (p i)
K : IntermediateField F E := ⨆ (i : ι) (_ : i ∈ s), t i
⊢ IsSplittingField F { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i } (∏ i in s, p i)
[PROOFSTEP]
have hK : ∀ i ∈ s, t i ≤ K := fun i hi => le_iSup_of_le i (le_iSup (fun _ => t i) hi)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
t : ι → IntermediateField F E
p : ι → F[X]
s : Finset ι
h0 : ∏ i in s, p i ≠ 0
h : ∀ (i : ι), i ∈ s → IsSplittingField F { x // x ∈ t i } (p i)
K : IntermediateField F E := ⨆ (i : ι) (_ : i ∈ s), t i
hK : ∀ (i : ι), i ∈ s → t i ≤ K
⊢ IsSplittingField F { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i } (∏ i in s, p i)
[PROOFSTEP]
simp only [isSplittingField_iff] at h ⊢
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
t : ι → IntermediateField F E
p : ι → F[X]
s : Finset ι
h0 : ∏ i in s, p i ≠ 0
K : IntermediateField F E := ⨆ (i : ι) (_ : i ∈ s), t i
hK : ∀ (i : ι), i ∈ s → t i ≤ K
h : ∀ (i : ι), i ∈ s → Splits (algebraMap F { x // x ∈ t i }) (p i) ∧ t i = adjoin F (rootSet (p i) E)
⊢ Splits (algebraMap F { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }) (∏ i in s, p i) ∧
    ⨆ (i : ι) (_ : i ∈ s), t i = adjoin F (rootSet (∏ i in s, p i) E)
[PROOFSTEP]
refine'
  ⟨splits_prod (algebraMap F K) fun i hi =>
      Polynomial.splits_comp_of_splits (algebraMap F (t i)) (inclusion (hK i hi)).toRingHom (h i hi).1,
    _⟩
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
t : ι → IntermediateField F E
p : ι → F[X]
s : Finset ι
h0 : ∏ i in s, p i ≠ 0
K : IntermediateField F E := ⨆ (i : ι) (_ : i ∈ s), t i
hK : ∀ (i : ι), i ∈ s → t i ≤ K
h : ∀ (i : ι), i ∈ s → Splits (algebraMap F { x // x ∈ t i }) (p i) ∧ t i = adjoin F (rootSet (p i) E)
⊢ ⨆ (i : ι) (_ : i ∈ s), t i = adjoin F (rootSet (∏ i in s, p i) E)
[PROOFSTEP]
simp only [rootSet_prod p s h0, ← Set.iSup_eq_iUnion, (@gc F _ E _ _).l_iSup₂]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
t : ι → IntermediateField F E
p : ι → F[X]
s : Finset ι
h0 : ∏ i in s, p i ≠ 0
K : IntermediateField F E := ⨆ (i : ι) (_ : i ∈ s), t i
hK : ∀ (i : ι), i ∈ s → t i ≤ K
h : ∀ (i : ι), i ∈ s → Splits (algebraMap F { x // x ∈ t i }) (p i) ∧ t i = adjoin F (rootSet (p i) E)
⊢ ⨆ (i : ι) (_ : i ∈ s), t i = ⨆ (i : ι) (_ : i ∈ s), adjoin F (rootSet (p i) E)
[PROOFSTEP]
exact iSup_congr fun i => iSup_congr fun hi => (h i hi).2
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
K : IntermediateField F E
⊢ F⟮α⟯ ≤ K ↔ α ∈ K
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
⊢ IsCompactElement F⟮x⟯
[PROOFSTEP]
rw [isCompactElement_iff_le_of_directed_sSup_le]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
⊢ ∀ (s : Set (IntermediateField F E)),
    Set.Nonempty s → DirectedOn (fun x x_1 => x ≤ x_1) s → F⟮x⟯ ≤ sSup s → ∃ x_1, x_1 ∈ s ∧ F⟮x⟯ ≤ x_1
[PROOFSTEP]
rintro s ⟨F₀, hF₀⟩ hs hx
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : F⟮x⟯ ≤ sSup s
⊢ ∃ x_1, x_1 ∈ s ∧ F⟮x⟯ ≤ x_1
[PROOFSTEP]
simp only [adjoin_simple_le_iff] at hx ⊢
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
⊢ ∃ x_1, x_1 ∈ s ∧ x ∈ x_1
[PROOFSTEP]
let F : IntermediateField F E :=
  { carrier := ⋃ E ∈ s, ↑E
    add_mem' := by
      rintro x₁ x₂ ⟨-, ⟨F₁, rfl⟩, ⟨-, ⟨hF₁, rfl⟩, hx₁⟩⟩ ⟨-, ⟨F₂, rfl⟩, ⟨-, ⟨hF₂, rfl⟩, hx₂⟩⟩
      obtain ⟨F₃, hF₃, h₁₃, h₂₃⟩ := hs F₁ hF₁ F₂ hF₂
      exact mem_iUnion_of_mem F₃ (mem_iUnion_of_mem hF₃ (F₃.add_mem (h₁₃ hx₁) (h₂₃ hx₂)))
    mul_mem' := by
      rintro x₁ x₂ ⟨-, ⟨F₁, rfl⟩, ⟨-, ⟨hF₁, rfl⟩, hx₁⟩⟩ ⟨-, ⟨F₂, rfl⟩, ⟨-, ⟨hF₂, rfl⟩, hx₂⟩⟩
      obtain ⟨F₃, hF₃, h₁₃, h₂₃⟩ := hs F₁ hF₁ F₂ hF₂
      exact mem_iUnion_of_mem F₃ (mem_iUnion_of_mem hF₃ (F₃.mul_mem (h₁₃ hx₁) (h₂₃ hx₂)))
    inv_mem' := by
      rintro x ⟨-, ⟨E, rfl⟩, ⟨-, ⟨hE, rfl⟩, hx⟩⟩
      exact mem_iUnion_of_mem E (mem_iUnion_of_mem hE (E.inv_mem hx))
    algebraMap_mem' := fun x => mem_iUnion_of_mem F₀ (mem_iUnion_of_mem hF₀ (F₀.algebraMap_mem x)) }
    -- Porting note: original proof of `key` was
    -- `sSup_le fun E1 hE1 => Set.subset_iUnion_of_subset E1 (subset_iUnion _ hE1)`
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
⊢ ∀ {a b : E},
    a ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
      b ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
        a * b ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1
[PROOFSTEP]
rintro x₁ x₂ ⟨-, ⟨F₁, rfl⟩, ⟨-, ⟨hF₁, rfl⟩, hx₁⟩⟩ ⟨-, ⟨F₂, rfl⟩, ⟨-, ⟨hF₂, rfl⟩, hx₂⟩⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
x₁ x₂ : E
F₁ : IntermediateField F E
hF₁ : F₁ ∈ s
hx₁ : x₁ ∈ (fun h => ↑F₁) hF₁
F₂ : IntermediateField F E
hF₂ : F₂ ∈ s
hx₂ : x₂ ∈ (fun h => ↑F₂) hF₂
⊢ x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1
[PROOFSTEP]
obtain ⟨F₃, hF₃, h₁₃, h₂₃⟩ := hs F₁ hF₁ F₂ hF₂
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
x₁ x₂ : E
F₁ : IntermediateField F E
hF₁ : F₁ ∈ s
hx₁ : x₁ ∈ (fun h => ↑F₁) hF₁
F₂ : IntermediateField F E
hF₂ : F₂ ∈ s
hx₂ : x₂ ∈ (fun h => ↑F₂) hF₂
F₃ : IntermediateField F E
hF₃ : F₃ ∈ s
h₁₃ : F₁ ≤ F₃
h₂₃ : F₂ ≤ F₃
⊢ x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1
[PROOFSTEP]
exact mem_iUnion_of_mem F₃ (mem_iUnion_of_mem hF₃ (F₃.mul_mem (h₁₃ hx₁) (h₂₃ hx₂)))
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
⊢ ∀ {a b : E},
    a ∈
        {
              toSubsemigroup :=
                { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                  mul_mem' :=
                    (_ :
                      ∀ {x₁ x₂ : E},
                        x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                          x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
              one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
      b ∈
          {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
        a + b ∈
          {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier
[PROOFSTEP]
rintro x₁ x₂ ⟨-, ⟨F₁, rfl⟩, ⟨-, ⟨hF₁, rfl⟩, hx₁⟩⟩ ⟨-, ⟨F₂, rfl⟩, ⟨-, ⟨hF₂, rfl⟩, hx₂⟩⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
x₁ x₂ : E
F₁ : IntermediateField F E
hF₁ : F₁ ∈ s
hx₁ : x₁ ∈ (fun h => ↑F₁) hF₁
F₂ : IntermediateField F E
hF₂ : F₂ ∈ s
hx₂ : x₂ ∈ (fun h => ↑F₂) hF₂
⊢ x₁ + x₂ ∈
    {
          toSubsemigroup :=
            { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
              mul_mem' :=
                (_ :
                  ∀ {x₁ x₂ : E},
                    x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                      x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                        x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
          one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier
[PROOFSTEP]
obtain ⟨F₃, hF₃, h₁₃, h₂₃⟩ := hs F₁ hF₁ F₂ hF₂
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
x₁ x₂ : E
F₁ : IntermediateField F E
hF₁ : F₁ ∈ s
hx₁ : x₁ ∈ (fun h => ↑F₁) hF₁
F₂ : IntermediateField F E
hF₂ : F₂ ∈ s
hx₂ : x₂ ∈ (fun h => ↑F₂) hF₂
F₃ : IntermediateField F E
hF₃ : F₃ ∈ s
h₁₃ : F₁ ≤ F₃
h₂₃ : F₂ ≤ F₃
⊢ x₁ + x₂ ∈
    {
          toSubsemigroup :=
            { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
              mul_mem' :=
                (_ :
                  ∀ {x₁ x₂ : E},
                    x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                      x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                        x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
          one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier
[PROOFSTEP]
exact mem_iUnion_of_mem F₃ (mem_iUnion_of_mem hF₃ (F₃.add_mem (h₁₃ hx₁) (h₂₃ hx₂)))
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α x : E
s : Set (IntermediateField F E)
F₀ : IntermediateField F E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
⊢ ∀ (x : E),
    x ∈
        {
                  toSubsemiring :=
                    {
                      toSubmonoid :=
                        {
                          toSubsemigroup :=
                            { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                              mul_mem' :=
                                (_ :
                                  ∀ {x₁ x₂ : E},
                                    x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                      x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                          one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                      add_mem' :=
                        (_ :
                          ∀ {x₁ x₂ : E},
                            x₁ ∈
                                {
                                      toSubsemigroup :=
                                        { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                                          mul_mem' :=
                                            (_ :
                                              ∀ {x₁ x₂ : E},
                                                x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                  x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                    x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                                      one_mem' :=
                                        (_ :
                                          1 ∈
                                            ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s),
                                              ↑E_1) }.toSubsemigroup.carrier →
                              x₂ ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {x₁ x₂ : E},
                                                  x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                    x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                      x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                                        one_mem' :=
                                          (_ :
                                            1 ∈
                                              ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s),
                                                ↑E_1) }.toSubsemigroup.carrier →
                                x₁ + x₂ ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {x₁ x₂ : E},
                                                  x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                    x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                      x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                                        one_mem' :=
                                          (_ :
                                            1 ∈
                                              ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s),
                                                ↑E_1) }.toSubsemigroup.carrier),
                      zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                  algebraMap_mem' :=
                    (_ :
                      ∀ (x : F),
                        ↑(algebraMap F E) x ∈
                          ⋃ (i : IntermediateField F E) (_ : i ∈ s),
                            ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      x⁻¹ ∈
        {
                  toSubsemiring :=
                    {
                      toSubmonoid :=
                        {
                          toSubsemigroup :=
                            { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                              mul_mem' :=
                                (_ :
                                  ∀ {x₁ x₂ : E},
                                    x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                      x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                          one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                      add_mem' :=
                        (_ :
                          ∀ {x₁ x₂ : E},
                            x₁ ∈
                                {
                                      toSubsemigroup :=
                                        { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                                          mul_mem' :=
                                            (_ :
                                              ∀ {x₁ x₂ : E},
                                                x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                  x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                    x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                                      one_mem' :=
                                        (_ :
                                          1 ∈
                                            ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s),
                                              ↑E_1) }.toSubsemigroup.carrier →
                              x₂ ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {x₁ x₂ : E},
                                                  x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                    x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                      x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                                        one_mem' :=
                                          (_ :
                                            1 ∈
                                              ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s),
                                                ↑E_1) }.toSubsemigroup.carrier →
                                x₁ + x₂ ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {x₁ x₂ : E},
                                                  x₁ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                    x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1 →
                                                      x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                                        one_mem' :=
                                          (_ :
                                            1 ∈
                                              ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s),
                                                ↑E_1) }.toSubsemigroup.carrier),
                      zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F E) (_ : E_1 ∈ s), ↑E_1) },
                  algebraMap_mem' :=
                    (_ :
                      ∀ (x : F),
                        ↑(algebraMap F E) x ∈
                          ⋃ (i : IntermediateField F E) (_ : i ∈ s),
                            ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rintro x ⟨-, ⟨E, rfl⟩, ⟨-, ⟨hE, rfl⟩, hx⟩⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
F : Type u_1
inst✝² : Field F
E✝ : Type u_2
inst✝¹ : Field E✝
inst✝ : Algebra F E✝
S : Set E✝
α x✝ : E✝
s : Set (IntermediateField F E✝)
F₀ : IntermediateField F E✝
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx✝ : x✝ ∈ sSup s
x : E✝
E : IntermediateField F E✝
hE : E ∈ s
hx : x ∈ (fun h => ↑E) hE
⊢ x⁻¹ ∈
    {
              toSubsemiring :=
                {
                  toSubmonoid :=
                    {
                      toSubsemigroup :=
                        { carrier := ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E,
                          mul_mem' :=
                            (_ :
                              ∀ {x₁ x₂ : E✝},
                                x₁ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                  x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                    x₁ * x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) },
                      one_mem' := (_ : 1 ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) },
                  add_mem' :=
                    (_ :
                      ∀ {x₁ x₂ : E✝},
                        x₁ ∈
                            {
                                  toSubsemigroup :=
                                    { carrier := ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E,
                                      mul_mem' :=
                                        (_ :
                                          ∀ {x₁ x₂ : E✝},
                                            x₁ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                              x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                                x₁ * x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) },
                                  one_mem' :=
                                    (_ : 1 ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) }.toSubsemigroup.carrier →
                          x₂ ∈
                              {
                                    toSubsemigroup :=
                                      { carrier := ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E,
                                        mul_mem' :=
                                          (_ :
                                            ∀ {x₁ x₂ : E✝},
                                              x₁ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                                x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                                  x₁ * x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) },
                                    one_mem' :=
                                      (_ :
                                        1 ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) }.toSubsemigroup.carrier →
                            x₁ + x₂ ∈
                              {
                                    toSubsemigroup :=
                                      { carrier := ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E,
                                        mul_mem' :=
                                          (_ :
                                            ∀ {x₁ x₂ : E✝},
                                              x₁ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                                x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E →
                                                  x₁ * x₂ ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) },
                                    one_mem' :=
                                      (_ :
                                        1 ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) }.toSubsemigroup.carrier),
                  zero_mem' := (_ : 0 ∈ ⋃ (E : IntermediateField F E✝) (_ : E ∈ s), ↑E) },
              algebraMap_mem' :=
                (_ :
                  ∀ (x : F),
                    ↑(algebraMap F E✝) x ∈
                      ⋃ (i : IntermediateField F E✝) (_ : i ∈ s), ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
exact mem_iUnion_of_mem E (mem_iUnion_of_mem hE (E.inv_mem hx))
[GOAL]
case intro
F✝ : Type u_1
inst✝² : Field F✝
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F✝ E
S : Set E
α x : E
s : Set (IntermediateField F✝ E)
F₀ : IntermediateField F✝ E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
F : IntermediateField F✝ E :=
  {
    toSubalgebra :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
            add_mem' :=
              (_ :
                ∀ {x₁ x₂ : E},
                  x₁ ∈
                      {
                            toSubsemigroup :=
                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                mul_mem' :=
                                  (_ :
                                    ∀ {x₁ x₂ : E},
                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            one_mem' :=
                              (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                    x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                      x₁ + x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier),
            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
        algebraMap_mem' := (_ : ∀ (x : F✝), ↑(algebraMap F✝ E) x ∈ ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s), ↑i) },
    inv_mem' :=
      (_ :
        ∀ (x : E),
          x ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
            x⁻¹ ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier) }
⊢ ∃ x_1, x_1 ∈ s ∧ x ∈ x_1
[PROOFSTEP]
have key : sSup s ≤ F :=
  sSup_le fun E1 hE1 => by
    refine' Set.subset_iUnion_of_subset E1 _
    intro x hx
    simpa [hE1] using hx
[GOAL]
F✝ : Type u_1
inst✝² : Field F✝
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F✝ E
S : Set E
α x : E
s : Set (IntermediateField F✝ E)
F₀ : IntermediateField F✝ E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
F : IntermediateField F✝ E :=
  {
    toSubalgebra :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
            add_mem' :=
              (_ :
                ∀ {x₁ x₂ : E},
                  x₁ ∈
                      {
                            toSubsemigroup :=
                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                mul_mem' :=
                                  (_ :
                                    ∀ {x₁ x₂ : E},
                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            one_mem' :=
                              (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                    x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                      x₁ + x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier),
            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
        algebraMap_mem' := (_ : ∀ (x : F✝), ↑(algebraMap F✝ E) x ∈ ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s), ↑i) },
    inv_mem' :=
      (_ :
        ∀ (x : E),
          x ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
            x⁻¹ ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier) }
E1 : IntermediateField F✝ E
hE1 : E1 ∈ s
⊢ E1 ≤ F
[PROOFSTEP]
refine' Set.subset_iUnion_of_subset E1 _
[GOAL]
F✝ : Type u_1
inst✝² : Field F✝
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F✝ E
S : Set E
α x : E
s : Set (IntermediateField F✝ E)
F₀ : IntermediateField F✝ E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
F : IntermediateField F✝ E :=
  {
    toSubalgebra :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
            add_mem' :=
              (_ :
                ∀ {x₁ x₂ : E},
                  x₁ ∈
                      {
                            toSubsemigroup :=
                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                mul_mem' :=
                                  (_ :
                                    ∀ {x₁ x₂ : E},
                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            one_mem' :=
                              (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                    x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                      x₁ + x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier),
            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
        algebraMap_mem' := (_ : ∀ (x : F✝), ↑(algebraMap F✝ E) x ∈ ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s), ↑i) },
    inv_mem' :=
      (_ :
        ∀ (x : E),
          x ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
            x⁻¹ ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier) }
E1 : IntermediateField F✝ E
hE1 : E1 ∈ s
⊢ ↑E1 ⊆ ⋃ (_ : E1 ∈ s), ↑E1
[PROOFSTEP]
intro x hx
[GOAL]
F✝ : Type u_1
inst✝² : Field F✝
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F✝ E
S : Set E
α x✝ : E
s : Set (IntermediateField F✝ E)
F₀ : IntermediateField F✝ E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx✝ : x✝ ∈ sSup s
F : IntermediateField F✝ E :=
  {
    toSubalgebra :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
            add_mem' :=
              (_ :
                ∀ {x₁ x₂ : E},
                  x₁ ∈
                      {
                            toSubsemigroup :=
                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                mul_mem' :=
                                  (_ :
                                    ∀ {x₁ x₂ : E},
                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            one_mem' :=
                              (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                    x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                      x₁ + x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier),
            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
        algebraMap_mem' := (_ : ∀ (x : F✝), ↑(algebraMap F✝ E) x ∈ ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s), ↑i) },
    inv_mem' :=
      (_ :
        ∀ (x : E),
          x ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
            x⁻¹ ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier) }
E1 : IntermediateField F✝ E
hE1 : E1 ∈ s
x : E
hx : x ∈ ↑E1
⊢ x ∈ ⋃ (_ : E1 ∈ s), ↑E1
[PROOFSTEP]
simpa [hE1] using hx
[GOAL]
case intro
F✝ : Type u_1
inst✝² : Field F✝
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F✝ E
S : Set E
α x : E
s : Set (IntermediateField F✝ E)
F₀ : IntermediateField F✝ E
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx : x ∈ sSup s
F : IntermediateField F✝ E :=
  {
    toSubalgebra :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E},
                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
            add_mem' :=
              (_ :
                ∀ {x₁ x₂ : E},
                  x₁ ∈
                      {
                            toSubsemigroup :=
                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                mul_mem' :=
                                  (_ :
                                    ∀ {x₁ x₂ : E},
                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            one_mem' :=
                              (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                    x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier →
                      x₁ + x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E},
                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                              one_mem' :=
                                (_ :
                                  1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) }.toSubsemigroup.carrier),
            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
        algebraMap_mem' := (_ : ∀ (x : F✝), ↑(algebraMap F✝ E) x ∈ ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s), ↑i) },
    inv_mem' :=
      (_ :
        ∀ (x : E),
          x ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
            x⁻¹ ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E},
                                          x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                            x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                              x₁ * x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                one_mem' := (_ : 1 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E},
                                                      x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                        x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₁ * x₂ ∈
                                                            ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                    ↑E_1) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E},
                                                        x₁ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                          x₂ ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1 →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s),
                                                      ↑E_1) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E_1 : IntermediateField F✝ E) (_ : E_1 ∈ s), ↑E_1) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E) x ∈
                                ⋃ (i : IntermediateField F✝ E) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier) }
key : sSup s ≤ F
⊢ ∃ x_1, x_1 ∈ s ∧ x ∈ x_1
[PROOFSTEP]
obtain ⟨-, ⟨E, rfl⟩, -, ⟨hE, rfl⟩, hx⟩ := key hx
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
F✝ : Type u_1
inst✝² : Field F✝
E✝ : Type u_2
inst✝¹ : Field E✝
inst✝ : Algebra F✝ E✝
S : Set E✝
α x : E✝
s : Set (IntermediateField F✝ E✝)
F₀ : IntermediateField F✝ E✝
hF₀ : F₀ ∈ s
hs : DirectedOn (fun x x_1 => x ≤ x_1) s
hx✝ : x ∈ sSup s
F : IntermediateField F✝ E✝ :=
  {
    toSubalgebra :=
      {
        toSubsemiring :=
          {
            toSubmonoid :=
              {
                toSubsemigroup :=
                  { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                    mul_mem' :=
                      (_ :
                        ∀ {x₁ x₂ : E✝},
                          x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                            x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                              x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                one_mem' := (_ : 1 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
            add_mem' :=
              (_ :
                ∀ {x₁ x₂ : E✝},
                  x₁ ∈
                      {
                            toSubsemigroup :=
                              { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                mul_mem' :=
                                  (_ :
                                    ∀ {x₁ x₂ : E✝},
                                      x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                        x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                          x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                            one_mem' :=
                              (_ : 1 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) }.toSubsemigroup.carrier →
                    x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E✝},
                                        x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                          x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                            x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                              one_mem' :=
                                (_ : 1 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) }.toSubsemigroup.carrier →
                      x₁ + x₂ ∈
                        {
                              toSubsemigroup :=
                                { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                  mul_mem' :=
                                    (_ :
                                      ∀ {x₁ x₂ : E✝},
                                        x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                          x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                            x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                              one_mem' :=
                                (_ : 1 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) }.toSubsemigroup.carrier),
            zero_mem' := (_ : 0 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
        algebraMap_mem' := (_ : ∀ (x : F✝), ↑(algebraMap F✝ E✝) x ∈ ⋃ (i : IntermediateField F✝ E✝) (_ : i ∈ s), ↑i) },
    inv_mem' :=
      (_ :
        ∀ (x : E✝),
          x ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E✝},
                                          x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                            x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                              x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                one_mem' := (_ : 1 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E✝},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E✝},
                                                      x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                        x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                          x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s),
                                                    ↑E) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E✝},
                                                        x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                          x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s),
                                                      ↑E) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E✝},
                                                        x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                          x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s),
                                                      ↑E) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E✝) x ∈
                                ⋃ (i : IntermediateField F✝ E✝) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
            x⁻¹ ∈
              {
                        toSubsemiring :=
                          {
                            toSubmonoid :=
                              {
                                toSubsemigroup :=
                                  { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                    mul_mem' :=
                                      (_ :
                                        ∀ {x₁ x₂ : E✝},
                                          x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                            x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                              x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                one_mem' := (_ : 1 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                            add_mem' :=
                              (_ :
                                ∀ {x₁ x₂ : E✝},
                                  x₁ ∈
                                      {
                                            toSubsemigroup :=
                                              { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                                mul_mem' :=
                                                  (_ :
                                                    ∀ {x₁ x₂ : E✝},
                                                      x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                        x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                          x₁ * x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                            one_mem' :=
                                              (_ :
                                                1 ∈
                                                  ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s),
                                                    ↑E) }.toSubsemigroup.carrier →
                                    x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E✝},
                                                        x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                          x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s),
                                                      ↑E) }.toSubsemigroup.carrier →
                                      x₁ + x₂ ∈
                                        {
                                              toSubsemigroup :=
                                                { carrier := ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E,
                                                  mul_mem' :=
                                                    (_ :
                                                      ∀ {x₁ x₂ : E✝},
                                                        x₁ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                          x₂ ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E →
                                                            x₁ * x₂ ∈
                                                              ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                                              one_mem' :=
                                                (_ :
                                                  1 ∈
                                                    ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s),
                                                      ↑E) }.toSubsemigroup.carrier),
                            zero_mem' := (_ : 0 ∈ ⋃ (E : IntermediateField F✝ E✝) (_ : E ∈ s), ↑E) },
                        algebraMap_mem' :=
                          (_ :
                            ∀ (x : F✝),
                              ↑(algebraMap F✝ E✝) x ∈
                                ⋃ (i : IntermediateField F✝ E✝) (_ : i ∈ s),
                                  ↑i) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier) }
key : sSup s ≤ F
E : IntermediateField F✝ E✝
hE : E ∈ s
hx : x ∈ (fun h => ↑E) hE
⊢ ∃ x_1, x_1 ∈ s ∧ x ∈ x_1
[PROOFSTEP]
exact ⟨E, hE, hx⟩
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
⊢ IsCompactElement (adjoin F ↑S)
[PROOFSTEP]
have key : adjoin F ↑S = ⨆ x ∈ S, F⟮x⟯ := by
  -- Porting note: `exact` or `apply` timeout hererefine'
    le_antisymm
      (adjoin_le_iff.mpr fun x hx =>
        SetLike.mem_coe.mpr (adjoin_simple_le_iff.mp (le_iSup_of_le x (le_iSup_iff.2 (fun E1 hE1 => hE1 hx)))))
      (iSup_le fun x => iSup_le fun hx => adjoin_simple_le_iff.mpr (subset_adjoin F S hx))
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
⊢ adjoin F ↑S = ⨆ (x : E) (_ : x ∈ S), F⟮x⟯
[PROOFSTEP]
refine'
  le_antisymm
    (adjoin_le_iff.mpr fun x hx =>
      SetLike.mem_coe.mpr (adjoin_simple_le_iff.mp (le_iSup_of_le x (le_iSup_iff.2 (fun E1 hE1 => hE1 hx)))))
    (iSup_le fun x => iSup_le fun hx => adjoin_simple_le_iff.mpr (subset_adjoin F S hx))
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
key : adjoin F ↑S = ⨆ (x : E) (_ : x ∈ S), F⟮x⟯
⊢ IsCompactElement (adjoin F ↑S)
[PROOFSTEP]
rw [key, ← Finset.sup_eq_iSup]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
key : adjoin F ↑S = ⨆ (x : E) (_ : x ∈ S), F⟮x⟯
⊢ IsCompactElement (Finset.sup S fun x => F⟮x⟯)
[PROOFSTEP]
exact finset_sup_compact_of_compact S fun x _ => adjoin_simple_isCompactElement x
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
s : IntermediateField F E
⊢ ∀ (x : IntermediateField F E), x ∈ (fun x => F⟮x⟯) '' ↑s → IsCompactElement x
[PROOFSTEP]
rintro t ⟨x, _, rfl⟩
[GOAL]
case intro.intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
s : IntermediateField F E
x : E
left✝ : x ∈ ↑s
⊢ IsCompactElement ((fun x => F⟮x⟯) x)
[PROOFSTEP]
exact adjoin_simple_isCompactElement x
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ (i : ι), f i
⊢ ∃ s, x ∈ ⨆ (i : ι) (_ : i ∈ s), f i
[PROOFSTEP]
have := (adjoin_simple_isCompactElement x : IsCompactElement F⟮x⟯).exists_finset_of_le_iSup (IntermediateField F E) f
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ (i : ι), f i
this : F⟮x⟯ ≤ ⨆ (i : ι), f i → ∃ s, F⟮x⟯ ≤ ⨆ (i : ι) (_ : i ∈ s), f i
⊢ ∃ s, x ∈ ⨆ (i : ι) (_ : i ∈ s), f i
[PROOFSTEP]
simp only [adjoin_simple_le_iff] at this 
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ (i : ι), f i
this : x ∈ ⨆ (i : ι), f i → ∃ s, x ∈ ⨆ (i : ι) (_ : i ∈ s), f i
⊢ ∃ s, x ∈ ⨆ (i : ι) (_ : i ∈ s), f i
[PROOFSTEP]
exact this hx
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ (i : ι), f i
⊢ ∃ s, x ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }) (_ : i ∈ s), F⟮↑i.snd⟯
[PROOFSTEP]
refine' exists_finset_of_mem_iSup (SetLike.le_def.mp (iSup_le (fun i => _)) hx)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x : E
hx : x ∈ ⨆ (i : ι), f i
i : ι
⊢ f i ≤ ⨆ (i : (i : ι) × { x // x ∈ f i }), F⟮↑i.snd⟯
[PROOFSTEP]
intro x h
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x✝ : E
hx : x✝ ∈ ⨆ (i : ι), f i
i : ι
x : E
h : x ∈ f i
⊢ x ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }), F⟮↑i.snd⟯
[PROOFSTEP]
exact SetLike.le_def.mp (le_iSup_of_le ⟨i, x, h⟩ (by simp)) (mem_adjoin_simple_self F x)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
x✝ : E
hx : x✝ ∈ ⨆ (i : ι), f i
i : ι
x : E
h : x ∈ f i
⊢ F⟮x⟯ ≤ F⟮↑{ fst := i, snd := { val := x, property := h } }.snd⟯
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
h : ∀ (i : ι), Algebra.IsAlgebraic F { x // x ∈ f i }
x : E
hx : x ∈ ⨆ (i : ι), f i
⊢ ∃ s, x ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }) (_ : i ∈ s), adjoin F (rootSet (minpoly F i.snd) E)
[PROOFSTEP]
refine' exists_finset_of_mem_iSup (SetLike.le_def.mp (iSup_le (fun i => _)) hx)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
h : ∀ (i : ι), Algebra.IsAlgebraic F { x // x ∈ f i }
x : E
hx : x ∈ ⨆ (i : ι), f i
i : ι
⊢ f i ≤ ⨆ (i : (i : ι) × { x // x ∈ f i }), adjoin F (rootSet (minpoly F i.snd) E)
[PROOFSTEP]
intro x1 hx1
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
h : ∀ (i : ι), Algebra.IsAlgebraic F { x // x ∈ f i }
x : E
hx : x ∈ ⨆ (i : ι), f i
i : ι
x1 : E
hx1 : x1 ∈ f i
⊢ x1 ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }), adjoin F (rootSet (minpoly F i.snd) E)
[PROOFSTEP]
refine' SetLike.le_def.mp (le_iSup_of_le ⟨i, x1, hx1⟩ _) (subset_adjoin F (rootSet (minpoly F x1) E) _)
[GOAL]
case refine'_1
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
h : ∀ (i : ι), Algebra.IsAlgebraic F { x // x ∈ f i }
x : E
hx : x ∈ ⨆ (i : ι), f i
i : ι
x1 : E
hx1 : x1 ∈ f i
⊢ adjoin F (rootSet (minpoly F x1) E) ≤
    adjoin F (rootSet (minpoly F { fst := i, snd := { val := x1, property := hx1 } }.snd) E)
[PROOFSTEP]
rw [IntermediateField.minpoly_eq, Subtype.coe_mk]
[GOAL]
case refine'_2
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
h : ∀ (i : ι), Algebra.IsAlgebraic F { x // x ∈ f i }
x : E
hx : x ∈ ⨆ (i : ι), f i
i : ι
x1 : E
hx1 : x1 ∈ f i
⊢ x1 ∈ rootSet (minpoly F x1) E
[PROOFSTEP]
rw [mem_rootSet_of_ne, minpoly.aeval]
[GOAL]
case refine'_2.hp
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
ι : Type u_3
f : ι → IntermediateField F E
h : ∀ (i : ι), Algebra.IsAlgebraic F { x // x ∈ f i }
x : E
hx : x ∈ ⨆ (i : ι), f i
i : ι
x1 : E
hx1 : x1 ∈ f i
⊢ minpoly F x1 ≠ 0
[PROOFSTEP]
exact minpoly.ne_zero (isIntegral_iff.mp (isAlgebraic_iff_isIntegral.mp (h i ⟨x1, hx1⟩)))
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
⊢ adjoin F S = ⊥ ↔ S ⊆ ↑⊥
[PROOFSTEP]
rw [eq_bot_iff, adjoin_le_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
⊢ S ≤ ↑⊥ ↔ S ⊆ ↑⊥
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
⊢ F⟮α⟯ = ⊥ ↔ α ∈ ⊥
[PROOFSTEP]
simp
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
n : ℤ
⊢ F⟮↑n⟯ = ⊥
[PROOFSTEP]
refine' adjoin_simple_eq_bot_iff.mpr (coe_int_mem ⊥ n)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ Module.rank F { x // x ∈ K } = 1 ↔ K = ⊥
[PROOFSTEP]
rw [← toSubalgebra_eq_iff, ← rank_eq_rank_subalgebra, Subalgebra.rank_eq_one_iff, bot_toSubalgebra]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ finrank F { x // x ∈ K } = 1 ↔ K = ⊥
[PROOFSTEP]
rw [← toSubalgebra_eq_iff, ← finrank_eq_finrank_subalgebra, Subalgebra.finrank_eq_one_iff, bot_toSubalgebra]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ Module.rank F { x // x ∈ ⊥ } = 1
[PROOFSTEP]
rw [rank_eq_one_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ finrank F { x // x ∈ ⊥ } = 1
[PROOFSTEP]
rw [finrank_eq_one_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ Module.rank F { x // x ∈ F⟮α⟯ } = 1 ↔ α ∈ ⊥
[PROOFSTEP]
rw [rank_adjoin_eq_one_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ {α} ⊆ ↑⊥ ↔ α ∈ ⊥
[PROOFSTEP]
exact Set.singleton_subset_iff
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ finrank F { x // x ∈ F⟮α⟯ } = 1 ↔ α ∈ ⊥
[PROOFSTEP]
rw [finrank_adjoin_eq_one_iff]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ {α} ⊆ ↑⊥ ↔ α ∈ ⊥
[PROOFSTEP]
exact Set.singleton_subset_iff
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
h : ∀ (x : E), Module.rank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
⊢ ⊥ = ⊤
[PROOFSTEP]
ext y
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
h : ∀ (x : E), Module.rank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
y : E
⊢ y ∈ ⊥ ↔ y ∈ ⊤
[PROOFSTEP]
rw [iff_true_right IntermediateField.mem_top]
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
h : ∀ (x : E), Module.rank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
y : E
⊢ y ∈ ⊥
[PROOFSTEP]
exact rank_adjoin_simple_eq_one_iff.mp (h y)
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
h : ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
⊢ ⊥ = ⊤
[PROOFSTEP]
ext y
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
h : ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
y : E
⊢ y ∈ ⊥ ↔ y ∈ ⊤
[PROOFSTEP]
rw [iff_true_right IntermediateField.mem_top]
[GOAL]
case h
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
h : ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
y : E
⊢ y ∈ ⊥
[PROOFSTEP]
exact finrank_adjoin_simple_eq_one_iff.mp (h y)
[GOAL]
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
inst✝ : FiniteDimensional F E
h : ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } ≤ 1
⊢ ⊥ = ⊤
[PROOFSTEP]
apply bot_eq_top_of_finrank_adjoin_eq_one
[GOAL]
case h
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
inst✝ : FiniteDimensional F E
h : ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } ≤ 1
⊢ ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
[PROOFSTEP]
exact fun x => by linarith [h x, show 0 < finrank F F⟮x⟯ from finrank_pos]
[GOAL]
F : Type u_1
inst✝³ : Field F
E : Type u_2
inst✝² : Field E
inst✝¹ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
inst✝ : FiniteDimensional F E
h : ∀ (x : E), finrank F { x_1 // x_1 ∈ F⟮x⟯ } ≤ 1
x : E
⊢ finrank F { x_1 // x_1 ∈ F⟮x⟯ } = 1
[PROOFSTEP]
linarith [h x, show 0 < finrank F F⟮x⟯ from finrank_pos]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
h : IsIntegral F α
⊢ minpoly F (AdjoinSimple.gen F α) = minpoly F α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α] at h 
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
h : IsIntegral F (↑(algebraMap { x // x ∈ F⟮α⟯ } E) (AdjoinSimple.gen F α))
⊢ minpoly F (AdjoinSimple.gen F α) = minpoly F α
[PROOFSTEP]
have inj := (algebraMap F⟮α⟯ E).injective
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
h : IsIntegral F (↑(algebraMap { x // x ∈ F⟮α⟯ } E) (AdjoinSimple.gen F α))
inj : Function.Injective ↑(algebraMap { x // x ∈ F⟮α⟯ } E)
⊢ minpoly F (AdjoinSimple.gen F α) = minpoly F α
[PROOFSTEP]
exact minpoly.eq_of_algebraMap_eq inj ((isIntegral_algebraMap_iff inj).mp h) (AdjoinSimple.algebraMap_gen _ _).symm
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0
[PROOFSTEP]
ext
[GOAL]
case a
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑(↑(aeval (AdjoinSimple.gen F α)) (minpoly F α)) = ↑0
[PROOFSTEP]
convert minpoly.aeval F α
[GOAL]
case h.e'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑(↑(aeval (AdjoinSimple.gen F α)) (minpoly F α)) = ↑(aeval α) (minpoly F α)
[PROOFSTEP]
conv in aeval α => rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
| aeval α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
| aeval α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
| aeval α
[PROOFSTEP]
rw [← AdjoinSimple.algebraMap_gen F α]
[GOAL]
case h.e'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α✝ : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
α : E
⊢ ↑(↑(aeval (AdjoinSimple.gen F α)) (minpoly F α)) =
    ↑(aeval (↑(algebraMap { x // x ∈ F⟮α⟯ } E) (AdjoinSimple.gen F α))) (minpoly F α)
[PROOFSTEP]
exact (aeval_algebraMap_apply E (AdjoinSimple.gen F α) _).symm
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
⊢ Function.Bijective
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
[PROOFSTEP]
set f := AdjoinRoot.lift _ _ (aeval_gen_minpoly F α : _)
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
⊢ Function.Bijective
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
[PROOFSTEP]
haveI := Fact.mk (minpoly.irreducible h)
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ Function.Bijective
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
[PROOFSTEP]
constructor
[GOAL]
case left
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ Function.Injective
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
[PROOFSTEP]
exact RingHom.injective f
[GOAL]
case right
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ Function.Surjective
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
[PROOFSTEP]
suffices F⟮α⟯.toSubfield ≤ RingHom.fieldRange (F⟮α⟯.toSubfield.subtype.comp f)
  by
  intro x
  obtain ⟨y, hy⟩ := (this (Subtype.mem x))
  exact ⟨y, Subtype.ext hy⟩
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this✝ : Fact (Irreducible (minpoly F α))
this : toSubfield F⟮α⟯ ≤ RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f)
⊢ Function.Surjective
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
[PROOFSTEP]
intro x
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this✝ : Fact (Irreducible (minpoly F α))
this : toSubfield F⟮α⟯ ≤ RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f)
x : { x // x ∈ F⟮α⟯ }
⊢ ∃ a,
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
        a =
      x
[PROOFSTEP]
obtain ⟨y, hy⟩ := (this (Subtype.mem x))
[GOAL]
case intro
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this✝ : Fact (Irreducible (minpoly F α))
this : toSubfield F⟮α⟯ ≤ RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f)
x : { x // x ∈ F⟮α⟯ }
y : AdjoinRoot (minpoly F α)
hy : ↑(RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f) y = ↑x
⊢ ∃ a,
    ↑(AdjoinRoot.liftHom (minpoly F α) (AdjoinSimple.gen F α) (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0))
        a =
      x
[PROOFSTEP]
exact ⟨y, Subtype.ext hy⟩
[GOAL]
case right
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ toSubfield F⟮α⟯ ≤ RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f)
[PROOFSTEP]
refine' Subfield.closure_le.mpr (Set.union_subset (fun x hx => _) _)
[GOAL]
case right.refine'_1
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
x : E
hx : x ∈ Set.range ↑(algebraMap F E)
⊢ x ∈ ↑(RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f))
[PROOFSTEP]
obtain ⟨y, hy⟩ := hx
[GOAL]
case right.refine'_1.intro
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
x : E
y : F
hy : ↑(algebraMap F E) y = x
⊢ x ∈ ↑(RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f))
[PROOFSTEP]
refine' ⟨y, _⟩
[GOAL]
case right.refine'_1.intro
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
x : E
y : F
hy : ↑(algebraMap F E) y = x
⊢ ↑(RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f) (↑(AdjoinRoot.of (minpoly F α)) y) = x
[PROOFSTEP]
rw [RingHom.comp_apply, AdjoinRoot.lift_of (aeval_gen_minpoly F α)]
[GOAL]
case right.refine'_1.intro
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
x : E
y : F
hy : ↑(algebraMap F E) y = x
⊢ ↑(Subfield.subtype (toSubfield F⟮α⟯)) (↑(algebraMap F { x // x ∈ F⟮α⟯ }) y) = x
[PROOFSTEP]
exact hy
[GOAL]
case right.refine'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ {α} ⊆ ↑(RingHom.fieldRange (RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f))
[PROOFSTEP]
refine' Set.singleton_subset_iff.mpr ⟨AdjoinRoot.root (minpoly F α), _⟩
[GOAL]
case right.refine'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ ↑(RingHom.comp (Subfield.subtype (toSubfield F⟮α⟯)) f) (AdjoinRoot.root (minpoly F α)) = α
[PROOFSTEP]
rw [RingHom.comp_apply, AdjoinRoot.lift_root (aeval_gen_minpoly F α)]
[GOAL]
case right.refine'_2
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
f : AdjoinRoot (minpoly F α) →+* (fun x => { x // x ∈ F⟮α⟯ }) (minpoly F α) :=
  AdjoinRoot.lift (algebraMap F { x // x ∈ F⟮α⟯ }) (AdjoinSimple.gen F α)
    (_ : ↑(aeval (AdjoinSimple.gen F α)) (minpoly F α) = 0)
this : Fact (Irreducible (minpoly F α))
⊢ ↑(Subfield.subtype (toSubfield F⟮α⟯)) (AdjoinSimple.gen F α) = α
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝⁶ : Field F
E : Type u_2
inst✝⁵ : Field E
inst✝⁴ : Algebra F E
α : E
K : Type u_3
inst✝³ : Field K
inst✝² : Algebra F K
L : Type u_4
inst✝¹ : Field L
inst✝ : Algebra K L
x : L
hx : IsIntegral K x
i : Fin (natDegree (minpoly K x))
⊢ ↑(powerBasisAux hx) i = AdjoinSimple.gen K x ^ ↑i
[PROOFSTEP]
rw [powerBasisAux, Basis.map_apply, PowerBasis.basis_eq_pow, AlgEquiv.toLinearEquiv_apply, AlgEquiv.map_pow,
  AdjoinRoot.powerBasis_gen, adjoinRootEquivAdjoin_apply_root]
[GOAL]
F : Type u_1
inst✝⁶ : Field F
E : Type u_2
inst✝⁵ : Field E
inst✝⁴ : Algebra F E
α : E
K : Type u_3
inst✝³ : Field K
inst✝² : Algebra F K
L : Type u_4
inst✝¹ : Field L
inst✝ : Algebra K L
x : L
hx : IsIntegral K x
⊢ FiniteDimensional.finrank K { x_1 // x_1 ∈ K⟮x⟯ } = natDegree (minpoly K x)
[PROOFSTEP]
rw [PowerBasis.finrank (adjoin.powerBasis hx : _)]
[GOAL]
F : Type u_1
inst✝⁶ : Field F
E : Type u_2
inst✝⁵ : Field E
inst✝⁴ : Algebra F E
α : E
K : Type u_3
inst✝³ : Field K
inst✝² : Algebra F K
L : Type u_4
inst✝¹ : Field L
inst✝ : Algebra K L
x : L
hx : IsIntegral K x
⊢ (powerBasis hx).dim = natDegree (minpoly K x)
[PROOFSTEP]
rfl
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
x : K
⊢ x ∈ roots (Polynomial.map (algebraMap F K) (minpoly F (adjoin.powerBasis h).gen)) ↔
    ↑(Equiv.refl K) x ∈ roots (Polynomial.map (algebraMap F K) (minpoly F α))
[PROOFSTEP]
rw [adjoin.powerBasis_gen, minpoly_gen h, Equiv.refl_apply]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
h_sep : Separable (minpoly F α)
h_splits : Splits (algebraMap F K) (minpoly F α)
⊢ Fintype.card ({ x // x ∈ F⟮α⟯ } →ₐ[F] K) = natDegree (minpoly F α)
[PROOFSTEP]
rw [AlgHom.card_of_powerBasis]
[GOAL]
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
h_sep : Separable (minpoly F α)
h_splits : Splits (algebraMap F K) (minpoly F α)
⊢ (adjoin.powerBasis h).dim = natDegree (minpoly F α)
[PROOFSTEP]
simp only [adjoin.powerBasis_dim, adjoin.powerBasis_gen, minpoly_gen h, h_sep, h_splits]
[GOAL]
case h_sep
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
h_sep : Separable (minpoly F α)
h_splits : Splits (algebraMap F K) (minpoly F α)
⊢ Separable (minpoly F (adjoin.powerBasis h).gen)
[PROOFSTEP]
simp only [adjoin.powerBasis_dim, adjoin.powerBasis_gen, minpoly_gen h, h_sep, h_splits]
[GOAL]
case h_splits
F : Type u_1
inst✝⁴ : Field F
E : Type u_2
inst✝³ : Field E
inst✝² : Algebra F E
α : E
K : Type u_3
inst✝¹ : Field K
inst✝ : Algebra F K
h : IsIntegral F α
h_sep : Separable (minpoly F α)
h_splits : Splits (algebraMap F K) (minpoly F α)
⊢ Splits (algebraMap F K) (minpoly F (adjoin.powerBasis h).gen)
[PROOFSTEP]
simp only [adjoin.powerBasis_dim, adjoin.powerBasis_gen, minpoly_gen h, h_sep, h_splits]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ adjoin F ↑∅ = ⊥
[PROOFSTEP]
simp only [Finset.coe_empty, adjoin_empty]
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : IntermediateField F E
h : Subalgebra.FG S.toSubalgebra
⊢ FG S
[PROOFSTEP]
cases' h with t ht
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : IntermediateField F E
t : Finset E
ht : Algebra.adjoin F ↑t = S.toSubalgebra
⊢ FG S
[PROOFSTEP]
exact ⟨t, (eq_adjoin_of_eq_algebra_adjoin _ _ _ ht.symm).symm⟩
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Finset E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), x ∈ S → P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)
⊢ P (adjoin F ↑S)
[PROOFSTEP]
refine' Finset.induction_on' S _ (fun ha _ _ h => _)
[GOAL]
case refine'_1
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Finset E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), x ∈ S → P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)
⊢ P (adjoin F ↑∅)
[PROOFSTEP]
simp [base]
[GOAL]
case refine'_2
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Finset E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), x ∈ S → P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)
a✝ : E
s✝ : Finset E
ha : a✝ ∈ S
x✝¹ : s✝ ⊆ S
x✝ : ¬a✝ ∈ s✝
h : P (adjoin F ↑s✝)
⊢ P (adjoin F ↑(insert a✝ s✝))
[PROOFSTEP]
rw [Finset.coe_insert, Set.insert_eq, Set.union_comm, ← adjoin_adjoin_left]
[GOAL]
case refine'_2
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Finset E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), x ∈ S → P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)
a✝ : E
s✝ : Finset E
ha : a✝ ∈ S
x✝¹ : s✝ ⊆ S
x✝ : ¬a✝ ∈ s✝
h : P (adjoin F ↑s✝)
⊢ P (restrictScalars F { x // x ∈ adjoin F ↑s✝ }⟮a✝⟯)
[PROOFSTEP]
exact ih (adjoin F _) _ ha h
[GOAL]
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)
K : IntermediateField F E
hK : FG K
⊢ P K
[PROOFSTEP]
obtain ⟨S, rfl⟩ := hK
[GOAL]
case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
P : IntermediateField F E → Prop
base : P ⊥
ih : ∀ (K : IntermediateField F E) (x : E), P K → P (restrictScalars F { x // x ∈ K }⟮x⟯)
S : Finset E
⊢ P (adjoin F ↑S)
[PROOFSTEP]
exact induction_on_adjoin_finset S P base fun K x _ hK => ih K x hK
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
⊢ ∀ (a b : Lifts F E K), a ≤ b → b ≤ a → a = b
[PROOFSTEP]
rintro ⟨x1, x2⟩ ⟨y1, y2⟩ ⟨hxy1, hxy2⟩ ⟨hyx1, hyx2⟩
[GOAL]
case mk.mk.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x1 : IntermediateField F E
x2 : { x // x ∈ x1 } →ₐ[F] K
y1 : IntermediateField F E
y2 : { x // x ∈ y1 } →ₐ[F] K
hxy1 : { fst := x1, snd := x2 }.fst ≤ { fst := y1, snd := y2 }.fst
hxy2 :
  ∀ (s : { x // x ∈ { fst := x1, snd := x2 }.fst }) (t : { x // x ∈ { fst := y1, snd := y2 }.fst }),
    ↑s = ↑t → ↑{ fst := x1, snd := x2 }.snd s = ↑{ fst := y1, snd := y2 }.snd t
hyx1 : { fst := y1, snd := y2 }.fst ≤ { fst := x1, snd := x2 }.fst
hyx2 :
  ∀ (s : { x // x ∈ { fst := y1, snd := y2 }.fst }) (t : { x // x ∈ { fst := x1, snd := x2 }.fst }),
    ↑s = ↑t → ↑{ fst := y1, snd := y2 }.snd s = ↑{ fst := x1, snd := x2 }.snd t
⊢ { fst := x1, snd := x2 } = { fst := y1, snd := y2 }
[PROOFSTEP]
obtain rfl : x1 = y1 := le_antisymm hxy1 hyx1
[GOAL]
case mk.mk.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x1 : IntermediateField F E
x2 y2 : { x // x ∈ x1 } →ₐ[F] K
hxy1 : { fst := x1, snd := x2 }.fst ≤ { fst := x1, snd := y2 }.fst
hxy2 :
  ∀ (s : { x // x ∈ { fst := x1, snd := x2 }.fst }) (t : { x // x ∈ { fst := x1, snd := y2 }.fst }),
    ↑s = ↑t → ↑{ fst := x1, snd := x2 }.snd s = ↑{ fst := x1, snd := y2 }.snd t
hyx1 : { fst := x1, snd := y2 }.fst ≤ { fst := x1, snd := x2 }.fst
hyx2 :
  ∀ (s : { x // x ∈ { fst := x1, snd := y2 }.fst }) (t : { x // x ∈ { fst := x1, snd := x2 }.fst }),
    ↑s = ↑t → ↑{ fst := x1, snd := y2 }.snd s = ↑{ fst := x1, snd := x2 }.snd t
⊢ { fst := x1, snd := x2 } = { fst := x1, snd := y2 }
[PROOFSTEP]
congr
[GOAL]
case mk.mk.intro.intro.e_snd
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x1 : IntermediateField F E
x2 y2 : { x // x ∈ x1 } →ₐ[F] K
hxy1 : { fst := x1, snd := x2 }.fst ≤ { fst := x1, snd := y2 }.fst
hxy2 :
  ∀ (s : { x // x ∈ { fst := x1, snd := x2 }.fst }) (t : { x // x ∈ { fst := x1, snd := y2 }.fst }),
    ↑s = ↑t → ↑{ fst := x1, snd := x2 }.snd s = ↑{ fst := x1, snd := y2 }.snd t
hyx1 : { fst := x1, snd := y2 }.fst ≤ { fst := x1, snd := x2 }.fst
hyx2 :
  ∀ (s : { x // x ∈ { fst := x1, snd := y2 }.fst }) (t : { x // x ∈ { fst := x1, snd := x2 }.fst }),
    ↑s = ↑t → ↑{ fst := x1, snd := y2 }.snd s = ↑{ fst := x1, snd := x2 }.snd t
⊢ x2 = y2
[PROOFSTEP]
exact AlgHom.ext fun s => hxy2 s s rfl
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : { x // x ∈ ⊥.fst }
t : { x_1 // x_1 ∈ x.fst }
hst : ↑s = ↑t
⊢ ↑⊥.snd s = ↑x.snd t
[PROOFSTEP]
cases' IntermediateField.mem_bot.mp s.mem with u hu
[GOAL]
case intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : { x // x ∈ ⊥.fst }
t : { x_1 // x_1 ∈ x.fst }
hst : ↑s = ↑t
u : F
hu : ↑(algebraMap F E) u = ↑s
⊢ ↑⊥.snd s = ↑x.snd t
[PROOFSTEP]
rw [show s = (algebraMap F _) u from Subtype.ext hu.symm, AlgHom.commutes]
[GOAL]
case intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : { x // x ∈ ⊥.fst }
t : { x_1 // x_1 ∈ x.fst }
hst : ↑s = ↑t
u : F
hu : ↑(algebraMap F E) u = ↑s
⊢ ↑(algebraMap F K) u = ↑x.snd t
[PROOFSTEP]
rw [show t = (algebraMap F _) u from Subtype.ext (Eq.trans hu hst).symm, AlgHom.commutes]
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
x y : Lifts F E K
hc : IsChain (fun x x_1 => x ≤ x_1) c
hx : x ∈ insert ⊥ c
hy : y ∈ insert ⊥ c
⊢ ∃ z, z ∈ insert ⊥ c ∧ x ≤ z ∧ y ≤ z
[PROOFSTEP]
cases' (hc.insert fun _ _ _ => Or.inl bot_le).total hx hy with hxy hyx
[GOAL]
case inl
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
x y : Lifts F E K
hc : IsChain (fun x x_1 => x ≤ x_1) c
hx : x ∈ insert ⊥ c
hy : y ∈ insert ⊥ c
hxy : x ≤ y
⊢ ∃ z, z ∈ insert ⊥ c ∧ x ≤ z ∧ y ≤ z
[PROOFSTEP]
exact ⟨y, hy, hxy, le_refl y⟩
[GOAL]
case inr
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
x y : Lifts F E K
hc : IsChain (fun x x_1 => x ≤ x_1) c
hx : x ∈ insert ⊥ c
hy : y ∈ insert ⊥ c
hyx : y ≤ x
⊢ ∃ z, z ∈ insert ⊥ c ∧ x ≤ z ∧ y ≤ z
[PROOFSTEP]
exact ⟨x, hx, le_refl x, hyx⟩
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
x y z : Lifts F E K
hc : IsChain (fun x x_1 => x ≤ x_1) c
hx : x ∈ insert ⊥ c
hy : y ∈ insert ⊥ c
hz : z ∈ insert ⊥ c
⊢ ∃ w, w ∈ insert ⊥ c ∧ x ≤ w ∧ y ≤ w ∧ z ≤ w
[PROOFSTEP]
obtain ⟨v, hv, hxv, hyv⟩ := Lifts.exists_max_two hc hx hy
[GOAL]
case intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
x y z : Lifts F E K
hc : IsChain (fun x x_1 => x ≤ x_1) c
hx : x ∈ insert ⊥ c
hy : y ∈ insert ⊥ c
hz : z ∈ insert ⊥ c
v : Lifts F E K
hv : v ∈ insert ⊥ c
hxv : x ≤ v
hyv : y ≤ v
⊢ ∃ w, w ∈ insert ⊥ c ∧ x ≤ w ∧ y ≤ w ∧ z ≤ w
[PROOFSTEP]
obtain ⟨w, hw, hzw, hvw⟩ := Lifts.exists_max_two hc hz hv
[GOAL]
case intro.intro.intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
x y z : Lifts F E K
hc : IsChain (fun x x_1 => x ≤ x_1) c
hx : x ∈ insert ⊥ c
hy : y ∈ insert ⊥ c
hz : z ∈ insert ⊥ c
v : Lifts F E K
hv : v ∈ insert ⊥ c
hxv : x ≤ v
hyv : y ≤ v
w : Lifts F E K
hw : w ∈ insert ⊥ c
hzw : z ≤ w
hvw : v ≤ w
⊢ ∃ w, w ∈ insert ⊥ c ∧ x ≤ w ∧ y ≤ w ∧ z ≤ w
[PROOFSTEP]
exact ⟨w, hw, le_trans hxv hvw, le_trans hyv hvw, hzw⟩
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
⊢ ∀ {a b : E},
    (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
      (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) → a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst
[PROOFSTEP]
rintro _ _ ⟨x, hx, ha⟩ ⟨y, hy, hb⟩
[GOAL]
case intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
a✝ b✝ : E
x : Lifts F E K
hx : x ∈ insert ⊥ c
ha : a✝ ∈ x.fst
y : Lifts F E K
hy : y ∈ insert ⊥ c
hb : b✝ ∈ y.fst
⊢ a✝ * b✝ ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst
[PROOFSTEP]
obtain ⟨z, hz, hxz, hyz⟩ := Lifts.exists_max_two hc hx hy
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
a✝ b✝ : E
x : Lifts F E K
hx : x ∈ insert ⊥ c
ha : a✝ ∈ x.fst
y : Lifts F E K
hy : y ∈ insert ⊥ c
hb : b✝ ∈ y.fst
z : Lifts F E K
hz : z ∈ insert ⊥ c
hxz : x ≤ z
hyz : y ≤ z
⊢ a✝ * b✝ ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst
[PROOFSTEP]
exact ⟨z, hz, z.1.mul_mem (hxz.1 ha) (hyz.1 hb)⟩
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
⊢ ∀ {a b : E},
    a ∈
        {
              toSubsemigroup :=
                { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                  mul_mem' :=
                    (_ :
                      ∀ {a b : E},
                        (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                          (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                            a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
              one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
      b ∈
          {
                toSubsemigroup :=
                  { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                    mul_mem' :=
                      (_ :
                        ∀ {a b : E},
                          (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                            (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                              a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
        a + b ∈
          {
                toSubsemigroup :=
                  { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                    mul_mem' :=
                      (_ :
                        ∀ {a b : E},
                          (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                            (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                              a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier
[PROOFSTEP]
rintro _ _ ⟨x, hx, ha⟩ ⟨y, hy, hb⟩
[GOAL]
case intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
a✝ b✝ : E
x : Lifts F E K
hx : x ∈ insert ⊥ c
ha : a✝ ∈ x.fst
y : Lifts F E K
hy : y ∈ insert ⊥ c
hb : b✝ ∈ y.fst
⊢ a✝ + b✝ ∈
    {
          toSubsemigroup :=
            { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
              mul_mem' :=
                (_ :
                  ∀ {a b : E},
                    (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                      (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                        a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
          one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier
[PROOFSTEP]
obtain ⟨z, hz, hxz, hyz⟩ := Lifts.exists_max_two hc hx hy
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
a✝ b✝ : E
x : Lifts F E K
hx : x ∈ insert ⊥ c
ha : a✝ ∈ x.fst
y : Lifts F E K
hy : y ∈ insert ⊥ c
hb : b✝ ∈ y.fst
z : Lifts F E K
hz : z ∈ insert ⊥ c
hxz : x ≤ z
hyz : y ≤ z
⊢ a✝ + b✝ ∈
    {
          toSubsemigroup :=
            { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
              mul_mem' :=
                (_ :
                  ∀ {a b : E},
                    (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                      (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                        a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
          one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier
[PROOFSTEP]
exact ⟨z, hz, z.1.add_mem (hxz.1 ha) (hyz.1 hb)⟩
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
⊢ ∀ (x : E),
    x ∈
        {
                  toSubsemiring :=
                    {
                      toSubmonoid :=
                        {
                          toSubsemigroup :=
                            { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                              mul_mem' :=
                                (_ :
                                  ∀ {a b : E},
                                    (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                      (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                        a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                          one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) },
                      add_mem' :=
                        (_ :
                          ∀ {a b : E},
                            a ∈
                                {
                                      toSubsemigroup :=
                                        { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                          mul_mem' :=
                                            (_ :
                                              ∀ {a b : E},
                                                (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                  (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                    a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                      one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
                              b ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {a b : E},
                                                  (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                    (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                      a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                        one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
                                a + b ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {a b : E},
                                                  (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                    (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                      a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                        one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier),
                      zero_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 0 ∈ x.fst) },
                  algebraMap_mem' :=
                    (_ :
                      ∀ (s : F),
                        ∃ x,
                          x ∈ insert ⊥ c ∧
                            ↑(algebraMap F E) s ∈ x.fst) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      x⁻¹ ∈
        {
                  toSubsemiring :=
                    {
                      toSubmonoid :=
                        {
                          toSubsemigroup :=
                            { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                              mul_mem' :=
                                (_ :
                                  ∀ {a b : E},
                                    (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                      (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                        a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                          one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) },
                      add_mem' :=
                        (_ :
                          ∀ {a b : E},
                            a ∈
                                {
                                      toSubsemigroup :=
                                        { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                          mul_mem' :=
                                            (_ :
                                              ∀ {a b : E},
                                                (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                  (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                    a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                      one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
                              b ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {a b : E},
                                                  (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                    (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                      a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                        one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
                                a + b ∈
                                  {
                                        toSubsemigroup :=
                                          { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                            mul_mem' :=
                                              (_ :
                                                ∀ {a b : E},
                                                  (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                    (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                      a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                        one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier),
                      zero_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 0 ∈ x.fst) },
                  algebraMap_mem' :=
                    (_ :
                      ∀ (s : F),
                        ∃ x,
                          x ∈ insert ⊥ c ∧
                            ↑(algebraMap F E) s ∈ x.fst) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rintro _ ⟨x, y, h⟩
[GOAL]
case intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x✝ : E
x : Lifts F E K
y : x ∈ insert ⊥ c
h : x✝ ∈ x.fst
⊢ x✝⁻¹ ∈
    {
              toSubsemiring :=
                {
                  toSubmonoid :=
                    {
                      toSubsemigroup :=
                        { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                          mul_mem' :=
                            (_ :
                              ∀ {a b : E},
                                (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                  (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                    a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                      one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) },
                  add_mem' :=
                    (_ :
                      ∀ {a b : E},
                        a ∈
                            {
                                  toSubsemigroup :=
                                    { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                      mul_mem' :=
                                        (_ :
                                          ∀ {a b : E},
                                            (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                              (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                  one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
                          b ∈
                              {
                                    toSubsemigroup :=
                                      { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                        mul_mem' :=
                                          (_ :
                                            ∀ {a b : E},
                                              (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                  a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                    one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier →
                            a + b ∈
                              {
                                    toSubsemigroup :=
                                      { carrier := fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst,
                                        mul_mem' :=
                                          (_ :
                                            ∀ {a b : E},
                                              (a ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                (b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) →
                                                  a * b ∈ fun s => ∃ x, x ∈ insert ⊥ c ∧ s ∈ x.fst) },
                                    one_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 1 ∈ x.fst) }.toSubsemigroup.carrier),
                  zero_mem' := (_ : ∃ x, x ∈ insert ⊥ c ∧ 0 ∈ x.fst) },
              algebraMap_mem' :=
                (_ :
                  ∀ (s : F),
                    ∃ x,
                      x ∈ insert ⊥ c ∧ ↑(algebraMap F E) s ∈ x.fst) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
exact ⟨x, ⟨y, x.1.inv_mem h⟩⟩
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
s t : { x // x ∈ upperBoundIntermediateField hc }
⊢ OneHom.toFun
      {
        toFun := fun s =>
          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
            { val := ↑s, property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
      (s * t) =
    OneHom.toFun
        {
          toFun := fun s =>
            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
              { val := ↑s, property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
        s *
      OneHom.toFun
        {
          toFun := fun s =>
            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
              { val := ↑s, property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
        t
[PROOFSTEP]
obtain ⟨w, _, hxw, hyw, hzw⟩ :=
  Lifts.exists_max_three hc (Classical.choose_spec s.mem).1 (Classical.choose_spec t.mem).1
    (Classical.choose_spec (s * t).mem).1
[GOAL]
case intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
s t : { x // x ∈ upperBoundIntermediateField hc }
w : Lifts F E K
left✝ : w ∈ insert ⊥ c
hxw : Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc)) ≤ w
hyw : Classical.choose (_ : ↑t ∈ ↑(upperBoundIntermediateField hc)) ≤ w
hzw : Classical.choose (_ : ↑(s * t) ∈ ↑(upperBoundIntermediateField hc)) ≤ w
⊢ OneHom.toFun
      {
        toFun := fun s =>
          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
            { val := ↑s, property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
      (s * t) =
    OneHom.toFun
        {
          toFun := fun s =>
            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
              { val := ↑s, property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
        s *
      OneHom.toFun
        {
          toFun := fun s =>
            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
              { val := ↑s, property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
        t
[PROOFSTEP]
simp only [Submonoid.coe_mul, Subsemiring.coe_toSubmonoid, Subalgebra.coe_toSubsemiring, coe_toSubalgebra,
  Lifts.eq_of_le hzw, Lifts.eq_of_le hxw, Lifts.eq_of_le hyw, ← w.2.map_mul, Submonoid.mk_mul_mk]
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
s t : { x // x ∈ upperBoundIntermediateField hc }
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            {
              toFun := fun s =>
                ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                  { val := ↑s,
                    property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
              map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (s t : { x // x ∈ upperBoundIntermediateField hc }),
                OneHom.toFun
                    {
                      toFun := fun s =>
                        ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                          { val := ↑s,
                            property :=
                              (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                      map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                    (s * t) =
                  OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      s *
                    OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      t) })
      (s + t) =
    OneHom.toFun
        (↑{
            toOneHom :=
              {
                toFun := fun s =>
                  ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                    { val := ↑s,
                      property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (s t : { x // x ∈ upperBoundIntermediateField hc }),
                  OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      (s * t) =
                    OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        s *
                      OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        t) })
        s +
      OneHom.toFun
        (↑{
            toOneHom :=
              {
                toFun := fun s =>
                  ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                    { val := ↑s,
                      property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (s t : { x // x ∈ upperBoundIntermediateField hc }),
                  OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      (s * t) =
                    OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        s *
                      OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        t) })
        t
[PROOFSTEP]
obtain ⟨w, _, hxw, hyw, hzw⟩ :=
  Lifts.exists_max_three hc (Classical.choose_spec s.mem).1 (Classical.choose_spec t.mem).1
    (Classical.choose_spec (s + t).mem).1
[GOAL]
case intro.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
s t : { x // x ∈ upperBoundIntermediateField hc }
w : Lifts F E K
left✝ : w ∈ insert ⊥ c
hxw : Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc)) ≤ w
hyw : Classical.choose (_ : ↑t ∈ ↑(upperBoundIntermediateField hc)) ≤ w
hzw : Classical.choose (_ : ↑(s + t) ∈ ↑(upperBoundIntermediateField hc)) ≤ w
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            {
              toFun := fun s =>
                ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                  { val := ↑s,
                    property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
              map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (s t : { x // x ∈ upperBoundIntermediateField hc }),
                OneHom.toFun
                    {
                      toFun := fun s =>
                        ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                          { val := ↑s,
                            property :=
                              (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                      map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                    (s * t) =
                  OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      s *
                    OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      t) })
      (s + t) =
    OneHom.toFun
        (↑{
            toOneHom :=
              {
                toFun := fun s =>
                  ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                    { val := ↑s,
                      property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (s t : { x // x ∈ upperBoundIntermediateField hc }),
                  OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      (s * t) =
                    OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        s *
                      OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        t) })
        s +
      OneHom.toFun
        (↑{
            toOneHom :=
              {
                toFun := fun s =>
                  ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                    { val := ↑s,
                      property := (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (s t : { x // x ∈ upperBoundIntermediateField hc }),
                  OneHom.toFun
                      {
                        toFun := fun s =>
                          ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                            { val := ↑s,
                              property :=
                                (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                        map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                      (s * t) =
                    OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        s *
                      OneHom.toFun
                        {
                          toFun := fun s =>
                            ↑(Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).snd
                              { val := ↑s,
                                property :=
                                  (_ : ↑s ∈ (Classical.choose (_ : ↑s ∈ ↑(upperBoundIntermediateField hc))).fst) },
                          map_one' := (_ : ↑(Classical.choose (_ : ↑1 ∈ ↑(upperBoundIntermediateField hc))).snd 1 = 1) }
                        t) })
        t
[PROOFSTEP]
simp only [Subsemiring.coe_add, Subalgebra.coe_toSubsemiring, coe_toSubalgebra, Lifts.eq_of_le hzw, Lifts.eq_of_le hxw,
  Lifts.eq_of_le hyw, ← w.2.map_add, AddMemClass.mk_add_mk]
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
⊢ ∀ (a : Lifts F E K), a ∈ c → a ≤ upperBound hc
[PROOFSTEP]
intro x hx
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
⊢ x ≤ upperBound hc
[PROOFSTEP]
constructor
[GOAL]
case left
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
⊢ x.fst ≤ (upperBound hc).fst
[PROOFSTEP]
exact fun s hs => ⟨x, Set.mem_insert_of_mem ⊥ hx, hs⟩
[GOAL]
case right
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
⊢ ∀ (s : { x_1 // x_1 ∈ x.fst }) (t : { x // x ∈ (upperBound hc).fst }), ↑s = ↑t → ↑x.snd s = ↑(upperBound hc).snd t
[PROOFSTEP]
intro s t hst
[GOAL]
case right
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
s : { x_1 // x_1 ∈ x.fst }
t : { x // x ∈ (upperBound hc).fst }
hst : ↑s = ↑t
⊢ ↑x.snd s = ↑(upperBound hc).snd t
[PROOFSTEP]
change x.2 s = (Classical.choose t.mem).2 ⟨t, (Classical.choose_spec t.mem).2⟩
[GOAL]
case right
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
s : { x_1 // x_1 ∈ x.fst }
t : { x // x ∈ (upperBound hc).fst }
hst : ↑s = ↑t
⊢ ↑x.snd s =
    ↑(Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst)).snd
      { val := ↑t, property := (_ : ↑t ∈ (Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst)).fst) }
[PROOFSTEP]
obtain ⟨z, _, hxz, hyz⟩ := Lifts.exists_max_two hc (Set.mem_insert_of_mem ⊥ hx) (Classical.choose_spec t.mem).1
[GOAL]
case right.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
s : { x_1 // x_1 ∈ x.fst }
t : { x // x ∈ (upperBound hc).fst }
hst : ↑s = ↑t
z : Lifts F E K
left✝ : z ∈ insert ⊥ c
hxz : x ≤ z
hyz : Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst) ≤ z
⊢ ↑x.snd s =
    ↑(Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst)).snd
      { val := ↑t, property := (_ : ↑t ∈ (Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst)).fst) }
[PROOFSTEP]
rw [Lifts.eq_of_le hxz, Lifts.eq_of_le hyz]
[GOAL]
case right.intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
c : Set (Lifts F E K)
hc : IsChain (fun x x_1 => x ≤ x_1) c
x : Lifts F E K
hx : x ∈ c
s : { x_1 // x_1 ∈ x.fst }
t : { x // x ∈ (upperBound hc).fst }
hst : ↑s = ↑t
z : Lifts F E K
left✝ : z ∈ insert ⊥ c
hxz : x ≤ z
hyz : Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst) ≤ z
⊢ ↑z.snd { val := ↑s, property := (_ : ↑s ∈ z.fst) } =
    ↑z.snd
      { val := ↑{ val := ↑t, property := (_ : ↑t ∈ (Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst)).fst) },
        property :=
          (_ : ↑{ val := ↑t, property := (_ : ↑t ∈ (Classical.choose (_ : ↑t ∈ ↑(upperBound hc).fst)).fst) } ∈ z.fst) }
[PROOFSTEP]
exact congr_arg z.2 (Subtype.ext hst)
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
h3 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
⊢ Splits (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst })) (minpoly F s)
[PROOFSTEP]
convert h2
[GOAL]
case h.e'_5
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
h3 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
⊢ RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }) = algebraMap F K
[PROOFSTEP]
exact RingHom.ext fun y => x.2.commutes y
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
h3 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
alg : Algebra { y // y ∈ x.fst } { y // y ∈ restrictScalars F { z // z ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { z // z ∈ x.fst }⟮s⟯.toSubalgebra
⊢ rootOfSplits (↑x.snd) key (_ : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0) ∈
    roots (Polynomial.map (algebraMap { x_1 // x_1 ∈ x.fst } K) (minpoly { x_1 // x_1 ∈ x.fst } s))
[PROOFSTEP]
rw [mem_roots (map_ne_zero (minpoly.ne_zero h3)), IsRoot, ← eval₂_eq_eval_map]
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
h3 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
alg : Algebra { y // y ∈ x.fst } { y // y ∈ restrictScalars F { z // z ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { z // z ∈ x.fst }⟮s⟯.toSubalgebra
⊢ eval₂ (algebraMap { x_1 // x_1 ∈ x.fst } K)
      (rootOfSplits (↑x.snd) key (_ : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0))
      (minpoly { x_1 // x_1 ∈ x.fst } s) =
    0
[PROOFSTEP]
exact map_rootOfSplits x.2.toRingHom key (ne_of_gt (minpoly.degree_pos h3))
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
⊢ ↑(liftOfSplits x h1 h2).snd u = ↑x.snd t
[PROOFSTEP]
let alg : Algebra x.1 x.1⟮s⟯ := x.1⟮s⟯.toSubalgebra.algebra
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
⊢ ↑(liftOfSplits x h1 h2).snd u = ↑x.snd t
[PROOFSTEP]
rw [← show algebraMap x.1 x.1⟮s⟯ t = u from Subtype.ext htu]
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
letI : Algebra x.1 K := x.2.toRingHom.toAlgebra
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
let I1 : IsIntegral x.1 s := isIntegral_of_isScalarTower h1
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
let key : (minpoly x.1 s).Splits x.2.toRingHom :=
  splits_of_splits_of_dvd _ (map_ne_zero (minpoly.ne_zero h1))
    ((splits_map_iff _ _).mpr (by convert h2; exact RingHom.ext fun y => x.2.commutes y))
    (minpoly.dvd_map_of_isScalarTower _ _ _)
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
⊢ Splits (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst })) (minpoly F s)
[PROOFSTEP]
convert h2
[GOAL]
case h.e'_5
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
⊢ RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }) = algebraMap F K
[PROOFSTEP]
exact RingHom.ext fun y => x.2.commutes y
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
have I2 := (ne_of_gt (minpoly.degree_pos I1))
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
I2 : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
have I3 :
  rootOfSplits (AlgHom.toRingHom x.2) key (ne_of_gt (minpoly.degree_pos I1)) ∈
    (Polynomial.map (algebraMap x.1 K) (minpoly x.1 s)).roots :=
  by
  rw [mem_roots (map_ne_zero (minpoly.ne_zero I1)), IsRoot, ← eval₂_eq_eval_map]
  exact map_rootOfSplits x.2.toRingHom key (ne_of_gt (minpoly.degree_pos I1))
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
I2 : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0
⊢ rootOfSplits (↑x.snd) key (_ : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0) ∈
    roots (Polynomial.map (algebraMap { x_1 // x_1 ∈ x.fst } K) (minpoly { x_1 // x_1 ∈ x.fst } s))
[PROOFSTEP]
rw [mem_roots (map_ne_zero (minpoly.ne_zero I1)), IsRoot, ← eval₂_eq_eval_map]
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
I2 : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0
⊢ eval₂ (algebraMap { x_1 // x_1 ∈ x.fst } K)
      (rootOfSplits (↑x.snd) key (_ : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0))
      (minpoly { x_1 // x_1 ∈ x.fst } s) =
    0
[PROOFSTEP]
exact map_rootOfSplits x.2.toRingHom key (ne_of_gt (minpoly.degree_pos I1))
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
I2 : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0
I3 :
  rootOfSplits (↑x.snd) key (_ : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0) ∈
    roots (Polynomial.map (algebraMap { x_1 // x_1 ∈ x.fst } K) (minpoly { x_1 // x_1 ∈ x.fst } s))
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
let φ : x.1⟮s⟯ →ₐ[x.1] K := ((algHomAdjoinIntegralEquiv x.1 I1).invFun ⟨rootOfSplits (AlgHom.toRingHom x.2) key I2, I3⟩)
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
x : Lifts F E K
s : E
h1 : IsIntegral F s
h2 : Splits (algebraMap F K) (minpoly F s)
t : { x_1 // x_1 ∈ x.fst }
u : { x_1 // x_1 ∈ (liftOfSplits x h1 h2).fst }
htu : ↑t = ↑u
alg : Algebra { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } :=
  Subalgebra.algebra { x_1 // x_1 ∈ x.fst }⟮s⟯.toSubalgebra
this : Algebra { x_1 // x_1 ∈ x.fst } K := RingHom.toAlgebra ↑x.snd
I1 : IsIntegral { x_1 // x_1 ∈ x.fst } s := isIntegral_of_isScalarTower h1
key : Splits (↑x.snd) (minpoly { x_1 // x_1 ∈ x.fst } s) :=
  splits_of_splits_of_dvd (↑x.snd) (Polynomial.map_ne_zero (minpoly.ne_zero h1))
    (Iff.mpr (splits_map_iff (algebraMap F { x_1 // x_1 ∈ x.fst }) ↑x.snd)
      (Eq.mpr
        (eq_of_heq
          ((fun K L inst inst_1 i i' e'_5 f =>
              Eq.casesOn (motive := fun a x => i' = a → HEq e'_5 x → HEq (Splits i f) (Splits i' f)) e'_5
                (fun h =>
                  Eq.ndrec (motive := fun i' => ∀ (e_5 : i = i'), HEq e_5 (Eq.refl i) → HEq (Splits i f) (Splits i' f))
                    (fun e_5 h => Eq.symm (eq_of_heq h) ▸ HEq.refl (Splits i f)) (Eq.symm h) e'_5)
                (Eq.refl i') (HEq.refl e'_5))
            F K EuclideanDomain.toCommRing inst✝² (RingHom.comp (↑x.snd) (algebraMap F { x_1 // x_1 ∈ x.fst }))
            (algebraMap F K) (RingHom.ext fun y => AlgHom.commutes x.snd y) (minpoly F s)))
        (id h2)))
    (minpoly.dvd_map_of_isScalarTower F { x_1 // x_1 ∈ x.fst } s)
I2 : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0
I3 :
  rootOfSplits (↑x.snd) key (_ : degree (minpoly { x_1 // x_1 ∈ x.fst } s) ≠ 0) ∈
    roots (Polynomial.map (algebraMap { x_1 // x_1 ∈ x.fst } K) (minpoly { x_1 // x_1 ∈ x.fst } s))
φ : { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ } →ₐ[{ x_1 // x_1 ∈ x.fst }] K :=
  Equiv.invFun (algHomAdjoinIntegralEquiv { x_1 // x_1 ∈ x.fst } I1)
    { val := rootOfSplits (↑x.snd) key I2, property := I3 }
⊢ ↑(liftOfSplits x h1 h2).snd (↑(algebraMap { x_1 // x_1 ∈ x.fst } { x_1 // x_1 ∈ { x_2 // x_2 ∈ x.fst }⟮s⟯ }) t) =
    ↑x.snd t
[PROOFSTEP]
exact AlgHom.commutes φ t
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hK : ∀ (s : E), s ∈ S → IsIntegral F s ∧ Splits (algebraMap F K) (minpoly F s)
⊢ Nonempty ({ x // x ∈ adjoin F S } →ₐ[F] K)
[PROOFSTEP]
obtain ⟨x, hx⟩ : ∃ m : Lifts F E K, ∀ a, m ≤ a → a = m := zorn_partialOrder Lifts.exists_upper_bound
[GOAL]
case intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hK : ∀ (s : E), s ∈ S → IsIntegral F s ∧ Splits (algebraMap F K) (minpoly F s)
x : Lifts F E K
hx : ∀ (a : Lifts F E K), x ≤ a → a = x
⊢ Nonempty ({ x // x ∈ adjoin F S } →ₐ[F] K)
[PROOFSTEP]
refine'
  ⟨{  toFun := (fun s => x.2 ⟨s, adjoin_le_iff.mpr (fun s hs => _) s.mem⟩)
      map_one' := x.2.map_one
      map_mul' := (fun s t => x.2.map_mul ⟨s, _⟩ ⟨t, _⟩)
      map_zero' := x.2.map_zero
      map_add' := (fun s t => x.2.map_add ⟨s, _⟩ ⟨t, _⟩)
      commutes' := x.2.commutes }⟩
[GOAL]
case intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hK : ∀ (s : E), s ∈ S → IsIntegral F s ∧ Splits (algebraMap F K) (minpoly F s)
x : Lifts F E K
hx : ∀ (a : Lifts F E K), x ≤ a → a = x
s✝ : { x // x ∈ adjoin F S }
s : E
hs : s ∈ S
⊢ s ∈ ↑x.fst
[PROOFSTEP]
rcases x.exists_lift_of_splits (hK s hs).1 (hK s hs).2 with ⟨y, h1, h2⟩
[GOAL]
case intro.intro.intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hK : ∀ (s : E), s ∈ S → IsIntegral F s ∧ Splits (algebraMap F K) (minpoly F s)
x : Lifts F E K
hx : ∀ (a : Lifts F E K), x ≤ a → a = x
s✝ : { x // x ∈ adjoin F S }
s : E
hs : s ∈ S
y : Lifts F E K
h1 : x ≤ y
h2 : s ∈ y.fst
⊢ s ∈ ↑x.fst
[PROOFSTEP]
rwa [hx y h1] at h2 
[GOAL]
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hS : adjoin F S = ⊤
hK : ∀ (x : E), x ∈ S → IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)
⊢ Nonempty (E →ₐ[F] K)
[PROOFSTEP]
cases' algHom_mk_adjoin_splits hK with ϕ
[GOAL]
case intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hS : adjoin F S = ⊤
hK : ∀ (x : E), x ∈ S → IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)
ϕ : { x // x ∈ adjoin F S } →ₐ[F] K
⊢ Nonempty (E →ₐ[F] K)
[PROOFSTEP]
rw [hS] at ϕ 
[GOAL]
case intro
F : Type u_1
E : Type u_2
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hS : adjoin F S = ⊤
hK : ∀ (x : E), x ∈ S → IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)
ϕ : { x // x ∈ ⊤ } →ₐ[F] K
⊢ Nonempty (E →ₐ[F] K)
[PROOFSTEP]
exact ⟨ϕ.comp topEquiv.symm.toAlgHom⟩
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
⊢ (E1 ⊔ E2).toSubalgebra = E1.toSubalgebra ⊔ E2.toSubalgebra
[PROOFSTEP]
let S1 := E1.toSubalgebra
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
⊢ (E1 ⊔ E2).toSubalgebra = E1.toSubalgebra ⊔ E2.toSubalgebra
[PROOFSTEP]
let S2 := E2.toSubalgebra
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
⊢ (E1 ⊔ E2).toSubalgebra = E1.toSubalgebra ⊔ E2.toSubalgebra
[PROOFSTEP]
refine'
  le_antisymm
    (show _ ≤ (S1 ⊔ S2).toIntermediateField _ from
      sup_le (show S1 ≤ _ from le_sup_left) (show S2 ≤ _ from le_sup_right))
    (le_sup_toSubalgebra E1 E2)
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
⊢ ∀ (x : L), x ∈ S1 ⊔ S2 → x⁻¹ ∈ S1 ⊔ S2
[PROOFSTEP]
suffices IsField (S1 ⊔ S2 : Subalgebra K L) by
  intro x hx
  by_cases hx' : (⟨x, hx⟩ : (S1 ⊔ S2 : Subalgebra K L)) = 0
  · rw [← Subtype.coe_mk x, hx', Subalgebra.coe_zero, inv_zero]
    exact (S1 ⊔ S2).zero_mem
  · obtain ⟨y, h⟩ := this.mul_inv_cancel hx'
    exact (congr_arg (· ∈ S1 ⊔ S2) <| eq_inv_of_mul_eq_one_right <| Subtype.ext_iff.mp h).mp y.2
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
this : IsField { x // x ∈ S1 ⊔ S2 }
⊢ ∀ (x : L), x ∈ S1 ⊔ S2 → x⁻¹ ∈ S1 ⊔ S2
[PROOFSTEP]
intro x hx
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
this : IsField { x // x ∈ S1 ⊔ S2 }
x : L
hx : x ∈ S1 ⊔ S2
⊢ x⁻¹ ∈ S1 ⊔ S2
[PROOFSTEP]
by_cases hx' : (⟨x, hx⟩ : (S1 ⊔ S2 : Subalgebra K L)) = 0
[GOAL]
case pos
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
this : IsField { x // x ∈ S1 ⊔ S2 }
x : L
hx : x ∈ S1 ⊔ S2
hx' : { val := x, property := hx } = 0
⊢ x⁻¹ ∈ S1 ⊔ S2
[PROOFSTEP]
rw [← Subtype.coe_mk x, hx', Subalgebra.coe_zero, inv_zero]
[GOAL]
case pos
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
this : IsField { x // x ∈ S1 ⊔ S2 }
x : L
hx : x ∈ S1 ⊔ S2
hx' : { val := x, property := hx } = 0
⊢ 0 ∈ S1 ⊔ S2
[PROOFSTEP]
exact (S1 ⊔ S2).zero_mem
[GOAL]
case neg
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
this : IsField { x // x ∈ S1 ⊔ S2 }
x : L
hx : x ∈ S1 ⊔ S2
hx' : ¬{ val := x, property := hx } = 0
⊢ x⁻¹ ∈ S1 ⊔ S2
[PROOFSTEP]
obtain ⟨y, h⟩ := this.mul_inv_cancel hx'
[GOAL]
case neg.intro
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
this : IsField { x // x ∈ S1 ⊔ S2 }
x : L
hx : x ∈ S1 ⊔ S2
hx' : ¬{ val := x, property := hx } = 0
y : { x // x ∈ S1 ⊔ S2 }
h : { val := x, property := hx } * y = 1
⊢ x⁻¹ ∈ S1 ⊔ S2
[PROOFSTEP]
exact (congr_arg (· ∈ S1 ⊔ S2) <| eq_inv_of_mul_eq_one_right <| Subtype.ext_iff.mp h).mp y.2
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
S1 : Subalgebra K L := E1.toSubalgebra
S2 : Subalgebra K L := E2.toSubalgebra
⊢ IsField { x // x ∈ S1 ⊔ S2 }
[PROOFSTEP]
exact
  isField_of_isIntegral_of_isField'
    (isIntegral_sup.mpr ⟨Algebra.isIntegral_of_finite K E1, Algebra.isIntegral_of_finite K E2⟩) (Field.toIsField K)
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
⊢ FiniteDimensional K { x // x ∈ E1 ⊔ E2 }
[PROOFSTEP]
let g := Algebra.TensorProduct.productMap E1.val E2.val
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
g : TensorProduct K { x // x ∈ E1 } { x // x ∈ E2 } →ₐ[K] L := Algebra.TensorProduct.productMap (val E1) (val E2)
⊢ FiniteDimensional K { x // x ∈ E1 ⊔ E2 }
[PROOFSTEP]
suffices g.range = (E1 ⊔ E2).toSubalgebra
  by
  have h : FiniteDimensional K (Subalgebra.toSubmodule g.range) := g.toLinearMap.finiteDimensional_range
  rwa [this] at h 
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
g : TensorProduct K { x // x ∈ E1 } { x // x ∈ E2 } →ₐ[K] L := Algebra.TensorProduct.productMap (val E1) (val E2)
this : AlgHom.range g = (E1 ⊔ E2).toSubalgebra
⊢ FiniteDimensional K { x // x ∈ E1 ⊔ E2 }
[PROOFSTEP]
have h : FiniteDimensional K (Subalgebra.toSubmodule g.range) := g.toLinearMap.finiteDimensional_range
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
g : TensorProduct K { x // x ∈ E1 } { x // x ∈ E2 } →ₐ[K] L := Algebra.TensorProduct.productMap (val E1) (val E2)
this : AlgHom.range g = (E1 ⊔ E2).toSubalgebra
h : FiniteDimensional K { x // x ∈ ↑Subalgebra.toSubmodule (AlgHom.range g) }
⊢ FiniteDimensional K { x // x ∈ E1 ⊔ E2 }
[PROOFSTEP]
rwa [this] at h 
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
h1 : FiniteDimensional K { x // x ∈ E1 }
h2 : FiniteDimensional K { x // x ∈ E2 }
g : TensorProduct K { x // x ∈ E1 } { x // x ∈ E2 } →ₐ[K] L := Algebra.TensorProduct.productMap (val E1) (val E2)
⊢ AlgHom.range g = (E1 ⊔ E2).toSubalgebra
[PROOFSTEP]
rw [Algebra.TensorProduct.productMap_range, E1.range_val, E2.range_val, sup_toSubalgebra]
[GOAL]
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι), t i }
[PROOFSTEP]
rw [← iSup_univ]
[GOAL]
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (x : ι) (_ : x ∈ Set.univ), t x }
[PROOFSTEP]
let P : Set ι → Prop := fun s => FiniteDimensional K (⨆ i ∈ s, t i : IntermediateField K L)
[GOAL]
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (x : ι) (_ : x ∈ Set.univ), t x }
[PROOFSTEP]
change P Set.univ
[GOAL]
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ P Set.univ
[PROOFSTEP]
apply Set.Finite.induction_on
[GOAL]
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ Set.Finite Set.univ
case H0
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ P ∅
case H1
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ ∀ {a : ι} {s : Set ι}, ¬a ∈ s → Set.Finite s → P s → P (insert a s)
[PROOFSTEP]
all_goals dsimp only
[GOAL]
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ Set.Finite Set.univ
[PROOFSTEP]
dsimp only
[GOAL]
case H0
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ P ∅
[PROOFSTEP]
dsimp only
[GOAL]
case H1
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ ∀ {a : ι} {s : Set ι}, ¬a ∈ s → Set.Finite s → P s → P (insert a s)
[PROOFSTEP]
dsimp only
[GOAL]
case h
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ Set.Finite Set.univ
[PROOFSTEP]
exact Set.finite_univ
[GOAL]
case H0
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ ∅), t i }
[PROOFSTEP]
rw [iSup_emptyset]
[GOAL]
case H0
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ FiniteDimensional K { x // x ∈ ⊥ }
[PROOFSTEP]
exact (botEquiv K L).symm.toLinearEquiv.finiteDimensional
[GOAL]
case H1
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ ∀ {a : ι} {s : Set ι},
    ¬a ∈ s →
      Set.Finite s →
        FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i } →
          FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ insert a s), t i }
[PROOFSTEP]
intro _ s _ _ hs
[GOAL]
case H1
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
a✝² : ι
s : Set ι
a✝¹ : ¬a✝² ∈ s
a✝ : Set.Finite s
hs : FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ insert a✝² s), t i }
[PROOFSTEP]
rw [iSup_insert]
[GOAL]
case H1
K : Type u_1
L : Type u_2
inst✝³ : Field K
inst✝² : Field L
inst✝¹ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
t : ι → IntermediateField K L
h : Finite ι
inst✝ : ∀ (i : ι), FiniteDimensional K { x // x ∈ t i }
P : Set ι → Prop := fun s => FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
a✝² : ι
s : Set ι
a✝¹ : ¬a✝² ∈ s
a✝ : Set.Finite s
hs : FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), t i }
⊢ FiniteDimensional K { x // x ∈ t a✝² ⊔ ⨆ (x : ι) (_ : x ∈ s), t x }
[PROOFSTEP]
exact IntermediateField.finiteDimensional_sup _ _
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
s : Finset ι
h : ∀ (i : ι), FiniteDimensional K { x // x ∈ f i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), f i }
[PROOFSTEP]
haveI : ∀ i : { i // i ∈ s }, FiniteDimensional K (f i) := fun i => h i
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
s : Finset ι
h : ∀ (i : ι), FiniteDimensional K { x // x ∈ f i }
this : ∀ (i : { i // i ∈ s }), FiniteDimensional K { x // x ∈ f ↑i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), f i }
[PROOFSTEP]
have : ⨆ i ∈ s, f i = ⨆ i : { i // i ∈ s }, f i :=
  le_antisymm (iSup_le fun i => iSup_le fun h => le_iSup (fun i : { i // i ∈ s } => f i) ⟨i, h⟩)
    (iSup_le fun i => le_iSup_of_le i (le_iSup_of_le i.2 le_rfl))
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
s : Finset ι
h : ∀ (i : ι), FiniteDimensional K { x // x ∈ f i }
this✝ : ∀ (i : { i // i ∈ s }), FiniteDimensional K { x // x ∈ f ↑i }
this : ⨆ (i : ι) (_ : i ∈ s), f i = ⨆ (i : { i // i ∈ s }), f ↑i
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), f i }
[PROOFSTEP]
exact this.symm ▸ IntermediateField.finiteDimensional_iSup_of_finite
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
s : Finset ι
h : ∀ (i : ι), i ∈ s → FiniteDimensional K { x // x ∈ f i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), f i }
[PROOFSTEP]
haveI : ∀ i : { i // i ∈ s }, FiniteDimensional K (f i) := fun i => h i i.2
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
s : Finset ι
h : ∀ (i : ι), i ∈ s → FiniteDimensional K { x // x ∈ f i }
this : ∀ (i : { i // i ∈ s }), FiniteDimensional K { x // x ∈ f ↑i }
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), f i }
[PROOFSTEP]
have : ⨆ i ∈ s, f i = ⨆ i : { i // i ∈ s }, f i :=
  le_antisymm (iSup_le fun i => iSup_le fun h => le_iSup (fun i : { i // i ∈ s } => f i) ⟨i, h⟩)
    (iSup_le fun i => le_iSup_of_le i (le_iSup_of_le i.2 le_rfl))
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
s : Finset ι
h : ∀ (i : ι), i ∈ s → FiniteDimensional K { x // x ∈ f i }
this✝ : ∀ (i : { i // i ∈ s }), FiniteDimensional K { x // x ∈ f ↑i }
this : ⨆ (i : ι) (_ : i ∈ s), f i = ⨆ (i : { i // i ∈ s }), f ↑i
⊢ FiniteDimensional K { x // x ∈ ⨆ (i : ι) (_ : i ∈ s), f i }
[PROOFSTEP]
exact this.symm ▸ IntermediateField.finiteDimensional_iSup_of_finite
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
h : ∀ (i : ι), Algebra.IsAlgebraic K { x // x ∈ f i }
⊢ Algebra.IsAlgebraic K { x // x ∈ ⨆ (i : ι), f i }
[PROOFSTEP]
rintro ⟨x, hx⟩
[GOAL]
case mk
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
h : ∀ (i : ι), Algebra.IsAlgebraic K { x // x ∈ f i }
x : L
hx : x ∈ ⨆ (i : ι), f i
⊢ IsAlgebraic K { val := x, property := hx }
[PROOFSTEP]
obtain ⟨s, hx⟩ := exists_finset_of_mem_supr' hx
[GOAL]
case mk.intro
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
h : ∀ (i : ι), Algebra.IsAlgebraic K { x // x ∈ f i }
x : L
hx✝ : x ∈ ⨆ (i : ι), f i
s : Finset ((i : ι) × { x // x ∈ f i })
hx : x ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }) (_ : i ∈ s), K⟮↑i.snd⟯
⊢ IsAlgebraic K { val := x, property := hx✝ }
[PROOFSTEP]
rw [isAlgebraic_iff, Subtype.coe_mk, ← Subtype.coe_mk (p := fun x => x ∈ _) x hx, ← isAlgebraic_iff]
[GOAL]
case mk.intro
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
h : ∀ (i : ι), Algebra.IsAlgebraic K { x // x ∈ f i }
x : L
hx✝ : x ∈ ⨆ (i : ι), f i
s : Finset ((i : ι) × { x // x ∈ f i })
hx : x ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }) (_ : i ∈ s), K⟮↑i.snd⟯
⊢ IsAlgebraic K { val := x, property := hx }
[PROOFSTEP]
haveI : ∀ i : Σ i, f i, FiniteDimensional K K⟮(i.2 : L)⟯ := fun ⟨i, x⟩ =>
  adjoin.finiteDimensional (isIntegral_iff.1 (isAlgebraic_iff_isIntegral.1 (h i x)))
[GOAL]
case mk.intro
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
E1 E2 : IntermediateField K L
ι : Type u_3
f : ι → IntermediateField K L
h : ∀ (i : ι), Algebra.IsAlgebraic K { x // x ∈ f i }
x : L
hx✝ : x ∈ ⨆ (i : ι), f i
s : Finset ((i : ι) × { x // x ∈ f i })
hx : x ∈ ⨆ (i : (i : ι) × { x // x ∈ f i }) (_ : i ∈ s), K⟮↑i.snd⟯
this : ∀ (i : (i : ι) × { x // x ∈ f i }), FiniteDimensional K { x // x ∈ K⟮↑i.snd⟯ }
⊢ IsAlgebraic K { val := x, property := hx }
[PROOFSTEP]
apply Algebra.isAlgebraic_of_finite
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
pb : PowerBasis K L
⊢ pb.gen = ↑(algebraMap { x // x ∈ K⟮pb.gen⟯ } L) (adjoin.powerBasis (_ : IsIntegral K pb.gen)).gen
[PROOFSTEP]
rw [adjoin.powerBasis_gen, AdjoinSimple.algebraMap_gen]
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
pb : PowerBasis K L
f : K[X]
⊢ ↑(AlgEquiv.symm (equivAdjoinSimple pb)) (↑(aeval pb.gen) f) = ↑(aeval (AdjoinSimple.gen K pb.gen)) f
[PROOFSTEP]
rw [equivAdjoinSimple, equivOfMinpoly_symm, equivOfMinpoly_aeval, adjoin.powerBasis_gen]
[GOAL]
K : Type u_1
L : Type u_2
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Algebra K L
pb : PowerBasis K L
⊢ ↑(AlgEquiv.symm (equivAdjoinSimple pb)) pb.gen = AdjoinSimple.gen K pb.gen
[PROOFSTEP]
rw [equivAdjoinSimple, equivOfMinpoly_symm, equivOfMinpoly_gen, adjoin.powerBasis_gen]
