Factoring in radicals in general



Andrei,

> It is the only place where POLYDECOMP is mentioned in the manual. 

I already submitted this documentation bug to the sourceforge bug
database in August 2002: "No describe(polydecomp)", bug #593531, and
included documentation.  In general, I don't think it's useful to send
bug reports to the mailing list, except bugs that bring up some issue
that needs discussion.

That said, I would agree that it is not easy to look up bugs in the bug
database -- I would be willing to make an index of it by hand if we can
find some place to put it.

> Sourcefiles are silent as well.

Unfortunately, there are very few comments in the source for ANY part of
the system...!

Below please find a second draft of the documentation for polydecomp
which I included in the followup to the August 2002 bug report.

     -s

---------------------------

Polydecomp(p,v) considers p as a polynomial in v and decomposes it into
the functional composition of polynomials in v.  A return value of
[p1,p2,...,pn] denotes

     lambda([v],p1) ( lambda([v],p2) ( ... v ... ) )

Degree(pi) > 1 for i<n.

Examples:

polydecomp(x^210,x) => [ x^7, x^5, x^3, x^2 ]

poly: expand( subst( x^3-x-1, x, x^2-a ))
    => x^6-2*x^4-2*x^3+x^2+2*x-a+1
polydecomp( poly , x) => [ x^2-a, x^3-x-1]

The following function composes [ex1,ex2,...] as functions in var; it is
the inverse of polydecomp:

/* Computes the functional composition of the expressions in exlist
   as functions in var, returning an expression in var. */

   compose_ex(exlist,var):=
        block([r:var],
              for i in exlist do r: subst(i,var,r),
              r ) $

Re-express above example using composef:

polydecomp(compose_ex( [ x^2-a, x^3-x-1 ], x), x)
   => [ x^2-a, x^3-x-1]

Note that though compose_ex(polydecomp(p,x),x) always returns p
(unexpanded), polydecomp(compose_ex([p1...],x),x) does *not* necessarily
return [p1...]:

polydecomp(compose_ex( [x^2+2*x+3, x^2] , x), x)
   => [x^2+2, x^2+1]

polydecomp(compose_ex( [x^2+x+1, x^2+x+1], x), x)
   => [(x^2+3)/4, (x^2+5)/2, 2*x+1]