-- Lean 4 proof step from Mathlib.RingTheory.Polynomial.UniversalFactorizationRing (goal)
Goal:
R : Type u_1
inst : CommRing R
n m k : ℕ
hn : n = m + k
h : Nontrivial R
this : Algebra (MvPolynomial (Fin n) R) (MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R) :=
  RingHom.toAlgebra (AlgHom.toRingHom (universalFactorizationMap R n m k hn))
inr :
  @RingHom.comp _ _ _ _ Semiring.toNonAssocSemiring _
      (↑(aeval
            (Algebra.Generators.val
              (Algebra.Presentation.toGenerators
                (Algebra.PreSubmersivePresentation.toPresentation
                  (universalFactorizationMapPresentation R n m k hn))))) :
        MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R) →+* MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
      (↑(AlgHom.comp (mapAlgHom (Algebra.ofId R (MvPolynomial (Fin n) R))) (rename Sum.inl)) :
        MvPolynomial (Fin m) R →+* MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R)) =
    Algebra.TensorProduct.includeLeftRingHom
inr₁ :
  Eq (α := MvPolynomial (Fin k) R →+* MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
    (@RingHom.comp _ _ _ _ Semiring.toNonAssocSemiring _
      (↑(aeval
            (Algebra.Generators.val
              (Algebra.Presentation.toGenerators
                (Algebra.PreSubmersivePresentation.toPresentation
                  (universalFactorizationMapPresentation R n m k hn))))) :
        MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R) →+* MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
      (↑(AlgHom.comp (mapAlgHom (Algebra.ofId R (MvPolynomial (Fin n) R))) (rename Sum.inr)) :
        MvPolynomial (Fin k) R →+* MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R)))
    (↑Algebra.TensorProduct.includeRight :
      MvPolynomial (Fin k) R →+* MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
inr₂ :
  m =
    natDegree (R := MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
      (Polynomial.map Algebra.TensorProduct.includeLeftRingHom (freeMonic R m))
⊢ resultant
      (Polynomial.map
        (@RingHom.comp _ _ _ _ Semiring.toNonAssocSemiring _
          (↑(aeval
                (Algebra.Generators.val
                  (Algebra.Presentation.toGenerators
                    (Algebra.PreSubmersivePresentation.toPresentation
                      (universalFactorizationMapPresentation R n m k hn))))) :
            MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R) →+*
              MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
          (↑(AlgHom.comp (mapAlgHom (Algebra.ofId R (MvPolynomial (Fin n) R))) (rename Sum.inl)) :
            MvPolynomial (Fin m) R →+* MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R)))
        (freeMonic R m))
      (Polynomial.map
        (@RingHom.comp _ _ _ _ Semiring.toNonAssocSemiring _
          (↑(aeval
                (Algebra.Generators.val
                  (Algebra.Presentation.toGenerators
                    (Algebra.PreSubmersivePresentation.toPresentation
                      (universalFactorizationMapPresentation R n m k hn))))) :
            MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R) →+*
              MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
          (↑(AlgHom.comp (mapAlgHom (Algebra.ofId R (MvPolynomial (Fin n) R))) (rename Sum.inr)) :
            MvPolynomial (Fin k) R →+* MvPolynomial (Fin m ⊕ Fin k) (MvPolynomial (Fin n) R)))
        (freeMonic R k))
      m k =
    resultant (Polynomial.map Algebra.TensorProduct.includeLeftRingHom (freeMonic R m))
      (Polynomial.map
        (↑Algebra.TensorProduct.includeRight :
          MvPolynomial (Fin k) R →+* MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
        (freeMonic R k))
have inr₃ : k =
  natDegree
    (Polynomial.map
      (↑Algebra.TensorProduct.includeRight :
        MvPolynomial (Fin k) R →+* MvPolynomial (Fin m) R ⊗[R] MvPolynomial (Fin k) R)
      (freeMonic R k))
Tactic: congr 2