axiom-developer
[Top][All Lists]

Re: [Axiom-developer] about Expression Integer

 From: Ralf Hemmecke Subject: Re: [Axiom-developer] about Expression Integer Date: Tue, 21 Feb 2006 10:26:29 +0100 User-agent: Thunderbird 1.5 (X11/20051201)

Martin Rubey wrote:
I could imagine that some innocent looking computation
would not be correct in the situation above.
As Martin I already imagine this error :

P := DMP([x,y], EXPR INT) a :P := x b := a/x
differentiate(b,x)                    -- 1/x

(4) -> differentiate(b,x)

1
(4)  -
x
Type: DistributedMultivariatePolynomial([x,y],Expression Integer)

I think this result should be classed a bug. The 'differentiate'
operation apparently makes some incorrect assumptions about the
coefficient domain. I think the result should be the same as:

(5) -> differentiate(b::EXPR INT,x)::P

(5)  0
Type: DistributedMultivariatePolynomial([x,y],Expression Integer)

Well, Bill, imagine you had to programm DistributedMultivariatePolynomial.
In gdpoly.spad we see

differentiate(p: %,v: OV) ==
multivariate(differentiate(univariate(p,v)),v)

where univariate just converts p to an element of
SparseUnivariatePolynomial(%). (BTW, that's already a trick!)
However, it seems the most obvious thing to do.

Now you suggest to do that differently, since the coefficients of that univariate polynomial might also contain the variable x. Well, would be possible, but obviously the designer of DMP (or rather GDMP) did not think of such a strange thing like having the same variable as the indeterminate of the polynomial and at the same time in the domain of coefficients.

Still, it's a bug, because that behaviour should at least be very vell documented. It is, however, not so clear where to do this. I suggest there should be a note in DMP rather than the category PartialDifferentialRing (where the signature comes from).

Ralf

reply via email to