/-- Lift a ring homomorphism `R →+* T` to `S →+* T` by specifying a root `x` of `f` in `T`,
where `S` is given by adjoining a root of `f` to `R`. -/
def lift (h : IsAdjoinRoot S f) : S →+* T where
  toFun z := (h.repr z).eval₂ i x
  map_zero' := by
    dsimp only -- Porting note: added
    rw [h.eval₂_repr_eq_eval₂_of_map_eq hx _ _ (map_zero _), eval₂_zero]
  map_add' z w := by
    

Proof state:
R : Type u
S : Type v
inst✝³ : CommRing R
inst✝² : Ring S
f : R[X]
inst✝¹ : Algebra R S
T : Type u_1
inst✝ : CommRing T
i : R →+* T
x : T
hx : eval₂ i x f = 0
h : IsAdjoinRoot S f
z w : S
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },
          map_mul' :=
            (_ :
              ∀ (z w : S),
                OneHom.toFun
                    { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                    (z * w) =
                  OneHom.toFun
                      { toFun := fun z => eval₂ i x (repr h z),
                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                      z *
                    OneHom.toFun
                      { toFun := fun z => eval₂ i x (repr h z),
                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                      w) })
      (z + w) =
    OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (z w : S),
                  OneHom.toFun
                      { toFun := fun z => eval₂ i x (repr h z),
                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                      (z * w) =
                    OneHom.toFun
                        { toFun := fun z => eval₂ i x (repr h z),
                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                        z *
                      OneHom.toFun
                        { toFun := fun z => eval₂ i x (repr h z),
                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                        w) })
        z +
      OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := fun z => eval₂ i x (repr h z), map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) },
            map_mul' :=
              (_ :
                ∀ (z w : S),
                  OneHom.toFun
                      { toFun := fun z => eval₂ i x (repr h z),
                        map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                      (z * w) =
                    OneHom.toFun
                        { toFun := fun z => eval₂ i x (repr h z),
                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                        z *
                      OneHom.toFun
                        { toFun := fun z => eval₂ i x (repr h z),
                          map_one' := (_ : (fun z => eval₂ i x (repr h z)) 1 = 1) }
                        w) })
        w

Next tactic:
dsimp only