-- Lean 4 proof step from Mathlib.RingTheory.Polynomial.UniversalFactorizationRing (goal)
Goal:
R : Type u_1
inst : CommRing R
m k : ℕ
this : Algebra (MvPolynomial (Fin (m + k)) R) (MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R) :=
  RingHom.toAlgebra (AlgHom.toRingHom (universalFactorizationMap R (m + k) m k ⋯))
i : Fin k
i_1 : Fin m
⊢ Eq (α :=
    Algebra.Generators.Ring (R := MvPolynomial (Fin (m + k)) R)
      (Algebra.Presentation.toGenerators
        (Algebra.PreSubmersivePresentation.toPresentation (universalFactorizationMapPresentation R (m + k) m k ⋯))))
    ((pderiv
            (Algebra.PreSubmersivePresentation.map (R := MvPolynomial (Fin (m + k)) R)
              (universalFactorizationMapPresentation R (m + k) m k ⋯)
              ((finSumFinEquiv : (a : Fin m ⊕ Fin k) → Fin (m + k)) (Sum.inr i))) :
          (a : MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R)) →
            MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R))
        (Algebra.Presentation.relation
          (Algebra.PreSubmersivePresentation.toPresentation (universalFactorizationMapPresentation R (m + k) m k ⋯))
          (Fin.castAdd k i_1)) :
      MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R))
    (-Fin.addCases (motive := fun (x : Fin (m + k)) ↦ MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R))
          (fun (j₁ : Fin m) ↦
            if (↑(Fin.castAdd k i_1) : ℕ) ∈ Set.Icc (↑j₁ : ℕ) ((↑j₁ : ℕ) + k) then
              Polynomial.coeff
                (Polynomial.map
                  (↑(AlgHom.comp (mapAlgHom (Algebra.ofId R (MvPolynomial (Fin (m + k)) R))) (rename Sum.inr)) :
                    MvPolynomial (Fin k) R →+* MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R))
                  (freeMonic R k))
                ((↑(Fin.castAdd k i_1) : ℕ) - (↑j₁ : ℕ))
            else 0)
          (fun (j₁ : Fin k) ↦
            if (↑(Fin.castAdd k i_1) : ℕ) ∈ Set.Icc (↑j₁ : ℕ) ((↑j₁ : ℕ) + m) then
              Polynomial.coeff
                (Polynomial.map
                  (↑(AlgHom.comp (mapAlgHom (Algebra.ofId R (MvPolynomial (Fin (m + k)) R))) (rename Sum.inl)) :
                    MvPolynomial (Fin m) R →+* MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R))
                  (freeMonic R m))
                ((↑(Fin.castAdd k i_1) : ℕ) - (↑j₁ : ℕ))
            else 0)
          ((finSumFinEquiv : (a : Fin m ⊕ Fin k) → Fin (m + k)) (Sum.inr i)) :
      MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin (m + k)) R))
have a : Eq.{u_1 + 1} (α :=
  Algebra.Generators.Ring (R := MvPolynomial (Fin (m + k)) R)
    (Algebra.Presentation.toGenerators
      (Algebra.PreSubmersivePresentation.toPresentation (universalFactorizationMapPresentation R (m + k) m k sorry))))
  (if (↑i_1 : ℕ) < (↑i : ℕ) then 0
  else
    if h : (↑i_1 : ℕ) - (↑i : ℕ) < m then X (Sum.inl ⟨(↑i_1 : ℕ) - (↑i : ℕ), sorry⟩)
    else if (↑i_1 : ℕ) - (↑i : ℕ) = m then 1 else 0)
  (if (↑i : ℕ) ≤ (↑i_1 : ℕ) ∧ (↑i_1 : ℕ) ≤ (↑i : ℕ) + m then
    if h : (↑i_1 : ℕ) - (↑i : ℕ) < m then X (Sum.inl ⟨(↑i_1 : ℕ) - (↑i : ℕ), sorry⟩)
    else if (↑i_1 : ℕ) - (↑i : ℕ) = m then 1 else 0
  else 0)
Tactic: simp [pderiv_map, coeff_freeMonic, apply_dite (DFunLike.coe _), apply_ite (DFunLike.coe _),
        pderiv_inl_universalFactorizationMap_X, pderiv_inr_universalFactorizationMap_X]