axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [DistributedMultivariatePolynomial] polynomial magic


From: billpage
Subject: [Axiom-developer] [DistributedMultivariatePolynomial] polynomial magic
Date: Mon, 27 Feb 2006 17:01:56 -0600

Changes http://wiki.axiom-developer.org/DistributedMultivariatePolynomial/diff
--
This coercion from DMP to POLY seems to come from:
\begin{axiom}
)sh PolToPol
\end{axiom}

I think Martin Rubey has previously mentioned this package as
a potential source of problems... :)

PolToPol apparently dates back to 1988. Looking at the
source code:
http://wiki.axiom-developer.org/images/axiom--test--1/src/algebra/poltopol.spad.pamphlet
we see that the action happens here::

    dmpToP(dpol:DPoly) : P ==
      map(convert,dpol)$MPC3(Ov,Symbol,DP,IES,R,DPoly,P)

The 'convert' function is apparently from DMP and returns the
InputForm which internally is represented by a Lisp SExpression.
So for variables which are Symbols, then returns the internal
(Lisp) representation of the variable.

This 'map' function comes from::

  MPolyCatFunctions3(Vars1,Vars2,E1,E2,R,PR1,PR2): C == T where
    E1   : OrderedAbelianMonoidSup
    E2   : OrderedAbelianMonoidSup
    Vars1: OrderedSet
    Vars2: OrderedSet
    R    : Ring
    PR1  : PolynomialCategory(R,E1,Vars1)
    PR2  : PolynomialCategory(R,E2,Vars2)

  ...

    map(f:Vars1 -> Vars2, p:PR1):PR2 ==
      (x1 := mainVariable p) case "failed" =>
        c:R:=(retract p)
        c::PR2
      up := univariate(p, x1::Vars1)
      x2 := f(x1::Vars1)
      ans:PR2 := 0
      while up ^= 0 repeat
        ans := ans + monomial(map(f,leadingCoefficient up),x2,degree up)
        up  := reductum up
      ans

----------

I think there is a little cheating here in this SPAD code. In
addition to making some hidden assumptions about internal about
the representation of variables, i.e. that they are just Lisp
symbols, it also tells the following lies::

    Vars1: OrderedSet
    Vars2: OrderedSet

It seems unlikely to me that one could play the same tricks
in Aldor!

In any case what this code appears to do is to break down the
polynomial from the source domain and re-build it in the target
domain, term by term using the 'monomial' function from the
target domain.

--
forwarded from http://wiki.axiom-developer.org/address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]