Sunday, December 23, 2007

CAS and Python

I've been somewhat interested in CAS (Computer Algebra System) ever since I used Mathematica for a year while doing TA work for Lorne Nelson. Now, of course, there are some open source CAS programs you can use.

Sage
Sage looks quite interesting:
Use SAGE for studying a huge range of mathematics, including algebra, calculus, elementary to very advanced number theory, cryptography, numerical computation, commutative algebra, group theory, combinatorics, graph theory, and exact linear algebra.
[...]
SAGE makes it easy for you to use most mathematics software together. SAGE includes interfaces to Magma, Maple, Mathematica, MATLAB, and MuPAD, and the free programs Axiom, GAP, GP/PARI, Macaulay2, Maxima, Octave, and Singular.
[...] With the SAGE notebook you can create embedded graphics, beautifully typeset mathematical expressions, add and delete input, and start up and interrupt multiple calculations.
Sage uses Python and allows you to access other CAS systems if they are installed. I think the motivation behind Sage was to allow provably correct results since all the code is open. Using Mathematica, say, is closed source, so how can you prove that the result that Mathematica gave is correct?

SymPy
SymPy not to be confused with (SimPy or even simpy.com) is also quite neat, and perhaps a little simpler to use. It's written in pure Python, so it's very portable but not as fast as implementations written in C++, say. You can also run SymPy from within Sage if so desired.

No comments: