-- 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 m
i_1 : Fin k
⊢ 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.inl 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.natAdd m 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.natAdd m 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.natAdd m i_1) : ℕ) - (↑j₁ : ℕ))
            else 0)
          (fun (j₁ : Fin k) ↦
            if (↑(Fin.natAdd m 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.natAdd m i_1) : ℕ) - (↑j₁ : ℕ))
            else 0)
          ((finSumFinEquiv : (a : Fin m ⊕ Fin k) → Fin (m + k)) (Sum.inl 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 m + (↑i_1 : ℕ) < (↑i : ℕ) then 0
  else
    if h : m + (↑i_1 : ℕ) - (↑i : ℕ) < k then X (Sum.inr ⟨m + (↑i_1 : ℕ) - (↑i : ℕ), sorry⟩)
    else if m + (↑i_1 : ℕ) - (↑i : ℕ) = k then 1 else 0)
  (if (↑i : ℕ) ≤ m + (↑i_1 : ℕ) ∧ m + (↑i_1 : ℕ) ≤ (↑i : ℕ) + k then
    if h : m + (↑i_1 : ℕ) - (↑i : ℕ) < k then X (Sum.inr ⟨m + (↑i_1 : ℕ) - (↑i : ℕ), sorry⟩)
    else if m + (↑i_1 : ℕ) - (↑i : ℕ) = k 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]