The empty matrix is NOT the Sylvester matrix of (0,0), (0,1) or (1,0).

The degree of the zero polynomial is usually taken to be -infinity,
though Sage uses -1 for some reason.  In either case, the Sylvester
matrix needs to have negative dimensions.

That is to say, return a ValueError in these cases.

On Thu, Nov 11, 2010 at 9:32 AM, luisfe <lftab...@yahoo.es> wrote:
> Hi,
>
> I am trying to write a procedure for univariate and multivariate
> polynomial rings that computes the Sylvester matrix of two
> polynomials. But I have a problem with corner cases.
>
> I am not sure what the method should resurn in the cases
>
> poly1, poly2 = 0, 1
> poly1, poly2 = 1, 0
> poly1, poly2 = 0, 0
>
> For two constant polynomials, the method returns the empty matrix [ ],
> whose determinant is 1. This equals the resultant of two constant
> nonzero polynomials, so it is fine.
>
> If one (or both) of the constants is zero the resultant will be zero
> which does not equal the determinant of the empty matrix.
>
> So, I see two posibilities:
>
> 1) In the three above cases, raise a ValueError indicating that in
> this case the Sylvester matrix is not defined.
>
> 2) return the empty matrix and add in the documentation that in these
> cases the determinant of the Sylvester matrix is NOT the resultant.
> Maybe raise a warning in the code.
>
> I have not found a Sylvester matrix method in Maxima nor in Singular,
> that might help to check what they do. I have checked maple and it
> follows option 2. Return the empty matrix, even if in that case the
> determinant is not the resultant.
>
> Any opinion about this case?
>
> --
> To post to this group, send an email to sage-devel@googlegroups.com
> To unsubscribe from this group, send an email to 
> sage-devel+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to