18.786 Computing Notes
Part of the goal of this course is to get you used to performing
numerical experiments, since that is and has always been how many results
in number theory were first discovered. There are a number of software
packages that can be used for this, each of which has various strengths and
weaknesses.
For this course, I am using a brand-new system called SAGE
(Software for Algebra
and Geometry Exploration), which I find superior to other systems because
the authors (William Stein and his collaborators)
did not simply make up a poorly thought-out programming and
interaction environment. Instead, SAGE is built on top of the programming
language Python, which is one of the most popular scripting languages in
use today mainly because it is well-conceived: its code is easy to read and
write, and it facilitates object-oriented programming. The mathematical
internals of SAGE are modeled on
Magma, a system which is justly
renowned for
facilitating the manipulation of complex mathematical objects (rings,
modules, groups, schemes...) but which is proprietary and unavailable
on Athena.
You can access SAGE in several ways.
-
The best way to access SAGE for reasonably-sized calculations
is to install it on your own computer, either by downloading a binary
(for Windows, MacOS, Linux) or compiling it yourself (SAGE is totally
open-source). If you need help doing this, some of your classmates may be more
helpful than I can be.
- On the math department network, you'll find SAGE
on the network in
the directory /home/r1/kedlaya/sage-complete/.
I don't yet have it set up to run
on all computers on the network: I recommend running on either hypatia
(shared server, extremely fast, but sometimes high load)
or dwork (my office computer, also very fast, low load).
I think all of the interfaces work, but I haven't tried them all yet.
- On Athena, you can add the course locker 18.786
and then run SAGE ("add 18.786; sage").
This should work both under Linux and Solaris, but particularly the
Solaris build is a little iffy (and takes a very very long time to load);
let me know if there are problems.
Note: to use some external interfaces (Maple, Mathematica, Maxima,
maybe Singular, and maybe others) you have to add the corresponding
Athena lockers before running SAGE (add (maple|mathematica|maxima|singular);
I hope to fix that at some point.
-
For short calculations, you can use William Stein's
SAGE calculator from any
web browser.
-
If all else fails, I may be able to ask William for a guest account on
his very fast computer, which will always have the latest version of
SAGE installed. Let me know if you want me to do this.
The SAGE home page is where
you will find binaries, source code,
documentation, and other helpful stuff; there is also a
sourceforge page.
If you have never seen Python before, you might also want to check out the
home page, which includes lots of
documentation, including a
tutorial.
Even if you don't really know anything
about programming, it's relatively easy to get started with Python. (Since
this is a number theory course and not a programming course, the programming
will tend to be pretty light.)