Opened 11 years ago

Last modified 5 years ago

#2693 new enhancement

Sage should have generic resultant implementation for multivariate polynomials

Reported by: cwitty Owned by: was
Priority: major Milestone: sage-6.4
Component: algebraic geometry Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Consider this example, which fails:

R.<x,y> = RR[]
p = x + y
q = x*y
p.resultant(q)

(as reported here: http://groups.google.com/group/sage-support/browse_thread/thread/1d6289cead33d063#)

This is because multivariate resultants are implemented using the Singular pexpect interface, which does not support RR.

A workaround for this particular problem (and a possible basis for an improved version) is:

p.polynomial(x).resultant(q.polynomial(x)) 

That is, fall back to univariate resultants, which are implemented using Pari and are somewhat more generic. (This is still not truly generic, though, since there are Sage rings which have no Pari equivalent.)

Change History (5)

comment:1 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 5 years ago by mmarco

  • Report Upstream set to N/A

In fact, singular resultants are slow compared to other methods, so it would really be a good idea to write specific sage code for resultants.

See #16749 and #12174 for ideas about it.

Just something like:

def resultant(self, other, variable):
    m = self.sylvester_matrix(other, variable)
    return m.determinant()

Would be both general for any polynomial ring, and faster than the current implementation. And of course, there could be a lot of cases where things can be done much faster, using specific backends where they are better.

Note: See TracTickets for help on using tickets.