Open Source Math
An anonymous reader writes "The American Mathematical society has an opinion piece about open source software vs propietary software used in mathematics. From the article : "Increasingly, proprietary software and the algorithms used are an essential part of mathematical proofs. To quote J. Neubüser, 'with this situation two of the most basic rules of conduct in mathematics are violated: In mathematics information is passed on free of charge and everything is laid open for checking.'""
As a high school math teacher, I am familiar with some of the details of Thomas Hales' proof of Kepler's "Cannonball" Conjecture, concerning the most efficient way to stack spheres. When he first published his proof in 1996, he included the source code for the programs that were used to do the calculations for the thousands of possible sphere configurations. I think most of the code was actually written by his graduate assistant. At first that struck me as cheating -- "... and then this program runs. Q.E.D." -- but then I realized that if anyone else was to verify his results, they would need the programs. There are just too many calculations to perform without software, which is why the conjecture went unproven for four hundred years. But without the source code, it would smack of charlatanism.
Oh, yeah, it's not easy to pad these out to 120 characters.
I used Python fairly extensively in my number theory course back in college, it did the job fairly well. Its support for large integers was especially important for that class. And the fact that it was very familiar to me (I was a double major in CS and math), it was very easy for me to crank out an algorithm in it. However, most of the book's examples were in Mathematica, which I ended up getting as well. It was a neat tool, but now that my student license has expired and I don't feel like spending a few grand on another license, everything I wrote in that is useless. However I can still pull out my old Python programs and see what it was I was doing.
Mathematics is made of 50 percent formulas, 50 percent proofs, and 50 percent imagination.
"While it was typeset with TeX (open), only the PDF (closed and uneditable) is provided."
PDF is neither closed nor uneditable. Adobe publishes the complete PDF format for anyone to use free of charge. It may not be FSF Free (since Adobe requires that implementers adhere to certain rules that violate the principle of Free), but it's definitely not closed. Also, KWord will import it for further editing, text and images, so it's not uneditable (even if it's not ideal).
I agree with your main point, but let's cut PDF some slack.
Let me recommmend you Maxima http://maxima.sourceforge.net/
It's a GPL Computer Algebra System and it's in active development. I use it all the time.
We may also mention Coq, a proof assistant wich is available under LGPL and runs on OCaml (which in turn is also open sourced and available on Linux).
/. (article about machine assisted proofs).
This is a tool that can help mathematician prove their theorems.
It was notably being used in the proof of the four color theorem, as mentioned on
"Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
From your description, it sound as if you found that the code returned different results at different optimization settings for the compiler, but did not pinpoint what instruction sequence exactly caused the difference.
Unless you were using an experimental compiler, that usually means a bug in the code, not a bug in the compiler. Run the code with valgrind, you'll probably find out-of-bound addressing, or uninitialized reads (the signs of the problem being in the code, not the compiler)... Or if you use threads, it can also be in your locks...
The reason for that is that such code bugs often result in different code execution at different compiler optimization settings.
--- Hindsight is 20/20, but walking backwards is not the answer.
http://metamath.org/ has been around for 15 years or so; it has a very nice text-based proof expression, a huge library of existing proofs and a graphical visualization tool
In addition to octave and maxima, there is sage. I have been impressed.
The AMS did not write that article. I wrote the article as an opinion piece and the AMS published it. They do not necessarily agree with the points made in the article.
... and (using [Mathematica|Magma|...]) we deduce that [...].
..." this gets very very frustrating, since one just hits a brick wall. And, in practice, reimplementing -- with enough optimization to make it useful for research -- just one or two key functions from Mathematica or Magma, can take literally years of work (in fact, that's exactly what I've been doing the last few years with http://sagemath.org/). And sometimes exactly that is necessary to go beyond what has already been done, i.e., to do research.
By the way, the article is not about formal automated proofs. It is about what is now standard procedure in mathematical research, namely proofs that look like this:
[Formal mathematical argument]
It's incredibly common right now when reading published mathematical papers to see random citations to using closed source software to do key steps of calculations. Usually even the code used to get the closed source program to yield the result isn't given.
The way many mathematicians read proofs is that they often basically skim the argument to get a general idea of what it is about. Then they decide they want to prove something similar or related, and they "dive" into the most refined details of some key part of the argument. When a part of the argument is "... using Mathematica we deduce
-- William Stein
I'm too lazy to see if that's the IEEE 754 result or not (but I suspect it is). But three things in Python's defense:
Dewey, what part of this looks like authorities should be involved?
Sage( http://www.sagemath.org/ ) is currently the most full=featured open-source computer algebra system. It is being developed by the two authors of the AMS opinion piece (and many others including myself). Our goal is to provide a free, viable, open-source alternative to Mathematica, Maple, MATLAB, and Magma. Some nice features of Sage include:
* It uses Python as its programming language so that you can use any existing Python modules with your Sage programs.
* Sage also includes Cython ( http://www.cython.org/ ) which is based on Pyrex and allows one to easily compile Python code down to C for speed.
* Sage's notebook interface with also interface with pretty much every existing computer algebra system, open-source or not.
* Sage includes Maxima, GAP, Scipy, Numpy, and many other open source math packages.
* A very active developer community. If there is something that you need Sage to do, chances are that there will be a number of developers willing to help you out.
For some screenshots, see http://www.sagemath.org/screen_shots/ .
One of the things that Sage needs most now is more users. So, if you have an interest in open source math software, definitely check out Sage.
Python calculated exactly what its documentation says it will do: ((1 minus the IEEE-754 double closest to 1/100) rounded to the nearest IEEE-754 double). It's not Python's fault if you don't know the basics of floating-point arithmetic. Mathematicians who use or write numerical software do.
I recommend reading What Every Computer Scientist Should Know About Floating-Point Arithmetic.
1. The only reason you would need a "PDF warning" is that you use an operating system with poor support for the format (i.e. Windows). Switching to a real OS, among other benefits, will make reading math papers (which are almost always in PDF format) a pleasure.
2. PDF is an open standard, which has been implemented by many different parties: Adobe and Apple have closed-source implementations; freedesktop.org's poppler and cairo libraries are Free software.
3. The fontface chosen by AMS is orthogonal to the content of the paper - you can easily copy-paste the text and use Computer Modern, Dejavu, Liberation or any other open-source font of your choice. Why would a proprietary font embedded in a PDF file bother you any more than the proprietary fontface of a book?
4. First of all, PDF is editable. And second, why would you want to edit this particular document? Remember, it's copyrighted by AMS - if you can't prove fair use, you do not have the right to distribute a modified version.
Disclaimer: I'm a Sage developer.
Sage has a very good solution to this: Cython. It's a very easy language, almost identitical to Python, which can be used to bind C to Python (for instance, we use GMP and GSL extensively through Cython) as well as compile Python-like code to C, which can be accessed by Python & vice verse. It's very intuitive, and very fast.
There's a growing trend in math (and maybe other disciplines, for all I know) away from non-free publishing.
Prominent mathematicians have been complaining for years (more links here) about overpriced journals, and entire editorial boards of some journals have resigned in protest (see a list of mass resignations and similar changes here). There are now plenty of entirely free journals in combinatorics, topology, and other fields, and pretty much everything that gets published these days is either available on the author's website or on the arXiv.
So modern research tends to be free, but what about all the books you need to read before you understand this research? Sure, a copy of Rudin may be expensive and there's not much we can do about that, but maybe you can learn from the free analysis course notes at MIT's OCW site. You complain that EGA is out of print, but basically everything Grothendieck wrote is available for free, and you can even get them along with tons of other old French publications through NUMDAM. (There's even a project to transcribe SGA into LaTeX.) Lots of other books are free to download legally (and this is by no means a complete list), even though many are commercially published as well.
Finally, you can complain all you want about university tuition, but I really doubt that free tuition is going to open up mathematics to the masses. Ultimately the very top students who can't afford it are getting scholarships and grants to cover their education (and I do know some people who got free rides at Princeton because they couldn't afford it -- that school is definitely more generous than most), and since most other people couldn't get into Princeton anyway the tuition is never even an issue for them. The best way to make mathematics more accessible is to give everyone access to free textbooks and current research, and the "marxist university professors" you deride have been gradually moving in that direction for years now.
By the way, what do you think has been done to damage the Princeton math department's reputation? Whatever you think Shapiro and Tilghman have done to the university, nobody in their right mind would deny that it's one of the top few in the world and I doubt most people would openly proclaim any one department to be the best anyway.
Actually, dict.iterkeys() returns an iterator of that dict's keys alone. You wanted:
or even just:
Dewey, what part of this looks like authorities should be involved?
It's called Math You Can't Use - by Ben Klemens. Makes a bunch of great points in favor of open source, too.