PySymbolic - Doing Symbolics in Python

by Pearu Peterson


PySymbolic provides a tool for doing elementary symbolic calculations in Python.

Project status


The kernel part of PySymbolic ( is almost complete. It uses very fast GMP arbitrary precision integers/rational numbers and multi-precision floats for Number instances. (Initial tests show that PySymbolic will be faster than any other symbolic package, e.g. see the test-site of MPFR). TODO for the kernel: implement Function class, more elementary functions, evaluation of functions, finish complex numbers, finish parser.

After the PySymbolic kernel is finished, we can start to implement extensions. They should cover the following topics:

This is simple, done many times and will do again when kernel provides the Function class
This is not simple. Need a criterion for the notion of "simplicity". And such that it can be effectively implemented. Suggestions/links are welcome!
Factorization of polynomials is desired. For that we need Gröbner basis implementation. I have many references for that, both theory and implementations, but it seems that it we need to implement it directly in Python. NTL should be used for factoring uni-variate polynomials over integers (need volunteers for wrapping NTL to Python!). See also GROEBNER that is free C library.
Linear Algebra
Implement Matrix,Vector,Tensor classes. Symbolically calculate determinants, inverse matrices, various decompositions (QR, SVD, etc), solve eigenvalue problems,etc. Theory is simple, just need lots of code. Contributions are welcome!
Theory is complex but I have references to algorithms. So, it just needs implementation.
It is involved topic but I have references to algorithms.
Both finite and infinite (series). Implement hyper-geometric functions.
Asymptotic tools
Taylor,Laurent,etc series. O symbol.
Solve equations. Roots.
Linear equations are "simple". Also polynomial equations --- use Gröbner basis stuff.
Implement Set class in kernel (or in C for efficiency). It might be useful also for other extensions.
Write Symbolic expressions in Latex,XML,MathML. And vice versa.
Special functions
Symbolic manipulation with them, evaluation, simplification.


You'll need
  1. Python 2.0
  2. GMPY
  3. --- the GNU MP-3 interface to Python. Thanks to Alex Martelli!
  4. (MPFR
  5. --- we are working on it)

Mailing list

There is a mailing list pysymbolic-users available for the users of the pysymbolic program and it is open for discussion, questions, and answers. You can subscribe the list here.


Snapshots of the pre-release (obsolete, get it directly from CVS):

CVS Repository

pysymbolic is being developed under CVS and those who are interested in the really latest version of pysymbolic (possibly unstable) can get it from the repository as follows:
  1. First you need to login (the password is guest):
    > cvs -d login
  2. and then do the checkout:
    > cvs -z6 -d checkout pysymbolic
  3. In the directory pysymbolic you can get the updates by hitting
    > cvs -z6 update -P -d
You can browse pysymbolic CVS repository here.
Valid HTML 4.0! Pearu Peterson <>
Viimati muudetud: Aug 14 12:31:15 EEST 2001
Submit this page for validation