12.07.2015 Views

SAGE: Software for Algebra and Geometry Experimentation

SAGE: Software for Algebra and Geometry Experimentation

SAGE: Software for Algebra and Geometry Experimentation

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status Report<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong><strong>Experimentation</strong>William SteinAugust 14, 2006William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


OutlineWhat is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status Report1 What is <strong>SAGE</strong>?2 Technology Overview3 History <strong>and</strong> Status ReportWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


The GOALWhat is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportGOAL: Create the best available software <strong>for</strong>algebraic <strong>and</strong> geometric computation.And give it away to everybody <strong>for</strong> free.William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


Open SourceWhat is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status Report1With <strong>SAGE</strong> everything is open source <strong>and</strong> thesystem is setup to strongly encourage looking at code.2Most serious users of <strong>SAGE</strong> are programmers, sothey underst<strong>and</strong> <strong>and</strong> benefit from having access tocomplete source code.3Anecdotes...William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


Linus QuoteWhat is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status Report’’I think, fundamentally, open source does tendto be more stable software. It’s the right wayto do things. I compare it to science vs.witchcraft. In science, the whole systembuilds on people looking at other people’sresults <strong>and</strong> building on top of them. Inwitchcraft, somebody had a small secret <strong>and</strong>guarded it -- but never allowed others toreally underst<strong>and</strong> it <strong>and</strong> build on it.Traditional software is like witchcraft. Inhistory, witchcraft just died out. The samewill happen in software.’’ -- Linus TorvaldsWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportWho is Writing <strong>SAGE</strong>?Professors, Postdocs, Graduate students, Undergraduates,High school teachers, Retired tech workers, <strong>and</strong> YOU.Contributors Include: Tom Boothby, Robert Bradshaw, DavidHarvey, Craig Citro, Bobby Moretti, Emily Kirkman, Yi Qiang, JoshKantor, David Kohel, David Joyner, Iftikhar Burhanuddin, JohnCremona, Martin Albrecht, Wilson Cheung, Alex Clemesha, DougCutrell, Didier Deshommes, Naqi Jaffery, Kiran Kedlaya, David Roe,David Kirkby, Jon Hanke, Gregg Musiker, Kyle Schalm, Steven Sivek,Jaap Spies, Gonzalo Tornaria, Justin Walker, Mark Watkins, JoeWeening, Joe WetherellWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportBig Iron: http://sage.math.washington.eduThe <strong>SAGE</strong> “s<strong>and</strong>box”: 64GB RAM, 8-way dual core Opteron server.You can browse the developer working directories over the web here!William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportTechnology OverviewWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportPython: the glue that holds <strong>SAGE</strong> togetherPython is a free open language that is on the rise.From www.python.org:Python is a dynamic object-oriented programming language thatcan be used <strong>for</strong> many kinds of software development.It offers strong support <strong>for</strong> integration with other languages <strong>and</strong>tools, comes with extensive st<strong>and</strong>ard libraries, <strong>and</strong> can be learnedin a few days.Many Python programmers report substantial productivity gains<strong>and</strong> feel the language encourages the development of higherquality, more maintainable code.You interact with <strong>SAGE</strong> (essentially) via Python.William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportIPython: The <strong>SAGE</strong> Comm<strong>and</strong> Linewas@sha:~$ sage--------------------------------------------------------| <strong>SAGE</strong> Version 1.3.6.3, Build Date: 2006-08-13-1150 || Distributed under the GNU General Public License V2. |--------------------------------------------------------sage: 2^381IPython: an amazing shell (history, completions, etc.)2There is also an emacs comm<strong>and</strong>-line interface.3Ipython provides a very nice debugger (interface to pdb).William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportGUI: The <strong>SAGE</strong> NotebookVery Surprising (to me) FACT: Most people I’ve polled vastly preferusing a good GUI <strong>for</strong> interacting with math software, if available.So now <strong>SAGE</strong> has one. Creating this was not easy (<strong>for</strong> me).1The <strong>SAGE</strong> Notebook – An “AJAX application” like Googlemaps or gmail: lots of CSS, Javascript, <strong>and</strong> XMLHTTPRequest.2Written from scratch recently by me, Alex C. <strong>and</strong> Tom B.3Uses Python’s built-in BaseHTTPServer web server.4Uses your web browser (e.g., Firefox, Safari, Opera) to providea GUI.5Client/server model which works over network or locally.6A very usable <strong>and</strong> (mostly) robust version is done. There is a bigidea list that will influence the next version.7http://sage.math.washington.edu:8100William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportInterfaces: You can use anything from <strong>SAGE</strong>Continue to use your favorite programs <strong>and</strong> code from within <strong>SAGE</strong>:<strong>SAGE</strong> includes (mostly pseudo-tty) interfaces toGAP, GP/PARI, Kash, Macaulay2, Magma, Maple,Mathematica, Maxima, Octave, Singular, etc.Red systems are included st<strong>and</strong>ard with <strong>SAGE</strong>.Get access to 100% of the functionality of the othersystems via interfaces. (But there is some overhead.)Get tab completion <strong>and</strong> online help.People have written fairly nontrivial <strong>SAGE</strong> programsthat combine MAGMA <strong>and</strong> PARI, e.g., Dimitar Jetchevat Microsoft Research this summer (<strong>for</strong> Heegnerpoints).William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportPyrex: Fast compiled codeIs <strong>SAGE</strong> “impossible”???:Date: Mon, 14 Aug 2006 15:26:36 +0100 (BST)I’ve never understood how you can think something thatsits on top of python can beat some custom code likemagma. How does <strong>SAGE</strong> multiply two numbers? Does it usepython to do it? I was trying to explain <strong>SAGE</strong> <strong>and</strong>failed miserably.If <strong>SAGE</strong> were written in pure Python it would be slow (tryNZMATH to see what I mean).<strong>SAGE</strong> can be very fast, since it is partly written in Pyrex, whichis a Python-like language that is converted to C <strong>and</strong> compiled:http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/Much more of <strong>SAGE</strong>’s basic arithmetic types will be (re-)writtenthis way in the next few months.William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status Report<strong>SAGE</strong> multiplies two integers<strong>SAGE</strong> creates <strong>and</strong> multiplies two integers as follows:1 Create two integers via a direct C-level wrapping of the GMP C library,i.e., using the functions mpz_init <strong>and</strong> mpz_set...2 Multiply them using the GMP function mpz_mul.The C code gets compiled <strong>and</strong> becomes an "extension" to the Pythonlanguage. These "extensions" are potentially just as powerful as anythingwritten in the core of Python.def __mul_(Integer self, Integer other):cdef Integer xx = Integer()_sig_on # so ctrl-c always works perfectly.mpz_mul(x.value, self.value, other.value)_sig_offreturn xWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportRevision Control: DARCSAfter <strong>SAGE</strong> Days 1 Gonzalo Tornario convinced me touse DARCS <strong>for</strong> <strong>SAGE</strong> development. Doing so was anexcellent decision.http://abridgegame.org/darcs/Darcs is a distributed revision control systemwritten by physicist David Roundy. Darcs is simple tolearn <strong>and</strong> use, with a powerful new approach to meetthe needs of today’s distributed software projects.Darcs is decentralized, based on a "theory of patches"with roots in quantum mechanics.Symmetric: Anybody’s repository is just as much the“master repository” as anybody else’s.William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportHistory <strong>and</strong> Status ReportWilliam Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportHistory: <strong>SAGE</strong> 0.1 to <strong>SAGE</strong> 1.3.6.1Feb 2005: I got job offers with tenure – <strong>SAGE</strong> 0.1April 2005: Created interfaces to Mathematica,Magma, etc.Feb 2006: <strong>SAGE</strong> Days 1 workshop – <strong>SAGE</strong> 1.0June 2006: High school workshop – <strong>SAGE</strong> NotebookAugust 2006: MSRI Workshop – two weeksuper-intense graduate student coding sprint.<strong>SAGE</strong> now has a huge range of functionality. It wasthe only system to do all the math-polyglot problems.But <strong>for</strong> much of importance to me it is not as fast asMAGMA. This is unacceptable.William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportThe <strong>SAGE</strong> Library (new code)algebras edu lfunctions monoids setscategories ext libs plot structurecoding functions matrix quadratic_<strong>for</strong>ms testscombinat geometry misc ringscrypto groups modular schemesdatabases interfaces modules serverwas@sha:~/d/sage$ cat */*.py */*/*.py */*/*/*.py */*.pyx \*/*/*.pyx */*/*.pyx |wc -l182192was@sha:~/d/sage$ cat */*.py */*/*.py */*/*/*.py */*.pyx \*/*/*.pyx */*/*.pyx |grep "sage:" | wc -l14221Over 250 (of the about 1100) patches were not written by me.William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportWhat is included in <strong>SAGE</strong>1 St<strong>and</strong>ard (GPL compatible; easy build on Linux <strong>and</strong> OS X; 52MB):cddlib, clisp, conway_polynomials, cremona_mini, doc, ecm, examples,extcode, freetype, gap, genus2reduction, gfan, givaro, gmp, gnuplotpy,ipython, lcalc, libpng, matplotlib, maxima, mpfr, mwrank, ntl, numeric,pari, pexpect, pyrex, pyrexembed, python, readline, sage, singular,sympow, tachyon, termcap, zlib, zodb32 Optional Packages: sage -i package_namedarcs, database_cremona_ellcurve, database_gap,database_jones_numfield, database_kohel, database_odlyzko_zeta,database_sloane_oeis, database_stein_watkins_mini, dvipng,extra_docs, gap_packages, gd, gnuplot, hermes, kash3_linux,kash3_osx, lie, linbox, macaulay2, mayavi, moin, numarray, numpy,nzmath, polymake pygtk, RealLib3, scipy, soya3 Other:Install almost any Python package: sage -python setup.py.Ubuntu: Use any st<strong>and</strong>ard system-wide Python code in <strong>SAGE</strong>:import sys;sys.path.append(’/usr/lib/python2.4/site-packages’)William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportGoals <strong>for</strong> <strong>SAGE</strong> 2.0Goals <strong>for</strong> <strong>SAGE</strong> 2.0 – December 20061Very fast basic arithmetic, e.g., finite fields,polynomials, etc.2Very fast everyday linear algebra (much work doneby David Harvey <strong>and</strong> Robert Bradshaw last week).3Stable release – feature freeze, bug fixing, etc.4Goal: Release <strong>SAGE</strong> 2.0 in December 2006. Sendme a patch!!5Also – create a <strong>SAGE</strong> Foundation, since doing<strong>SAGE</strong> right will cost about $100K/year, <strong>and</strong> it is verydifficult to cover that all with grants: (4 undergrademployees, 2 workshops, grad student support,hardware, visitors, teaching reduction).William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>


What is <strong>SAGE</strong>?Technology OverviewHistory <strong>and</strong> Status ReportThe Future (2007) – <strong>SAGE</strong> 3.0: Very easy to useparallelism1I get regular email from people very enthusiasticabout making <strong>SAGE</strong> take extensive advantage ofparallel computers.2Hopefully a workshop in January at MSRI on this.3Hopefully followed by a series of intense 2-weekcoding sprints, probably in San Diego.4Fern<strong>and</strong>o Perez et al., Yi Qiang, Jason Martin, etc.Any Questions?William Stein<strong>SAGE</strong>: <strong>Software</strong> <strong>for</strong> <strong>Algebra</strong> <strong>and</strong> <strong>Geometry</strong> <strong>Experimentation</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!