\documentclass[10pt]{beamer}
\include{macros}

\mode<presentation>
{
  \usetheme{Warsaw}
%\usecolortheme{rose}
\usecolortheme{seahorse}
  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}


\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title{SAGE: Software for Algebra
and Geometry Experimentation}

\author{William Stein}

% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date[Dec 4] % (optional)
{\vspace{-6ex}

December 4, 2006,
University of Waterloo\\

\includegraphics[width=22em]{sage-car.png}}

\subject{Talks}

% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection,currentsubsection]
  \end{frame}
}

% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}



\begin{frame}
\frametitle{Background: From HECKE 0.1 to SAGE 1.4}
\large
\begin{itemize}
\item {\dblue 1997--1999:} HECKE -- my free C++ program for {\dred modular
forms} (I wrote an interpreter for it). 
\item {\dblue 1999--2004:} I wrote $>25,000$ lines of Magma code.
\item {\dblue Feb 2004:} Decide I will not go through 
  my life not  knowing how my computations work, and not
  being allowed to make my software available to students for free.  
  I looked for alternatives
  to Magma, but Magma is {\dred vastly superior} to everything else for my work.
  \item {\dblue Feb 2005:} I got job offers with {\dgreen tenure} -- {\dred SAGE 0.1}. 
\item {\dblue Feb 2006:} {\dred SAGE Days 1} workshop -- {\dred SAGE 1.0}.
\item {\dblue June 2006:} {\dred High school} workshop -- Notebook.
\item {\dblue August 2006:} {\dred MSRI Grad student} workshop.
\item {\dblue October 2006:} {\dred SAGE Days 2} workshop.
\item {\dblue This week:} SAGE 1.5; things are getting exciting.
\end{itemize}

\end{frame}



\begin{frame}
\frametitle{What is SAGE?}

\begin{itemize}

\item SAGE is {\dblue free open source software} for
research in {\dred algebra}, {\dred  geometry}, {\dred  number theory},
{\dred  cryptography}, and {\dred  numerical computation}.

\item SAGE is an {\dred   environment for
rigorous mathematical computation}
built using Python, GAP, Maxima, Singular, 
PARI, etc., 
and provides a {\dred  unified interface} to
Mathematica, Maple, Magma, MATLAB, etc.

\item There have been {\dred  several successful SAGE workshops}, and
there are many active SAGE developers.

\item The {\dred primary goal} of SAGE is to make
modern research-level algorithms
available in an integrated package with
a graphical interface. 

\end{itemize}

 
\end{frame}



\begin{frame}[fragile]
\frametitle{Does Open Source Matter for Math Research?}

``You can read Sylow's Theorem and its proof in Huppert's book in the
library [...]  then you can use Sylow's Theorem for the rest of your
life free of charge, but for many computer algebra systems license
fees have to be paid regularly [...].  You press buttons and you get
answers in the same way as you get the bright pictures from your
television set but you cannot control how they were made in either
case.
\vspace{2ex}

With this situation {\dred two of the most basic rules of conduct in
  mathematics are violated}: In mathematics {\dblue information is passed on
free of charge} and {\dblue everything is laid open for checking}. Not applying
these rules to computer algebra systems that are made for mathematical
research [...]  means {\dred moving in a most undesirable direction}.
Most important: Can we expect somebody to believe a result of a
program that he is not allowed to see? Moreover: Do we really want to
charge colleagues in Moldava several years of their salary for a
computer algebra system?''

\vspace{2ex}

-- J. Neub\"user in {\bf\LARGE 1993} (he started GAP in 1986).
\end{frame}

\begin{frame}[fragile]
\frametitle{What About MAPLE?}


There is a new PDE solver that will be in
{\dblue Maple}, written for free by a mathematician.  
My student found out about
it at a conference, and wanted to create something similar for SAGE.
Someone remarked {\em ``I imagine this would be 
quite difficult but don't see that "copying" would be an issue.''}
{\dblue This opinion about Maple is common...}

We wrote to Maple to be sure; they said that once anyone
includes their routines in Maple it becomes {\dred illegal to 
use them as a basis for doing anything anywhere else ever}.

{\small
\begin{verbatim}
Reproducing and redistribution of Maple code is a violation of 
the license agreement.  this is a direct violation of the EULA.
[...] Without the express written permission of Maplesoft, 
Licensee shall not, and shall not permit any Third Party to:
(a) reproduce, transmit, modify, adapt, translate or create 
any derivative work of, any part of the Software, in whole 
or in part ...
(b) reverse engineer, disassemble, or decompile the Software, 
create derivative works based on the Software, or otherwise 
attempt to gain access to its method of operation or source;
Sincerely, Maplesoft Technical Support
\end{verbatim}}



\end{frame}



\begin{frame}
\frametitle{Who is Writing SAGE?}


{\dblue Contributors Include:}
{\small Martin Albrecht,
Tom Boothby,
Robert Bradshaw,
Iftikhar Burhanuddin,
Craig Citro,
Alex Clemesha,
John Cremona,
Didier Deshommes,
David Harvey,
Naqi Jaffery,
David Joyner,
Josh Kantor,
Kiran Kedlaya,
David Kirkby,
Emily Kirkman,
David Kohel,
Jon Hanke,
Bill Hart,
Robert Miller,
Bobby Moretti,
Gregg Musiker,
Bill Page,
Fernando Perez, 
Yi Qiang,
David Roe,
Michael Rubinstein,
Nathan Ryan, 
Kyle Schalm,
Steven Sivek,
Jaap Spies,
Gonzalo Tornaria,
Justin Walker,
Mark Watkins,
Joe Weening,
Joe Wetherell, ...}

\vfill 

\begin{itemize}
\item {\dred 7 Undergraduates}:
have many {\dblue extremely interesting} ideas;
superb at researching available free software. 

\item {\dred Many graduate students}:
 excellent at implementing optimized code and finding
fast algorithms.

\item {\dred Faculty and computer professionals}: 
general direction, great writing, and quality control.


\end{itemize}

\end{frame}

\begin{frame}\frametitle{SAGE Days 2: Coding Sprints...}
\includegraphics[width=\textwidth]{sagedays2moment.png}
\vfill
{\small Bobby Moretti (UW undergrad), Robert Miller (UW grad),
David Harvey (Harvard grad), Joel Mohler (grad),
David Joyner (USNA), Bill page (Axiom).}
\end{frame}

\begin{frame}
\frametitle{Upcoming SAGE-related Workshops I'm Organizing}
\begin{itemize}

\item {\dred Parallel Computation Workshop} at MSRI, Jan 29-Feb 2, 2007.

\item {\dred SAGE Days 3} at IPAM (in LA) Feb 17-21, 2007.


\begin{center}
\includegraphics[width=0.4\textwidth]{sd3-motivator-mozaic.jpg}
\end{center}

\item {\dred AIM}, workshop on $L$-functions and modular forms, July 30-Aug 3, 2007; Michael Rubinstein is a co-organizer.

\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Getting Started with SAGE}
\begin{center}
{\dblue\LARGE Getting Started with SAGE}
\end{center}
\begin{enumerate}
\item {\dred Free online} SAGE notebook: 
  \url{http://sage.math.washington.edu:8100}
\item {\dred Website:} \url{http://sage.math.washington.edu/sage}
\item {\dred Documentation:} Tutorial, Install Guide, Programming
Guide, Reference Manual, Constructions.
\item {\dred Binaries:} For OS X, Windows, and Linux (and building
from source is easy).  (Windows support needs work.)
\item {\dred Mailing lists:} sage-devel ($>500$ messages/month), 
sage-announce, sage-forum, sage-support.
\item {\dred Wiki:} the SAGE wiki.
\item {\dred Trac:} Organizes development.
\item {\dred IRC Chatroom:} {\tt \#sage-dev} on irc.freenode.net
\end{enumerate}
\end{frame}




\begin{frame}[fragile]
\frametitle{Some Fancy Hardware -- A Collaboration Environment}
\begin{center}
{\Large\dblue {\tt http://sage.math.washington.edu/home}}\\
\vfill
\includegraphics[width=0.6\textwidth]{sageserver.jpg}
\end{center}
\vfill
{\dred 64GB RAM}, {\dblue 16 processor} Opteron
server.  You can browse all the developer's home directories
over the web here!
\end{frame}

%

%\begin{frame}[fragile]
%\vfill
%\begin{center}
%{\bf\Large\dblue SAGE Demo 1: A Groebner Fan}
%\end{center}
%\begin{verbatim}
%sage: R.<x,y,z> = PolynomialRing(QQ,3,order='lex')
%sage: I = R.ideal([x^2*y - z, y^2*z - x, z^2*x - y])
%sage: I.gro[tab key]
%I.groebner_basis  I.groebner_fan    
%sage: I.groebner_basis()
%[-1*z + z^15, -1*z^11 + y, -1*y^2*z + x]

%sage: G = I.groebner_fan(); G
%Groebner fan of the ideal:
%Ideal (y^2*z - x, -1*y + x*z^2, -1*z + x^2*y) of 
%Polynomial Ring in x, y, z over Rational Field

%sage: G.reduced_groebner_bases()
%[[-1*z + z^15, -1*z^11 + y, -1*z^9 + x],
% [z^11 - y, -1*z + y*z^4, -1*z^8 + y^2, -1*z^9 + x],
% ...
%\end{verbatim}
%\vfill
%\end{frame}




\begin{frame}[fragile]
\frametitle{SAGE Demo: Educational Applications}
\begin{verbatim}
sage: notebook()
----
F = factor_tree(prod(primes(30)))
F.show(xmin=-3,xmax=7,ymin=-5,ymax=0.5,
       figsize=[8,2],axes=False)
...       
\end{verbatim}

\includegraphics[width=0.9\textwidth]{factor_tree.png}

\vfill
\end{frame}

\begin{frame}[fragile]
\frametitle{SAGE: Excellent Graph Theory}
\begin{verbatim}
sage: g = graphs.PetersenGraph()
sage: show(g)
\end{verbatim}
\includegraphics[width=0.9\textwidth]{peterson}

\end{frame}

\begin{frame}
\frametitle{What is SAGE?}
{\Large SAGE is:}
\vfill
{\Large
\begin{enumerate}
\item {\dred A Distribution} of free open source math software. 
64MB source tarball that builds self-contained.
\item {\dred New Readable Code} that fill in gaps in functionality; implement
new algorithms.
\item {\dred A Unified Mainstream Interface} to
math software: to {\dblue Magma}, {\dblue Macaulay2}, 
Singular, {\dblue Maple}, MATLAB, Mathematica, Axiom, etc.
\end{enumerate}
} 

\vfill
SAGE runs on {\dred Linux, OS X, and Windows}. 
\end{frame}


\begin{frame}
\frametitle{A Distribution}
\begin{center}
{\dblue\LARGE 1. A Distribution}
\end{center}
\begin{center}
\begin{tabular}{|l|l|}\hline
Basic Arithmetic &	{\dred GMP, NTL, MPFR, PARI}  \\\hline
Command Line &	{\dred IPython}   \\\hline
Commutative algebra &	{\dred Singular}  (libcf, libfactory) \\\hline
Database & {\dred ZODB}, Python Pickles \\\hline
Graphical Interface & {\dred SAGE Notebook, jsmath} \\\hline
Graphics &	{\dred Matplotlib, Tachyon, GD}   \\\hline
Group theory and combinatorics  &	{\dred GAP} \\\hline
Graph theory &	{\dred Networkx} \\\hline
Interactive programming language & {\dred	Python } (mainstream !!!) \\\hline
Networking & 	{\dred Twisted}  \\\hline
Numerical computation & {\dred GSL, Numpy, etc.} \\\hline
Symbolic computation, calculus  &	{\dred Maxima}  \\\hline
\end{tabular}
\end{center}
\vfill
All core components are {\dred free and open source} (mostly GPL'd).  You may
{\dred read the code} and {\dred change
anything} in SAGE or any of the core libraries
it includes, and
 redistribute the result. 
\end{frame}


\begin{frame}[fragile]
\frametitle{SAGE Demo: A Distribution}
{\small
\begin{verbatim}
$ wget http://sage.math.washington.edu/sage/dist/
src/sage-1.4.1.2.tar
$ tar xvf sage-1.4.1.2.tar
...
$ cd sage-1.4.1.2
$ make      # completely automatic on OS X and Linux (!)
... 
$ ./sage
--------------------------------------------------------
| SAGE Version 1.4.1.2, Build Date: 2006-10-19         |
| Distributed under the GNU General Public License V2. |
--------------------------------------------------------
sage: install_scripts('/home/was/bin/')
 ... (installs gap, gp, singular, etc. scripts).
$ /home/was/bin/gap
GAP4, Version: 4.4.8 of 18-Sep-2006, i686-apple-darwin8.7.1-gcc
gap> 
\end{verbatim}
}
\vfill
\end{frame}

\begin{frame}[fragile]
\frametitle{The SAGE Library -- new code we've written (all GPL'd)}
\begin{center}
{\dblue\LARGE 2. New Code}
\end{center}

Python and Pyrex code --- {\dred designed to be readable}:
\small
\begin{verbatim}
algebras    edu         lfunctions  monoids         sets
categories  ext         libs        plot            structure
coding      functions   matrix      quadratic_forms tests
combinat    geometry    misc        rings
crypto      groups      modular     schemes
databases   interfaces  modules     server

UNIQUE Source Code Lines (including docstrings):
$ cat */*.py */*/*.py */*/*/*.py */*.pyx \
                */*/*.pyx */*/*.pyx |sort |uniq | wc -l
95706
UNIQUE Input Documentation Examples:
$ cat */*.py */*/*.py */*/*/*.py */*.pyx \
          */*/*.pyx */*/*.pyx |sort|uniq|grep "sage:" | wc -l
11105
\end{verbatim}
\end{frame}

\begin{frame}[fragile]\frametitle{SAGE Demo: New Code (interactive help)}
{\small
\begin{verbatim}
sage: bernoulli?   # one ? for help
    Return the n-th Bernoulli number, as a rational number.
    INPUT:
        n -- an integer
        algorithm:
            'pari' -- (default) use the PARI C library, which is
                      by *far* the fastest.
            'gap'  -- use GAP
            'gp'   -- use PARI/GP interpreter
            'magma' -- use MAGMA
            'python' -- use pure Python implementation
    
    EXAMPLES:
        sage: bernoulli(12)
        -691/2730
        sage: bernoulli(50)
        495057205241079648212477525/66
    ...
    AUTHORS: David Joyner and William Stein
\end{verbatim}
}
\vfill
\end{frame}

\begin{frame}[fragile]\frametitle{SAGE Demo: New Code (interactive help)}
{\small
\begin{verbatim}
sage: bernoulli??        # two question marks for source code
File: ... python2.5/site-packages/sage/rings/arith.py
...
    if algorithm == 'pari':
        x = pari(n).bernfrac()    # Use the PARI C library
        return Rational(x)
    elif algorithm == 'gap':
        x = sage.interfaces.gap.gap('Bernoulli(%s)'%n)
        return Rational(x)
    elif algorithm == 'magma':
        x = sage.interfaces.magma.magma('Bernoulli(%s)'%n)
        return Rational(x)
    elif algorithm == 'gp':        
        x = sage.interfaces.gp.gp('bernfrac(%s)'%n)
        return Rational(x)
    elif algorithm == 'python':
        return sage.rings.bernoulli.bernoulli_python(n)
    else:
        raise ValueError, "invalid choice of algorithm"
\end{verbatim}
}
\vfill
\end{frame}

\begin{frame}[fragile]\frametitle{SAGE Demo: Unique New Code}
\begin{verbatim}
sage: bernoulli_mod_p?
    Computes bernoulli numbers B_0, B_2, ... B_{p-3}
    modulo p.
    PERFORMANCE: Should be complexity O(p log p).
    INPUT: p -- integer, a prime
    OUTPUT: list -- the bernoulli numbers modulo p.
    EXAMPLES:
        sage: bernoulli_mod_p(37)
         [1, 31, 16, 15, 16, 4, 17, 32, 22, 31, 15, 
          15, 17, 12, 29, 2, 0, 2]
    AUTHOR: David Harvey (2006-08-06)
\end{verbatim}
This implements a famous algorithm of Buhler et al.
\vfill
And there is much much more that is unique in SAGE.
\end{frame}


\begin{frame}
\frametitle{A Unified Interface}
\begin{center}
{\dblue\LARGE 3. A Unified Interface}
\end{center}
\vfill\large
\begin{itemize}
\item SAGE {\dred interfaces to}:
Axiom, GAP, GP/PARI, Kash, Macaulay2,
Magma, Maple, Mathematica, MATLAB, Maxima, Octave, Singular, etc.

\vfill
\item  Wide range of {\dred functionality}.
\vfill
\item Unified {\dred command completion and help}.
\vfill
\end{itemize}

\end{frame}

\begin{frame}[fragile]
\frametitle{SAGE Demo:  Interfaces}
{\dred HOW IT WORKS:} Use buffered psuedo-tty's and Python objects that wrap native objects.  This makes
it possible to wrap {\dred all} math software
that has a command line interface using very similar code.

\vfill
\begin{verbatim}
sage: x = singular('2+3')
\end{verbatim}
This fires up one copy of Singular (if it wasn't already started)
and sends the line {\tt '2+3'} to Singular. 
It also creates a Python class R with a field set to {\tt "sage0"}. 
{\small \begin{verbatim}
sha:~ was$ ps ax |grep Singular
21664  pe  Ss+    0:00.01 /bin/sh /Volumes/HOME/s/local/bin/Singular -t --ticks
21666  pe  S+     0:00.06 Singular-3-0-2 -t --ticks-per-sec 1000
sage: type(x)
<class 'sage.interfaces.singular.SingularElement'>
sage: x
5
sage: R.name()
'sage0'
\end{verbatim}
}
\end{frame}


%\begin{frame}
%\frametitle{SAGE Interfaces}
%\Large
%``I think the SAGE developers were very bold---maybe 
%even audacious---to actually attempt this. And they 
%are doing it in a largely pragmatic way without 
%attempting to incorporate the more formal and 
%theoretical ideas developed by the OpenMath 
%community. 

%\vspace{1ex}

%One might have been tempted to predict 
%an early failure to this effort but on the contrary 
%Sage seems to be growing more rapidly than any 
%other computer algebra research and development 
%effort.''

%\hspace{15em} -- Bill Page 

%
%%\vfill
%%\black
%%Fateman predicted early failure in December 2004...
%%\vfill

%%\red
%%``Maybe the SAGE structure has some organizational benefit
%%(e.g. using Python for scripting), but compared to what?
%%Tcl? Lisp? Scheme? Guile? Ruby? Jscript? PARI?
%%\vspace{1ex}

%%Why not hook SAGE to Maxima, or the reverse?
%%Can you convince an engineer to use it? For what?

%%\vspace{1ex}
%%Elephants are interesting and useful. Feathers are interesting
%%and useful. Elephants with feathers are a curiosity. Is SAGE an elephant
%%with feathers?''

%%\hspace{15em} -- Richard Fateman

%\end{frame}



\begin{frame}
\frametitle{Overall Structure of SAGE}
{\dblue\Large The Overall Structure of SAGE}
\vfill
\begin{itemize}
\item {\dred Custom package management system } -- 46 standard
packages, and 32 optional ones.  Automated upgrades.  
\vfill
\item {\dred Awesome interactive command-line} interface -- IPython.
\vfill
\item {\dred Graphical user interface} -- via your web browser (AJAX app).
\vfill
\item {\dred Fast underlying arithmetic} -- built on 
mature robust C libraries (GMP, NTL, PARI, GSL).  
New code in C, Pyrex and Python.

\vfill
\item {\dred Interfaces with other software} use buffered
{\dred psuedo-tty}'s.
\vfill
\item {\dred Special purpose components} -- e.g., Rubinstein's
{\dred Lcalc}, {\dred GMP-ECM and FlintQS} (for integer factorization), etc.
\vfill
\item {\dred Mercurial revision control system} -- included
standard; encourages users to be developers. 
\end{itemize}

\end{frame}


\begin{frame}
\frametitle{The SAGE Notebook: GUI For Mathematics Software}

\begin{enumerate}
\item The SAGE Notebook -- an {\dred ``AJAX application''} like Google maps or
  Gmail.\vfill
\item {\dred Written from scratch} by me, Alex C. and Tom B.\vfill
\item Uses Python's built-in {\dred BaseHTTPServer} web server (we
will switch to Twisted for robustness).
\vfill
\item Works well with Firefox, Safari, Opera, and Konqueror.\vfill
\item Client/server model which works {\dred over network} or locally.  \vfill
\item Current version is {\dred stable and in use by many people}.  \vfill
\item Try it: {\tt http://sage.math.washington.edu:8101}\vfill
\end{enumerate}
\end{frame}





%\begin{frame}
%\frametitle{What is included in SAGE?}
%\begin{enumerate}
%\item {\dblue Standard packages:}\\
%cddlib, {\dred clisp}, conway\_polynomials, cremona\_mini,
%doc, ecm, freetype, gap,
%genus2reduction, gfan, givaro, {\dred gmp}, {\dred gnuplotpy},
%{\dred ipython}, lcalc, libpng, {\dred matplotlib}, {\dred maxima},
%{\dred mpfr}, mwrank, ntl, {\dred numeric}, pari, {\dred pexpect},
%{\dred pyrex}, {\dred pyrexembed}, {\dred python}, readline, 
%singular, sympow, tachyon, termcap, zlib, {\dred zodb3}
%\item {\dblue Optional Packages: {\tt sage -i package\_name}}\\
%darcs, database\_cremona\_ellcurve,
%database\_gap, database\_jones\_numfield,
%database\_kohel, database\_odlyzko\_zeta, database\_sloane\_oeis,
%database\_stein\_watkins\_mini, {\dred dvipng}, extra\_docs, gap\_packages,
%gd, {\dred gnuplot}, hermes, kash3\_linux, kash3\_osx, lie, linbox,
%macaulay2, {\dred mayavi}, {\dred moin (wiki)}, {\dred numarray}, 
%{\dred numpy}, nzmath, polymake, 
%pygtk, RealLib3, {\dred scipy}, {\dred soya}
%\end{enumerate}
%\end{frame}


\begin{frame}
\frametitle{Goals for SAGE 2.0}
\vfill
Planning and bug tracking is {\dgreen done in the open}:
\begin{center}
  \url{http://sage.math.washington.edu/trac}
  \end{center}
\vfill

{\Large\dblue Main Goals for SAGE 2.0 (January 31, 2007):}
\vfill
\large
\begin{enumerate}
\item Optimize {\dred basic arithmetic}, e.g., finite fields,  
exact linear algebra, etc.; this involves
moving classes from interpreted Python to compiled code. 
 \vfill
\item Improve the {\dred SAGE Notebook}: easier to
edit, better security and robustness.
 \vfill
\item Improve {\dred graphics}: 3d graphics, a java applet
for the SAGE notebook.
  
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Next Year (2007): parallelism}
{\Large\dblue SAGE in 2007: Parallelism}
\vfill
\large
\begin{enumerate}
\item Support for {\dblue parallelism} and use of
it for algorithms,
e.g., multimodular matrix multiply over $\Q$.
\vfill
\item I'm co-organizing a {\dred workshop January 29--Feb 2, 2007} at MSRI on 
parallel computation, which will help get the ball
rolling.
%\item Fernando Perez et al., Yi Qiang, Jason Martin, etc. 
\end{enumerate}
\end{frame}

\begin{frame}\frametitle{Questions?}
\vfill
\LARGE
\begin{center}
\includegraphics[width=.7\textwidth]{tag.png}

\vfill
\dblue 
Questions?
\end{center}

\end{frame}

\end{document}


