From fc3735d872162cea51514983bf2d14eb8d9bce2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Thu, 6 Apr 2023 18:21:30 -0300 Subject: [PATCH] Don't call `sylvester_matrix` with zero polynomials --- src/sage/rings/polynomial/multi_polynomial.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index 2f4d0dba284..bf82d922f28 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -1390,8 +1390,8 @@ cdef class MPolynomial(CommutativePolynomial): If both polynomials are of positive degree with respect to variable, the determinant of the Sylvester matrix is the resultant:: - sage: f = R.random_element(4) - sage: g = R.random_element(4) + sage: f = R.random_element(4) or (x^2 * y^2) + sage: g = R.random_element(4) or (x^2 * y^2) sage: f.sylvester_matrix(g, x).determinant() == f.resultant(g, x) True