#12752: resulant of two polynomials returns incorrect value
----------------------------------------+-----------------------------------
Reporter: bhutz | Owner: tba
Type: defect | Status: new
Priority: minor | Milestone:
sage-duplicate/invalid/wontfix
Component: basic arithmetic | Resolution:
Keywords: polynomial resultant | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps: todo
----------------------------------------+-----------------------------------
Changes (by nbruin):
* priority: major => minor
* component: number theory => basic arithmetic
* milestone: sage-5.0 => sage-duplicate/invalid/wontfix
Comment:
See [http://groups.google.com/group/sage-
devel/browse_thread/thread/c15d8628b25517ca?hl=en this sage-devel thread].
The documented use of f.resultant(g,<var>) is to take the resultant of f,g
with respect to <var>. This is useful for eliminating variables when doing
computations with polynomials. As documented, f.resultant(g) takes the
resultant relative to the first parameter.
The resultant operation expected/requested in the ticket is a different
one: It is the "bivariate form" resultant. You can compute it by taking a
univariate polynomial resultant of dehomogenized forms and compensating
for degree-drop by multiplying by the right power of some leading
coefficients (if both forms drop in degree then they have a common root at
infinity and the resultant is 0). Note that this routine should raise an
error if any of its parameters is not homogeneous or not bivariate.
The resultant method on multivariate polynomials basically has to be the
ordinary polynomial resultant. If you really want to have the form-
resultant you can implement it as a separate function:
{{{
def form_resultant(F,G):
"""debugging, error checking and better coercion left as an
exercise"""
R=F.base_ring()
Rt=PolynomialRing(R,'t')
f=F(Rt.0,1)
lcF=F.coefficient([F.degree(),0])
g=G(Rt.0,1)
lcG=G.coefficient([G.degree(),0])
return
lcF^(G.degree()-g.degree())*lcG^(F.degree()-f.degree())*f.resultant(g)
}}}
If there is a class somewhere that symbolizes homogeneous bivariate forms,
you could hang that function off it as "form_resultant".
Note that in general, computing with bivariate forms is done most
efficiently by representing them by a univariate polynomial together with
a degree (to keep track of leading 0 coefficients). Univariate polynomials
tend to have much more efficient implementations.
Changing to "invalid". If you want to track an enhancement proposal to
implement a "forms" class, it's probably better to open a new ticket. I
think it will be tricky to come up with a useful design for that, though.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12752#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.