Richard.Kreckel(a)Uni-Mainz.DE
> Pondering again about that definition. Forget my remarks, they were
> probably just confused. However, I think it is still problematic because
> the definition of `=' is unclear.
>
> Maybe, this is better:
> A polynomial p(X) in Q[X] is said <EM>square-free</EM>
> if, whenever any two polynomials q(X) and r(X) in Q[X]
> are such that expand(p(X)) == expand(q(X)^2*r(X)),
> q(X) is constant.
>
> Do you think this is okay? If so, we'll happily apply this immediately.
Dear Richard,
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.
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;
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.
the PURRS team
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
A student of mine started having troubles with her Linux machine at
home soon after she started playing with GiNaC. The machine seemed to
become instable after a few days of work and she reinstalled GNU/Linux
several times because of that. A few days ago, we discovered that
/dev/null was no longer a character device: it was an ordinary file
and that caused the system not to boot properly. We recreated the
/dev/null device and everything seemed to go well until this morning,
when the device disappeared again. BUT this time Tatiana provided
the relevant bit of information; here it is:
...
config.status: creating doc/reference/Makefile
config.status: creating config.h
**** The following problems have been detected by configure.
**** Please check the messages below before running "make".
**** (see the section 'Common Problems' in the INSTALL file)
** No suitable installed version of CLN could be found.
deleting cache /dev/null
[root@crystal GiNaC-1.0.3]#
Aaargh!!! It was GiNaC configuration erasing /dev/null!
Yeah, right, there is no need to run `configure' while
being root. However, I feel in this case the price that
had to be payed was a bit too high. That is why I propose
the following patch is applied to `acinclude.m4':
if `cache_file' is `/dev/null' do not delete it.
All the best,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara@cs.unipr.it
diff -rcp GiNaC-1.0.3.orig/acinclude.m4 GiNaC-1.0.3/acinclude.m4
*** GiNaC-1.0.3.orig/acinclude.m4 Tue Nov 20 18:42:05 2001
--- GiNaC-1.0.3/acinclude.m4 Tue Jan 15 09:56:33 2002
*************** if test "x${ginac_error}" = "xyes"; then
*** 86,93 ****
if test "x${ginac_warning_txt}" != "x"; then
echo "${ginac_warning_txt}"
fi
! echo "deleting cache ${cache_file}"
! rm -f $cache_file
else
if test x$ginac_warning = xyes; then
echo "=== The following minor problems have been detected by configure."
--- 86,95 ----
if test "x${ginac_warning_txt}" != "x"; then
echo "${ginac_warning_txt}"
fi
! if test "x$cache_file" != "x/dev/null"
! echo "deleting cache ${cache_file}"
! rm -f $cache_file
! fi
else
if test x$ginac_warning = xyes; then
echo "=== The following minor problems have been detected by configure."
CVSROOT: /cvs/purrs
Module name: purrs
Changes by: roberto(a)cs.unipr.it 2002-01-14 19:15:20
Modified files:
doc : purrs.tex
Log message:
Changes from Alessandro:
1. Added some new references
2. Added hyperlinks
3. Improved LaTeX (hopefully)
4. Given definition of squarefree decomposition
5. Improved English
6. Made notation more uniform
7. Moved examples to where they belong
8. Added more examples of special cases, especially
in Section 2.1.2
9. Fixed minor errors, both in Maths and in TeX
10. Added the proof of the third summation formula in
Section 4.4.3, with a more explicit bound for the error
11. Completed section on the solution of the equation
of degree 3 (notation consistent with code)
12. Added paragraph on the generating function,
with two fully worked-out examples
13. Added example at the end of Section 2.1.4 that
shows how to "guess" the particular solution of
a non-homogeneous second order recurrence in a
more general case than before
14. Added/removed/translated comments here and there
15. Inserted spaces in some formulas for easier
readability, and reshaped some (though not all)
paragraphs to comply with Roberto's request of
short lines
Patches:
http://www.cs.unipr.it/cgi-bin/cvsweb.cgi/purrs/doc/purrs.tex.diff?cvsroot=…
CVSROOT: /cvs/purrs
Module name: purrs
Changes by: roberto(a)cs.unipr.it 2002-01-13 11:58:54
Modified files:
src : rr_solver.cc
Log message:
Allow subexpressions of the form `e(n)' with `n' numeric
in the inhomogeneous term of LRFOCCs.
Patches:
http://www.cs.unipr.it/cgi-bin/cvsweb.cgi/purrs/src/rr_solver.cc.diff?cvsro…