Mathematica and Free Software

This is a re-post of Jordi G. H.’s article he wrote back in 2007 on everything2. For easier reading, I have put it into a PDF file. I agree with his opinion entirely, and just as strongly. I am showing it here because I connected well with what he said. I think things concerning mathematicians’ view of software and rigor need to change. It is a very good essay with personality.

Read his essay, and the following snips of context will be understood.

Mathematica. Seeing the name plastered as I did yesterday in CIMAT gave me a very unpleasant feeling. Of the three big software M’s that we use in our milieu, the other two being of course Matlab and Maple, Mathematica is the worst from the point of view of scientific freedom. Backed by the egotistical megalomania of Stephen Wolfram (who has read his book?), Mathematica does not reveal a single line of its source code, or at least it didn’t reveal it in previous versions; I very much doubt that version 6 which we saw yesterday does. And this is what we call mathematics, according to Wolfram.

Mathematica is at version 7 at the time of writing, seemingly on the verge of version 8, and there is yet to be any release of source code. As an aside, while Maple does not give the source code to its kernel, it does give some source code for functions that were written in Maple itself, sans any comments or documentation.

Setting aside the debate whether mathematics in general is a science or not, I think it’s fair to say that at least experimental mathematics like the kind that software such as Mathematica purports to promote is science, and therefore should adhere to the traditional scientific criteria in other disciplines. That is, a Mathematica result should be independently reproducible, should be describable in its entirety, and should be available for scrutiny by the rest of the scientific community for which it may be relevant.

The emphasis is mine here.

I think few will disagree that in a perfect world, we would analyze to our heart’s content everything up until the last byte of source code of any software if we so wished. Nevertheless, I’m also sure that very few of us have the conviction to believe in this perfect world to the degree of not using Mathematica or try to use free software.

This is an important thing to note. I liken this to health and medicine. Just because a hospital exists and is nearby to oneself doesn’t mean he or she will go to the hospital at all. Just because source code is available, doesn’t mean everyone will read it and scrutinize it. But the availability is required for times when the source is needed, i.e., for a formal proof or understanding of how something works.

However, I value my scientific integrity too much to sign this pact. It terrifies me to know that I’ll be deemed a lunatic and that almost nobody else values this freedom in the same way.

Understand him carefully. While it seems only a tiny bit of freedom is given up when using Mathematica or similar, one is really giving up much more. To mathematicians and scientists for whom the software was designed, there isn’t a single ounce of academic integrity in using Mathematica for actual mathematical work. You can’t give a proof without a logical argument. Saying “Mathematica computes $\int x^2\,\mathrm{d}x$ as $x^3/3$, and …” does not count as a logical argument. But you say, “well, I can use this as a hypothesis and then prove the result!” Sure, you can, this is one of the essences of so-called experimental mathematics, however, wouldn’t it be great if the source code was verified via peer evaluation so you could say “Mathematica gives this result. QED.” Also see Jordi’s comment below on Fermat’s last theorem.

I want to say that obtaining source code is only the first step. In order for a software package to satisfy the requirements of free scientific collaboration, besides source code we also need the legal freedom to share this code with our colleagues, to use it for any purpose, and to modify it if it were necessary.

This is in the spirit of science and academia. We don’t say “you can’t reproduce or modify this experiment, and if you do, we will press charges.” Rather, the modification is desired. It can lead to new results and discoveries.

Today there are many very good free software mathematical packages with various objectives and sophistication. Amongst them we find,

  • Maxima for general symbolic calculations
  • Axiom is another system for general symbolic computations, and it is very fast and powerful, though it lacks a good interface,
  • SymPy for general symbolic computations as a clean extension, or library rather, to the Python programming language; this would be especially nice for those who use Python a good deal, or those who perhaps want to learn some computer algebra without learning a new language;
  • GNU Octave as a computational language highly compatible with Matlab
  • GAP for group theory,
  • Singular for algebraic geometry and polynomial calculations,
  • Pari/GP for number theory,
  • SAGE for general purposes and as an interface to the other packages mentioned above,
  • (La)TeX (specifically TeXLive or MiKTeX) for mathematical authoring, or a WYSIWYG approach with TeXmacs, or a pseudo-WYSIWYG approach with LyX;
  • PGF/TikZ or Asymptote for precise mathematical diagrams for use with LaTeX;
  • R for statistical calculations and visualizations; and
  • GNU/Linux for an all-purpose operating system to run all of these software packages very easily.

and there are many others. These programs are at various stages of development, where SAGE is probably the most promising opponent for the three big M’s.

First, the items in bold are my own additions to the list. Second, I somewhat disagree with SAGE being the most promising opponent to the three big M’s. While it is a good and ambitious project, I do not think it is the cleanest way to compete with the there big M’s. SAGE is essentially an interface to a bunch of systems in an autonomous fashion. This means there’s lots of room for breaking and lots of dependencies. Moreover it is built atop a language I don’t think is suited for mathematics: Python. However, as an interface, I think SAGE is a very good project. The web interface and crisp and fun to use, and makes computer algebra accessible everywhere.

I offer these examples in order to support the idea that there is no reason why we can’t expect as much quality and functionality from free software as we see in proprietary software. At least in in some areas, free software has already achieved this goal, as is the case with R for those who do statistics. We are no longer working in an idealistic vacuum. Free software is a viable alternative, and we should be working towards it.

In fact, Maxima was based on Macsyma, a commercial algebra system still sold today by Symbolics. It was one of the most advanced algebra systems written in part by many of the greats of computing, and developed by the company essentially which I dedicate this site to. As such, although Macsyma is old (and Maxima carries some of the older remains of DOE-MACSYMA, like LISP CODE THAT SHOUTS AT YOU), it does math well, and pioneered many things in computer algebra. Actually, one of the reasons Maple and Mathematica were made was because they, the original authors, wanted “efficient” systems written in a portable language that didn’t require expensive Symbolics LISP-machines.

Something that’s very sad is that there are so many people contributing code to the three big M’s who are not employees of the companies who make this software, but ordinary mathematicians who have some interesting in programming and who give back some code to the community. It’s lamentable that this indicates we have the necessary geekforce for creating our own code, but we’re distributing it in a non-free manner. Let us remember that at least Maple and Matlab begun and still are for the most part the work of many grad students eager to generate more content for their theses. How could our mathematical software landscape be today if all these students and all these volunteers instead were collaborating with free software? You will say I’m a dreamer, but this is what I want to see some day. I am collaborating myself with QtOctave, a GUI in development for Octave, and I’m its Debian maintainer.

The emphasis is mine. To this day, Jordi still works on (Qt)Octave, three years after this article was written. He says he is an “enthusiastic, irregular maintainer”. He is currently working on kwantix, a partial differential equations solver using radial basis functions and domain decomposition methods.

That is all of the commentary I have concerning his essay.

For those interested in more information related to Mathematica or Stephen Wolfram or his other projects, be sure to check out these links:

  • A review of Wolfram’s book A New Kind of Science, entitled A Rare Blend of Monster Raving Egomania and Utter Batshit Insanity.
  • A bit on the novelty, or lack thereof, of Wolfram’s ideas: A 35-Year Old Kind of Science.
  • Wolfram taking legal action for the announcement and description of a mathematical proof: a note.
  • Why you shouldn’t care about Mathematica’s internals, according to Wolfram Research.
  • A quote from this page on how Mathematica uses algorithms created or at least modified for Mathematica exclusively, hinting that they are unknown to the rest of the world: “Some of these algorithms are fairly old, but the vast majority had to be created or at least modified specifically for Mathematica.” There are actually many other examples of this where Wolfram Research or Stephen Wolfram himself have said that Mathematica has many novel algorithms built in created by mathematicians at Wolfram Research.
  • A review of Mathematica by Richard Fateman. Although this reviews Mathematica from 1992, it is still largely accurate. A more up-to-date review in 2009 using Fateman’s paper as a guide (i.e., checking the validity of the 1992 review in 2009).

Now, for obligatory self-promotion of (currently) vaporware: Doron, the system I’ve mentioned I’m designing, is supposed to address the issue of having a complete, powerful, up-to-date system for doing mathematics. It starts from scratch (something decided after a good while of debate), and really intends to be the “next generation” of computer algebra. That is it for now.

9 comments to Mathematica and Free Software

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Before you post, please prove you are sentient.

What is 2 times 8?