ANNOUNCE: PySymbolic - Doing Symbolics in Python

Victor S. Miller victor at idaccr.org
Wed Oct 11 15:05:33 EDT 2000


>>>>> "Pearu" == Pearu Peterson <pearu at ioc.ee> writes:

Pearu> Thanks for the references.  I have taken a very quick look over
Pearu> both packages and I think they both are very nice and profound
Pearu> works.  But I am not sure that they are what we (at least I)
Pearu> are looking for: It seems to me that a major part of these
Pearu> packages is about defining various types such as
Pearu> Numbers,Matrices,Polynomials etc, implementing corresponding
Pearu> operations and other useful methods.  Sure, these are basic
Pearu> stuff for CAS (computer algebra system) but I think it is
Pearu> easier to implement all these directly in Python (or in Python
Pearu> C/API level)

Pearu> rather than just interfacing them - I mean that creating an
Pearu> interface to a library makes sense only if it provides large
Pearu> number of useful algorithms and not mainly objects.

Pearu> May be I should state what I am looking in a "Pythonic"
Pearu> CAS. Just few basic needs: 1) Differentiation (this can be done
Pearu> easily in Python level - I have done it once) 2) Factorization
Pearu> (it is not so easy, but for univariate polynomials the
Pearu> algorithms are available; though I am very interested in
Pearu> multivariate polynomials) 3) Integration (not just for
Pearu> polynomials; I have heard that it is a quite difficult task) 4)
Pearu> All above in symbolic! And then transparently going over to
Pearu> Numeric for doing crunching.

Pearu> "Victor S. Miller" wrote:

>> Pearu, There are two very mature and quite excellent libraries for
>> doing symbolic calculation.  Both are available with the GPL.  The
>> first (and oldest) is Pari (see http://www.parigp-home.de).  Pari
>> was originally intended to be a comprehensive C library for
>> symbolic

>> The second (and newer) is LiDIA from University of Darmstadt
>> (http://www.informatik.tu-darmstadt.de/TI/LiDIA/).  It's free for
>> non-commercial use.  It's written in C++.  It has pretty much the
>> same capabilities as gp (plus some more).  It would also be much
>> easier to

Pearu> Thanks, Pearu

Pearu, One of the nice things about these packages (especially LiDIA)
is that the dependency relation between the pieces doesn't involve
bringing in the whole library.  I think that for what you want not
very much of the library is brought in.  Factorization algorithms for
polynomials (even for univariate) tend to be rather subtle in practice
(you might be able to tell that I've worked in this field for many
years), and I was just trying to keep you from having to reinvent a
rather substantial wheel.

Another package that you should look at is Victor Shoup's NTL (a
library for doing Number Theory http://www.shoup.net/ntl/.  It is very
well engineered (i.e. very fast) and to quote from the blurb:

NTL is a high-performance, portable C++ library providing data
structures and algorithms for manipulating signed, arbitrary length
integers, and for vectors, matrices, and polynomials over the integers
and over finite fields.

It's also available under GPL.

        Victor
-- 
Victor S. Miller     | " ... Meanwhile, those of us who can compute can hardly
victor at idaccr.org    | be expected to keep writing papers saying 'I can do the
CCR, Princeton, NJ   | following useless calculation in 2 seconds', and indeed
    08540 USA        | what editor would publish them?"  -- Oliver Atkin



More information about the Python-list mailing list