Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sage should have generic resultant implementation for multivariate polynomials #2693

Closed
sagetrac-cwitty mannequin opened this issue Mar 28, 2008 · 15 comments
Closed

Comments

@sagetrac-cwitty
Copy link
Mannequin

sagetrac-cwitty mannequin commented Mar 28, 2008

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.)

CC: @tscrim @videlec @vinklein

Component: algebraic geometry

Keywords: resultant

Author: Frédéric Chapoton

Branch/Commit: 30bd620

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/2693

@sagetrac-cwitty sagetrac-cwitty mannequin added this to the sage-5.11 milestone Mar 28, 2008
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@miguelmarco
Copy link
Contributor

comment:5

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.

@fchapoton
Copy link
Contributor

Changed keywords from none to resultant

@fchapoton
Copy link
Contributor

Commit: add07d3

@fchapoton
Copy link
Contributor

New commits:

add07d3trac 2693 resultants for polynomials over inexact rings

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor

Branch: u/chapoton/2693

@fchapoton
Copy link
Contributor

comment:8

green bot, please review

@fchapoton
Copy link
Contributor

comment:9

hmm, the second doctest is more about univariate polynomials. Maybe it should go there ?

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 6, 2019

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

30bd620trac 2693 resultants for polynomials over inexact rings

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 6, 2019

Changed commit from add07d3 to 30bd620

@fchapoton
Copy link
Contributor

comment:11

ok, test is now at the right place.

@fchapoton
Copy link
Contributor

comment:12

and the bot is green.

@tscrim
Copy link
Collaborator

tscrim commented May 7, 2019

comment:13

LGTM.

@tscrim
Copy link
Collaborator

tscrim commented May 7, 2019

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented May 12, 2019

Changed branch from u/chapoton/2693 to 30bd620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants