Updates:
Cc: [email protected]
Labels: Polynomial
Comment #1 on issue 2739 by [email protected]: this composition doesn't
decompose
http://code.google.com/p/sympy/issues/detail?id=2739
Here's the docstring of dup_decompose (the internal function for this) in
densetools.py:
"""
Computes functional decomposition of ``f`` in ``K[x]``.
Given a univariate polynomial ``f`` with coefficients in a field of
characteristic zero, returns list ``[f_1, f_2, ..., f_n]``, where::
f = f_1 o f_2 o ... f_n = f_1(f_2(... f_n))
and ``f_2, ..., f_n`` are monic and homogeneous polynomials of at
least second degree.
Unlike factorization, complete functional decompositions of
polynomials are not unique, consider examples:
1. ``f o g = f(x + b) o (g - b)``
2. ``x**n o x**m = x**m o x**n``
3. ``T_n o T_m = T_m o T_n``
where ``T_n`` and ``T_m`` are Chebyshev polynomials.
**Examples**
>>> from sympy.polys.domains import ZZ
>>> from sympy.polys.densetools import dup_decompose
>>> f = ZZ.map([1, -2, 1, 0, 0])
>>> dup_decompose(f, ZZ)
[[1, 0, 0], [1, -1, 0]]
**References**
1. [Kozen89]_
"""
So based on that, there is no guarantee that a particular decomposition
will be found, which, based on the wording, would include the trivial
decomposition. It would be nice if at least some decomposition other than
the trivial one were found when it existed. I don't know if the algorithm
allows this (I'll have to look at the reference, or wait for Mateusz's
comment).
As a side note, this is one example of many where a superior docstring is
buried in the internals of the polys. This gives much more information
than the docstring of Poly.decompose. The two should be merged, with the
only difference being the doctests. The same holds for some other
functions in the polys.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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/sympy-issues?hl=en.