Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Math

Open Source Math 352

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.'""
This discussion has been archived. No new comments can be posted.

Open Source Math

Comments Filter:
  • Re:Not Proven (Score:5, Informative)

    by ciaohound ( 118419 ) on Sunday November 18, 2007 @12:43PM (#21398251)
    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.
  • by nwbvt ( 768631 ) on Sunday November 18, 2007 @12:52PM (#21398323)
    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.
  • by StormReaver ( 59959 ) on Sunday November 18, 2007 @01:01PM (#21398401)
    "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.
  • by Anonymous Coward on Sunday November 18, 2007 @01:06PM (#21398435)
    An alternative to the covenant is congressional action or a court ruling that says with absolute clarity that mathematical research is exempt from math-related patents directly related to the research.

    Research is already exempt [wikipedia.org] from patent infringement. The "OMG, yuo cant do research because of teh patents!!!!" stuff you read here is pure fearmongering.

  • by 1u3hr ( 530656 ) on Sunday November 18, 2007 @01:13PM (#21398507)
    The article (which is actually a PDF, thanks for the warning) uses proprietary fonts (LucidaBright). While it was typeset with TeX (open), only the PDF (closed and uneditable) is provided.

    I think (hope) you're joking, but several people who responded seem to be taking this at face value. It's wrong in several ways. PDF is an open format, and if you look at the file info, you see that this particular PDF was generated with Ghostscript. And it's quite simple to edit PDFs. Not as easy as, say HTML, but much easier than if it were, say, a TIFF file. I personally use Adobe Acrobat, but a great many free and commercial apps can read, write, and manipulate PDF files. That's why the format was created, for use in DTP, not a locked document format as some business people seem to imagine.

  • by flajann ( 658201 ) <fred.mitchell@g m x .de> on Sunday November 18, 2007 @01:13PM (#21398509) Homepage Journal
    The advantage of having the source code is that, in a lengthy proof that involves thousands of steps that may be hard to follow, one may have an easier go at proving that the software did the steps correctly. At least, if a bug were found that would save you many hours over sweating over the actual proof!!!

  • by El_Isma ( 979791 ) on Sunday November 18, 2007 @01:17PM (#21398549) Homepage
    Let me recommmend you Maxima http://maxima.sourceforge.net/ [sourceforge.net]
    It's a GPL Computer Algebra System and it's in active development. I use it all the time.
  • by DrYak ( 748999 ) on Sunday November 18, 2007 @01:30PM (#21398637) Homepage
    We may also mention Coq [wikipedia.org], a proof assistant wich is available under LGPL and runs on OCaml (which in turn is also open sourced and available on Linux).

    This is a tool that can help mathematician prove their theorems.
    It was notably being used in the proof of the four color theorem [wikipedia.org], as mentioned on /. [slashdot.org] (article about machine assisted proofs).
  • Re:PDF rant. (Score:3, Informative)

    by serviscope_minor ( 664417 ) on Sunday November 18, 2007 @01:32PM (#21398649) Journal
    I would like a warning because I usually don't click on links to PDFs unless I really need the info. Not because it's proprietary or whatever, they just take a long time to load, and if it's a big one, my browser hangs while it's rendering.

    Then get a better PDF reader. Even on a very slow computer, xpdf or ghostview have subsecond load times. If you use mozilla related browsers, then plugger will let you "embed" decent PDF readers. In fact if you install mozplugger under Ubuntu, it uses evince by default. If you don't use mozilla, then set it up to use $viewer as an external helper application.

    My guess is that your bias against PDF comes from the awful Adobe viewer.
  • by jelle ( 14827 ) on Sunday November 18, 2007 @01:42PM (#21398737) Homepage
    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.

  • by ClarkEvans ( 102211 ) on Sunday November 18, 2007 @01:43PM (#21398745) Homepage
    http://metamath.org/ [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
  • by jrminter ( 1123885 ) on Sunday November 18, 2007 @01:54PM (#21398827)
    In addition to octave and maxima, there is sage. [sagemath.org] I have been impressed.
  • by William Stein ( 259724 ) <wstein@gmail.com> on Sunday November 18, 2007 @01:56PM (#21398837) Homepage
    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.

    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] ... and (using [Mathematica|Magma|...]) we deduce that [...].

    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 ..." 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/ [sagemath.org]). And sometimes exactly that is necessary to go beyond what has already been done, i.e., to do research.

      -- William Stein
  • by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Sunday November 18, 2007 @01:57PM (#21398841) Homepage Journal

    >>> 1.00 - 0.01
    0.98999999999999999

    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:

    1. Floats can only store exact values for the fractional part when the denominator is a power of 2. The "100" in "1/100" isn't a power of two, so IEEE 754 cannot represent it perfectly.
    2. .999999999... == 1, so the answer is still correct.
    3. If you must have exact answers, use the Decimal type:

      >>> 1 - decimal.Decimal(".01")
      Decimal("0.99")
  • Sage (Score:3, Informative)

    by Anonymous Coward on Sunday November 18, 2007 @02:00PM (#21398859)
    Sage( http://www.sagemath.org/ [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/ [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/ [sagemath.org] .

    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.
  • by fredrikj ( 629833 ) on Sunday November 18, 2007 @02:05PM (#21398895) Homepage
    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 [sun.com].
  • seriously, wtf? (Score:5, Informative)

    by tetromino ( 807969 ) on Sunday November 18, 2007 @02:13PM (#21398929)

    The article (which is actually a PDF, thanks for the warning) uses proprietary fonts (LucidaBright). While it was typeset with TeX (open), only the PDF (closed and uneditable) is provided.
    Oh, where to begin...
    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 [adobe.com], 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 [petricek.net]. 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.
  • by Ed Pegg ( 613755 ) * <ed@mathpuzzle.com> on Sunday November 18, 2007 @02:43PM (#21399155) Homepage
    Much of the guts of Mathematica -- the high level functions -- are available for perusal at http://functions.wolfram.com/ [wolfram.com] Much of the reason why Mathematica works so well is due to careful consideration of branch cuts.

    For example, what is Log[a b]? If you look in almost any math book, you'll find Log[a b] = Log[a] + Log[b]. That works fine most of the time, but tends to fail in devastating ways when combined with other functions. The open source programs tend to follow this "good enough" approach.

    Log[a*b] == Log[a] + Log[b] + 2*I*Pi*Floor[(Pi-Arg[a]-Arg[b])/(2*Pi)]
    is the very careful way to handle the log function.

    http://functions.wolfram.com/ElementaryFunctions/Log/16/04/0005/ [wolfram.com]
  • by Garridan ( 597129 ) on Sunday November 18, 2007 @02:56PM (#21399265)
    Disclaimer: I'm a Sage developer.

    Sage has a very good solution to this: Cython [cython.org]. 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.
  • by GrievousMistake ( 880829 ) on Sunday November 18, 2007 @04:17PM (#21399969)
    I don't suppose Ruby has something comparable to SciPy and IPython?
    Also, I want to avoid a language discussion, but a lot of languages have some form of iterators, even if the syntax varies slightly. Even Java kind of got them now.
    In Python:
    for key, value in mydict.iterkeys():
        print '%s: %s' % (key, value)

    with file('somefile.txt', 'r') as f:
        for line in f:
            print line
  • by Cowculator ( 513725 ) on Sunday November 18, 2007 @05:37PM (#21400661) Homepage
    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 [ams.org] for [berkeley.edu] years [ams.org] (more links here [umd.edu]) about overpriced journals, and entire editorial boards of some journals have resigned in protest (see a list of mass resignations and similar changes here [ucsb.edu]). There are now plenty of entirely free journals in combinatorics [combinatorics.org], topology [www.emis.de], and other fields, and pretty much everything that gets published these days is either available on the author's website or on the arXiv [arxiv.org].

    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 [mit.edu] site. You complain that EGA is out of print, but basically everything Grothendieck wrote is available for free [jussieu.fr], and you can even get them along with tons of other old French publications through NUMDAM [numdam.org]. (There's even a project to transcribe SGA [leidenuniv.nl] into LaTeX.) Lots of other books are free to download legally [gatech.edu] (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.
  • by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Sunday November 18, 2007 @06:21PM (#21401027) Homepage Journal

    Actually, dict.iterkeys() returns an iterator of that dict's keys alone. You wanted:

    for key, value in mydict: print '%s: %s' % (key, value)

    or even just:

    for item in mydict.iteritems(): print '%s: %s' % item
  • by mosel-saar-ruwer ( 732341 ) on Sunday November 18, 2007 @06:32PM (#21401115)

    The books in the Princeton Library are free, thanks to the generousity of far-seeing individuals who realised that their money was better spent on a library than a new yacht.

    One other thing: The libraries at Princeton are most decidedly NOT free:

    http://library.princeton.edu/about/access-firestone.php [princeton.edu]
    http://library.princeton.edu/about/access-branch.php [princeton.edu]

    To gain admittance, you need to pony up $33,000 in tuition and $11,000 in room and board.

    Each year.

  • by ndru82 ( 1043778 ) on Sunday November 18, 2007 @08:35PM (#21402001)
    It's called Math You Can't Use - by Ben Klemens. Makes a bunch of great points in favor of open source, too.
  • by fredrikj ( 629833 ) on Monday November 19, 2007 @04:19AM (#21404839) Homepage
    cripple itself with IEEE-754 standards needlessly

    The IEEE 754 standard is very well designed and ensures floating-point arithmetic to be accurate, efficient, and compatible across platforms.

    But it does mean that when there is a precise answer and it is calculatable (I think the former demands the latter), that I do minimally want Python to store it fully in memory and to not print out questionable and/or incorrect answers.

    So you'd be happy if Python generates an exact answer when you ask it to compute 1 + 1e-100000 and it allocates several kilobytes of memory to represent the result? Would you still be happy with this behavior if you are doing a numerical computation involving a million numbers? Exact rational arithmetic is, in general, much slower than floating-point arithmetic, and the cost grows the more operations you perform.
  • by khallow ( 566160 ) on Monday November 19, 2007 @08:30AM (#21406085)

    The AMS isn't worried about the correctness of these "proofs." They aren't proofs. It is logically possible for one of these programs to return the wrong answer, even if the program is correctly implemented. Ergo, it is not a proof.
    That is incorrect. Even with normal proofs, it is possible to return the wrong answer, and frankly computer proofs scale better than strictly human-based ones do. So I think it's quite reason to call them "proofs".

"No matter where you go, there you are..." -- Buckaroo Banzai

Working...