[PURRS-devel] Re: The specification of sqrfree()
Richard B. Kreckel
kreckel at ginac.de
Thu Jan 17 13:05:55 CET 2002
Hi Roberto,
On Wed, 16 Jan 2002, Roberto Bagnara wrote:
> the definition of square-free polynomial we have in mind
> is semantic, not syntactic. In other words, we believe
> it is unnecessary to expand() the lhs and rhs of
>
> p(X) = q(X)^2*r(X)
>
> since what is meant is that the lhs and the rhs are the
> same function.
Sure, but I would still recommend considering inclusion of expansion
and the use of `==' instead of `=' since this then puts it into the
syntatic domain of of C++ and GiNaC. Just to avoid potential confusion...
> We have also thought about a definition of square-free
> decomposition that could safely accommodate both the
> univariate and the multivariate case. Here is a summary
> of what we would like to add to GiNaC's documentation
> (both the tutorial and the developer's reference)
> just before the introduction of the sqrfree() function.
>
> ======================================================================
>
> Definition 1
> ------------
>
> A polynomial p(X) in C[X] is said <EM>square-free</EM>
> if, whenever any two polynomials q(X) and r(X) in C[X]
> are such that p(X) = q(X)^2*r(X), q(X) is constant.
>
> Note: we mean that p(X) has no repeated factors, apart
> eventually from constants.
>
> Definition 2
> ------------
>
> Given a polynomial p(X) in C[X], we say that the
> decomposition
>
> p(X) = b * p_1(X)^a_1 * p_2(X)^a_2 * ... * p_r(X)^a_r
>
> is a <EM>square-free decomposition</EM> of p(X) if the
> following conditions hold:
>
> 1) b is a non-zero constant;
>
> 2) a_j is a positive integer for j=1, ..., r;
>
> 3) the degree of the polynomial p_j is strictly positive
> for j=1, ..., r;
Err, otherwise they wouldn't be polynomials.
> 4) the polynomial p_1(X) * p_2(X) * ... * p_r(X) is square-free.
>
> Note: this need not be unique. For example, if
> a_j is even, we could change the polynomial p_j(X)
> into (-p_j(X)). We do not ask that the factors
> p_j(X) are irreducible polynomials.
>
> Specification of sqrfree()
> --------------------------
>
> Given a polynomial p(X) in C[X], the function sqrfree() returns
> a square-free decomposition of p(X).
>
> ======================================================================
>
> If you agree, we would adapt this for the two different contexts,
> translate it into Doxygen and LaTeX and provide a patch against
> GiNaC 1.0.3.
Please do go ahead! We are only seemingly disagreeing because I have the
implementor's viewpoint and you the mathematician's. I see it as a mere
finding of all GCDs of the original polynomial p(X) and all its
derivatives. Hence my slight confusion.
Best wishes
-richy.
--
Richard B. Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
More information about the PURRS-devel
mailing list