axiom-developer
[Top][All Lists]

RE: [Axiom-developer] about Expression Integer

 From: Bill Page Subject: RE: [Axiom-developer] about Expression Integer Date: Tue, 21 Feb 2006 09:59:44 -0500

On February 21, 2006 4:26 AM Ralf Hemmecke
> >> ...
> >> 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.

I haven't looked any more deeply in the source code than this
but if it was already well documented that SUP requires that no
variables occur in the coefficient domian, then I think I would
prefer that the conversion to SUP take account of the fact that
the polynomial coefficients might contain variables in the same
way that the coercion to EXPR INT in the example (5) above does.

Alternatively, if we are going to allow constructions in which
the coefficient domain of SUP might contain the polynomial
variable, then the implementation of 'differentiate' in SUP
should be corrected.

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

I agree that the usage is obscure but it still seems to me to
be an error in the implementation of either 'univariate' in the
code you quoted above or 'differentiate' in SUP.

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

I agree.

Regards,
Bill Page.

reply via email to