\documentclass[9pt]{beamer}
\usepackage{comment}
\usepackage{beamerarticle}
\usepackage[utf8x]{inputenc}
\mode<presentation>
{
  \usetheme{Rochester}
 \usecolortheme{crane}
 %\usecolortheme{seahorse}
 \setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}\usepackage{ngerman}

\newcommand{\page}[1]{\frame{#1}}

\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{color}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{listings}
\usepackage{xspace}  % to allow for text macros that don't eat space 
\newcommand{\field}[1]{\mathbb{#1}}

\newtheorem{thm}{Theorem}[section]

\definecolor{dblackcolor}{rgb}{0.0,0.0,0.0}
\definecolor{dbluecolor}{rgb}{.01,.02,0.29}
\definecolor{dredcolor}{rgb}{0.8,0,0}
\definecolor{dgraycolor}{rgb}{0.50,0.50,0.50}
\newcommand{\dblue}{\color{dbluecolor}\bf}
\newcommand{\dblack}{\color{dblackcolor}\bf}

\renewcommand{\emph}[1]{{\dblack{#1}}}

\newcommand{\SAGE}{{\color{dbluecolor}\sf Sage}\xspace}
\newcommand{\sage}{\SAGE}


\title{Sage for Mathematical and Cryptographic Research}
\subtitle{\url{http://www.sagemath.org}}
\author[Stein et al.]{William Stein\inst{1} \and Martin Albrecht\inst{2}}
\institute[Universities of Washington and London]{
 \inst{1}Department of Mathematics\\
 University of Washington, Seattle
 \and
 \inst{2} Information Security Group\\
 Royal Holloway, University of London
}
\date{Bristol, 10.November 2007}
\titlegraphic{\includegraphics[width=0.2\textwidth]{sagelogo.png}}


\AtBeginSection[]
{
   \begin{frame}
       \frametitle{Outline}
       \tableofcontents[currentsection]
   \end{frame}
}

\lstdefinelanguage{Sage}[]{Python}
{morekeywords={True,False,sage},
sensitive=true}

\lstset{frame=none,
          showtabs=False,
          showspaces=False,
          showstringspaces=False,
          commentstyle={\color{dredcolor}},
          keywordstyle={\color{dbluecolor}\bfseries},
          stringstyle ={\color{dgraycolor}\bfseries},
          language = Sage,
          basicstyle=\small
          }

\begin{document}

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

\begin{frame}{Outline}
\tableofcontents
\end{frame}

\section{Introduction}

\begin{frame} %wstein
\frametitle{Mission Statement}
Provide an open (GPL-compatible), high-quality, and free viable alternative to \emph{Magma, Mathematica,
Maple} and \emph{MATLAB} (in that order).

\vfill

To achieve this do not reinvent the wheel but \emph{reuse} as much \emph{existing building blocks} as possible and make
sure the result is \emph{rigorously tested}, \emph{easy to modify} by the end user and \emph{very well documented}.

\vfill

Also create a \emph{helpful environment} for users to get help (mailinglists, irc-channel, meetings).
\end{frame}

\begin{frame}[fragile]
\frametitle{What is Sage?}
\SAGE is a mathematics software package developed by a worldwide community of developers.

\begin{enumerate}
 \item a \emph{distribution} of the best free, open-source mathematics software available (\SAGE 2.8.12 ships roughly 70
third-party packages) that is easy to compile and/or install on Linux, OS X, Solaris (soon) and Windows
(via virtualisation)
 \item a unified \emph{interface} to many free and commercial mathematics software packages (e.g. Magma, Mathematica)
 \item the mathematics package which covers the widest area of \emph{functionality} ever (see: 1.) including new
implementations not yet found elsewhere.
\end{enumerate}

Welcome to \SAGE:
\lstset{basicstyle=\tiny}
\begin{lstlisting}
----------------------------------------------------------------------
| SAGE Version 2.8.11, Release Date: 2007-11-02                      |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: 1 + 1
2
\end{lstlisting}
\end{frame}

\begin{frame} %wstein
\frametitle{Timeline}
\begin{description}
\item[1997–1999] (\emph{Berkeley}) \emph{HECKE} – C++ (modular forms)
\item[1999–2005] (\emph{Berkeley}, \emph{Harvard}) I wrote over 25,000 lines of \emph{Magma} code. \emph{Magma is
incredibly powerful!}
\item[] But the languages of Magma, Mathematica, and Maple are \emph{old-fashioned and painful} compared to Python.
\item[] I need to be able to \emph{see inside and change anything} in my software in order to be the best in the world
at my research.
\item[] \emph{Magma is frustrating} and is a \emph{terrible longterm investment}.
\item[Feb 2005] I released \emph{SAGE-0.1} –- a Python math library.
\item[Feb 2006] \emph{UCSD SAGE Days 1} – SAGE 1.0.
\item[October 2006] \emph{U Washington SAGE Days 2} workshop.
\item[March 2007] \emph{UCLA SAGE Days 3} workshop.
\item[June 2007] \emph{U Washington SAGE Days 4} workshop.
\item[October 2007] \emph{Clay Math Institute SAGE Days 5} workshop.
\item[Now] \emph{Heilbronn Institute SAGE Days 6} (you are here :-))
\item[Now] \emph{SAGE-2.8.12}; over \emph{100 contributors to SAGE}.
\end{description}
\end{frame}

\section{Capabilities}

\begin{frame}[allowframebreaks]
\frametitle{Overview}
\framesubtitle{see \url{http://www.sagemath.org:9001/cando}}
 \begin{description}
\item[Commutative Algebra] commutative algebra over $\field{F}_{p^n}$ using Singular, basic arithmetic over
arbitrary rings, very fast basic arithmetic over $\field{F}_{p^n}$, boolean polynomial rings (soon via
PolyBoRi), quotient rings over multivariate polynomial rings, global \& local orderings

\item[Linear Algebra] dense linear algebra over $\field{F}_q$ using LinBox, M4RI (for $\field{F}_2$),
and custom code, and sparse linear algebra over $\field{F}_q$ via custom code and LinBox (e.g. sparse solver).
Numerical dense linear algebra via Numpy and GSL. Matrix structure visualisation.

\item[Group Theory] permutations groups, abelian groups, matrix groups (in particular, classical groups over
finite fields)

\item[Combinatorics] many basic functions, many of Sloane's functions are implemented.

\item[Graph Theory] construction, directed graphs, labelled graphs. 2d and 3d plotting of graphs using an
optimised implementation of the spring layout algorithm. constructors for all standard families of graphs,
graph isomorphism testing, automorphism group computation

\item[Number Theory] compute Mordell-Weil groups of (many) elliptic curves using both invariants and algebraic
2-descents, a wide range of number theoretic functions, optimised modern quadratic sieve for factoring integers 
$n = p\cdot q$, optimised implementation of the elliptic curve factorisation method, modular symbols for general weight,
character, Gamma1, and GammaH, modular forms for general weight $\ge$ 2

\item[Elliptic Curves] all standard invariants of elliptic curves over $\field{Q}$, division polynomials, etc. ,
compute the number of points on an elliptic curve modulo $p$ for all primes $p$ less than a million in seconds,
optimised implementation of the Schoof-Elkies-Atkin point counting algorithm for counting points modulo $p$ when $p$
is large, complex and $p$-adic $L$-functions of elliptic curves. Can compute $p$-adic heights and regulators for $p <
100000$ in a reasonable amount of time.

\item[$p$-adic Numbers] extensive support for arithmetic with a range of different models of p-adic arithmetic.
\item[Plotting] very complete 2d plotting functionality similar to Mathematica's, limited
3d plotting via an included ray tracer.
\end{description}
\end{frame}

\begin{frame} %wstein
\frametitle{New Functionality}
\begin{itemize}
\item free re-implementation of Nauty's graph isomorphism algorithm
\item certain models of arithmetic with $p$-adic numbers \& polynomial rings over them
\item task farming distributed computing (DSage)
\item modular symbols, modular forms, modular abelian varieties
\item computing with Dirichlet characters
\item Eisenstein series enumeration
\item arithmetic on jacobians of curves
\item quaternion algebras
\item \emph{ $p$-adic L-functions of elliptic curves in a lot of generality, with proven precision}
\item \emph{ fast computation of $p$-adic heights on elliptic curves}
\item \emph{ Coleman integration}
\item Duursma zeta functions of linear codes
\item \emph{ permanents of rectangular matrices over general rings}
\end{itemize}
\end{frame}

\begin{frame}{Web-based Notebook Interface}
\framesubtitle{public notebooks available at \url{http://www.sagenb.org}}
\begin{tabular}{cc}
\begin{minipage}{0.75\textwidth}
\includegraphics[width=1.0\textwidth]{notebook.png}
\end{minipage}  & 
\begin{minipage}{0.25\textwidth}
\begin{itemize}
\item graphical user interface
\item plotting
\item LaTeX typesetting
\item remote access
\item worksheet sharing
\item interface to 3rd party systems like e.g. Magma
\end{itemize}
\end{minipage}
\end{tabular}
\end{frame}

\begin{frame}[allowframebreaks]
\frametitle{From John Voight's recent talk about Number Field Enumeration} 
\begin{block}{Implementation: Pari versus Magma}
\vfill
{\bf Speed:} Speed is of the absolute essence--we are doing basic operations zillions of times. Maple and Mathematica cannot compete for this reason.
\vfill\vspace{1ex}

{\bf Number field arithmetic:} Bare C lacks number field arithmetic. Pari and
Magma (based on KANT) do: For ``large examples'', Magma is by far the
quickest (in our experience). However, in our situation, our
polynomials are small and both systems have highly optimised
algorithms for testing irreducibility and computing p-maximal orders.
\vfill\vspace{1ex}

{\bf Real root finding:} Magma also has amazingly fast real root finding; it
is, however, a black box, and there is no fast Newton’s method! Pari
only computes real roots and lets you to guess if a root is real or
not.
\vfill\vspace{1ex}

{\bf Optimized code:} So it is up to us to implement a lightning fast
Newton’s method! One can work with the Pari library in C to write
optimized code. In Magma, one cannot do this without travelling to
Sydney!
\vfill\vspace{1ex}

{\bf Cost:} Magma is not free, hence not on U Vermont machines. Pari is free.
\vfill\vspace{1ex}

{\bf Intuitive:} Despite the advantages of Pari as explained above, we find
it to be often counterintuitive to use and to program.
\end{block}

\framebreak

\begin{block}{We turn to Sage}
Having seemingly eliminated every alternative, {\em we turn to SAGE.}
SAGE includes Pari, so it has number field arithmetic.  It uses Python,
which is a very friendly modern (object-oriented) programming language. It
is free. It incorporates Cython, which easily allows one to write optimized
C code for repeated tasks.
\vfill\vspace{1ex}
Despite being a relatively new system (so some functionality is limited),
since it is open source it is easy to contribute yourself. For example, Carl
Witty recently wrote a package for fast real root isolation. So even though
one must think about issues like how best to coerce between a C int, a
Python integer, and a SAGE Integer, there is a very active development
community willing to help!
\vfill\vspace{1ex}
It has the further advantage that there is a package for
\emph{distributed computing called DSage}.
\end{block}
\end{frame}

\begin{frame}[fragile]
\frametitle{Basic Finite Field Arithmetic} 
\begin{itemize}
 \item finite fields $\field{F}_{p^n}$ for arbitrary sizes of $p$ and $n < 2^{32}$.
 \item finite extension fields of order $< 2^{16}$ implemented using Zech logs (fast!)
 \item larger $\field{F}_q$ implemented using Pari's (slow) or NTL's (reasonable) polynomial representation
 \item mp$\field{F}_q$ ?\\
 \url{http://hyperelliptic.org/SPEED/slides/Gaudry_Thome_mpFq.pdf}
\end{itemize}
\begin{lstlisting}
sage: k.<a> = GF(2^8); k
Finite Field in a of size 2^8
sage: P.<x> = GF(3)['x']
sage: p = P.random_element(degree=5); p
2*x^5 + 2*x^2 + 2*x + 1
sage: p/2 # monic
x^5 + x^2 + x + 2
sage: k.<a> = GF(3^5, modulus=p)
sage: k.modulus()
x^5 + x^2 + x + 2
\end{lstlisting}
\end{frame}


\begin{frame}[fragile]
\frametitle{Dense Linear Algebra over Finite Fields} 
\begin{itemize} 
 \item specialised implementation for prime fields
 \item uses LinBox's BLAS arithmetic (see Clement Pernet's talk) for some operations
 \item Todo: extension fields (LinBox supports them!)
\end{itemize}

\begin{lstlisting}
sage: A = random_matrix(GF(127),2000,2000)
sage: B = random_matrix(GF(127),2000,2000)
sage: %time C = A._multiply_linbox(B)
CPU times: user 4.15 s, sys: 0.00 s, total: 4.15 s
Wall time: 4.19 # time depends on installed BLAS

sage: time A.echelonize()
CPU times: user 4.30 s, sys: 0.03 s, total: 4.34 s
Wall time: 4.51
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Dense Linear Algebra over GF(2)} 
\begin{itemize}
 \item M4RI package by Gregory Bard
 \item uses packed representation and Gray-Codes
 \item multiplication \& echolonisation $O(n^3/log(n))$
 \item fastest implementation up to $5.000\times 5.000$ -- $10.000 \times 10.000$ matrices
\begin{lstlisting}
sage: A = random_matrix(GF(2),20000,20000)
sage: time A.echelonize()
CPU times: user 48.06 s, sys: 0.04 s, total: 48.10 s
Wall time: 48.46
\end{lstlisting}
 \item Strassen ($O(n^{2.7})$) support in the works
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{Sparse Linear Algebra over Finite Fields} 
\begin{itemize}
 \item generic sparse matrix classes and a special $\field{F}_p$ class
 \item custom code for computing the reduced row echelon form
 \begin{lstlisting}
sage: A = random_matrix(GF(127),10000,10000,density=3/10000)
sage: time A.echelonize()
CPU times: user 53.13 s, sys: 0.15 s, total: 53.28 s
Wall time: 59.18
sage: A.rank()
9307
\end{lstlisting}
\item sparse matrix solver via LinBox (see Clement Pernet's talk):
\begin{lstlisting}
sage: A = random_matrix(GF(127),3000,3000,density=10/3000)
sage: time c = A\b
CPU times: user 35.12 s, sys: 0.59 s, total: 35.71 s
Wall time: 38.75
sage: (A*c) == b
True
\end{lstlisting}
\item Ralf Weinmann working on integrating John Cremonas fast g0n sparse matrix code
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Matrix Visualisation}
\framesubtitle{A.visualize\_structure()}
\begin{center}
\includegraphics[width=0.6\textwidth]{matrix-visualization-example.png}
\end{center}
\end{frame}

\begin{frame}[fragile]
\frametitle{Factoring}
\lstset{basicstyle=\tiny}
\begin{description}
 \item[factor] uses PARI
 \begin{lstlisting} 
sage: time factor(2^197 + 1)
CPU times: user 2.08 s, sys: 0.04 s, total: 2.12 s
Wall time: 2.17
3 * 197002597249 * 1348959352853811313 * 251951573867253012259144010843
 \end{lstlisting}

 \item[ecm] uses GMP-ECM by Paul Zimmermann et al.
 \begin{lstlisting}
sage: time ecm.factor((2^197 + 1)/3)
[197002597249, 1348959352853811313, 251951573867253012259144010843]
CPU times: user 0.01 s, sys: 0.10 s, total: 0.10 s
Wall time: 4.41
 \end{lstlisting}

 \item[qsieve] uses Bill Hart's quadratic sieve implementation 
\begin{lstlisting}
sage: v,t = qsieve(next_prime(10^31)*next_prime(10^30),time=True)
sage: t
'10.60user 0.37system 0:11.13elapsed 98%CPU (0avgtext+0avgdata 0maxresident)k'
sage: v
[1000000000000000000000000000057, 10000000000000000000000000000033]
\end{lstlisting}

\item[DistributedFactor] combines ECM, qsieve and trial division; written by Yi Qiang and Robert Bradshaw.
\end{description}
\end{frame}

\begin{frame}[fragile]
\frametitle{Lattice Reduction}
The NTRUEncrypt Public Key Cryptosystem is based on the hard mathematical problem of finding very short vectors in
lattices of very high dimension.

Generate a ntru-like lattice of dimension ($400 \times 400$), with the
coefficients $h_i$ chosen as random $130$ bits integers and parameter $q=35$:
\[
\left( \begin{array}{cccccccc}
 1 & 0 & \dots & 0 & h_0  &     h_1 & \dots & h_{d-1}\\
 0 & 1 & \dots & 0 & h_1  &     h_2 & \dots & h_0     \\
 \dots & \dots & \dots & \dots & \dots & \dots & \dots & \dots \\
 0 & 0 & \dots & 1 & h_{d-1} & h_0 & \dots & h_{d-1}\\
 0 & 0 & \dots & 0 & q   &      0  & \dots & 0     \\
 0 & 0 & \dots & 0 & 0   &      q  & \dots & 0     \\
 \dots & \dots & \dots & \dots & \dots & \dots & \dots & \dots \\
 0 & 0 & \dots & 0 & 0 &       0  & \dots & q     \\
\end{array} \right)
\]

\begin{lstlisting}
sage: from sage.libs.fplll.fplll import gen_ntrulike
sage: A = gen_ntrulike(200,130,35)
sage: time B = A.LLL()   # uses fpLLL by Damien Stehle
CPU time: 14.91 s,  Wall time: 15.06
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Elliptic Curves over $\field{F}_q$} 
\begin{lstlisting}
sage: k = GF(next_prime(10^7))
sage: E = EllipticCurve(k, 
...   [k.random_element(),k.random_element()])
sage: E
Elliptic Curve defined by y^2  = x^3 + 8412640*x + 9921951 
over Finite Field of size 10000019
sage: P = E.random_element()
sage: P.order()
5002257
sage: E.cardinality()
10004514
sage: 2*P + P
(251564 : 3681217 : 1)
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Graph Theory}
\begin{itemize}
\item builds on NetworkX (Los Alamos's Python graph library)
\item graph isomorphism testing -- Robert Miller's new implementation
\item databases
\item 2d and 3d visualization
\end{itemize}
\begin{lstlisting}
sage: D = graphs.DodecahedralGraph()
sage: D.show3d()
\end{lstlisting}
\vspace{-2em}
\begin{center}
\includegraphics[width=0.4\textwidth]{dodec.png} 
\end{center}
\vspace{-3em}

\begin{lstlisting}
sage: E = D.copy()
sage: gamma = SymmetricGroup(20).random_element()
sage: E.relabel(gamma)
sage: D.is_isomorphic(E)
True
sage: D.radius()
5
\end{lstlisting}
\end{frame}

\begin{frame}[fragile]
\frametitle{Polynomial Arithmetic}
\begin{itemize}
\item Sage mostly currently uses NTL by default
\item FLINT -- world's fastest univariate polynomial arithmetic for essentially
every bit size and degree (Bill Hart's talk). 
\end{itemize}
\begin{lstlisting}
sage: from sage.libs.flint.fmpz_poly import Fmpz_poly
sage: deg = 2048; coeff=16
sage: f=Fmpz_poly([ZZ.random_element(2^coeff) for _ in [1..deg]])
sage: g=Fmpz_poly([ZZ.random_element(2^coeff) for _ in [1..deg]])
sage: time for _ in xrange(10^3): w = f*g
CPU time: 2.31 s
\end{lstlisting}
\begin{itemize}
\item PARI takes 80.158 seconds to do the exact same computation.
\item Sage wrapping NTL takes 5.70 seconds
\item Magma takes 3.250 seconds
\end{itemize}

\begin{comment}

{{{id=6|
from sage.libs.flint.fmpz_poly import Fmpz_poly
}}}

{{{id=7|
deg = 2048; coeff=16
f = Fmpz_poly([ZZ.random_element(2^coeff) for _ in range(deg)])
g = Fmpz_poly([ZZ.random_element(2^coeff) for _ in range(deg)])
}}}

{{{id=8|
%time
for _ in xrange(10^3):
   w = f*g
///
CPU time: 2.31 s,  Wall time: 2.32 s
}}}

{{{id=9|
gp.eval('f = Pol(%s)'%f.list())
_ = gp.eval('g = Pol(%s)'%g.list())
}}}

{{{id=10|
%gp
gettime; for(i=1,10^3,w=f*g); gettime/1000.0
///
80.15800000000000000000000000
}}}

{{{id=18|
%magma
R<x> := PolynomialRing(IntegerRing());
}}}

{{{id=17|
magma.eval('f := R!%s'%f.list())
_ = magma.eval('g := R!%s'%g.list())
}}}

{{{id=16|
%magma
time for i in [1..10^3] do w := f*g; end for;
///
Time: 3.250
}}}

{{{id=15|
# Uses NTL
R.<x> = ZZ[]
ff = R(f.list())
gg = R(g.list())
}}}

{{{id=1|
time for i in xrange(10^3): w = ff*gg
///
CPU time: 5.70 s,  Wall time: 5.79 s
}}}
\end{comment}

\end{frame}

\begin{frame}[fragile]
\frametitle{Commutative Algebra}
\begin{itemize}
 \item Very fast basic arithmetic for multivariate polynomials over $\field{F}_q$.
 \item Fast Gröbner basis computation and highlevel ideal operations
 \item Specialised very fast Gröbner basis computation in 
\[
\field{F}_2[x_1,\dots,x_n]/\langle x_1^2 + x_1, \dots, x_n^2 + x_n\rangle
\]
very soon (see Michael Brickenstein's talk)
\end{itemize}
\begin{lstlisting}
sage: P.<x,y,z> = PolynomialRing(GF(32003),3)
sage: p = (x + y + z + 1)^20 # the Fateman fastmult benchmark
sage: q = p + 1
sage: t = cputime()
sage: r = p*q
sage: cputime(t)
0.28
\end{lstlisting}

\end{frame}

\begin{frame}[fragile]
\frametitle{Algebraic Attacks}
\SAGE provides equation systems for algebraic cryptanalysis:

\begin{lstlisting}
sage: sr = mq.SR(2,1,1,4, gf2=True)
sage: F,s = sr.polynomial_system()
sage: s
{k003: 1, k002: 1, k001: 1, k000: 1}
sage: gb = F.groebner_basis()
sage: V = Ideal(gb).variety(); V[0]
...
 k001: 1, k000: 1, k003: 1, k002: 1,
...
sage: sr = mq.SR(10,4,4,8, star=True, aes_mode=True)
sage: F,s = sr.polynomial_system(); F
Polynomial System with 8576 Polynomials in 4288 Variables
sage: F.groebner_basis() # if this terminates => AES broken :-)
\end{lstlisting}
\end{frame}


\begin{frame}
\begin{center}
{\Huge Live Demo}
\end{center}
\end{frame}

\section{How ?}
\begin{frame}[fragile,allowframebreaks]
\frametitle{How Do We Do That?}
{\footnotesize
\begin{center}
\begin{tabular}{|l|l|}\hline
Arithmetic &	\emph{GMP, MPFR, Givaro}  \\\hline
Commutative Algebra &	\emph{SINGULAR}  (libSINGULAR) \\\hline
Linear Algebra &	\emph{LinBox, M4RI, IML, fpLLL}\\\hline
Highlevel Cryptography & \emph{GnuTLS, PyCrypto}\\\hline
Factoring & \emph{FlintQS, ECM}\\\hline
Group Theory and Combinatorics  &	\emph{GAP, Symmetrica} \\\hline
Graph Theory &	\emph{NetworkX} \\\hline
Number Theory & \emph{PARI, NTL, Flint}\\\hline
Numerical Computation & \emph{GSL, Numpy, Scipy} \\\hline
Calculus, Symbolic Comp. &	\emph{Maxima, Sympy}  \\\hline
Specialised Math & many C/C++ programs...\\\hline
Interface & Notebook, \emph{jsmath, Moin wiki, IPython} \\\hline
Plotting &	\emph{Matplotlib, Tachyon, libgd, Java3d}   \\\hline
Networking & 	\emph{Twisted}  \\\hline
Database & \emph{ZODB, SQLite}, Python Pickles  \\\hline
Programming Language & \emph{Python, Cython} (compiled) \\\hline
\end{tabular}
\end{center}
}
\framebreak
\begin{center}
\includegraphics[width=0.7\textwidth]{languages.png} 
\end{center}
Overall roughly 4.5 million lines of source code and estimated several hundred person-years.
\end{frame}

\begin{frame}
\frametitle{The Python Programming Language}
\emph{Python} is a powerful modern interpreted programming language.

\begin{itemize}

\item ``Python is fast enough for our site and allows us to \emph{produce maintainable features in record times}, with
a minimum of developers,'' said Cuong Do, Software Architect, {\dblue YouTube.com.}

\item ``Google has made no secret of the fact they use Python a lot
  for a number of internal projects. Even knowing that, once \emph{ I was an
  employee, I was amazed at how much Python code there actually is in
  the Google source code system}.'', said Guido van Rossum, {\dblue Google}, creator of Python.

% well, I wouldn't advertise with Episode II  ;-)
\item ``Python plays a key role in our production pipeline. Without it a project the size of \emph{Star Wars:
Episode II} would have been very difficult to pull off. From crowd rendering to batch processing to compositing,
\emph{Python binds all things together},'' said Tommy Burnette, Senior Technical Director, {\dblue Industrial Light \&
Magic.}
\end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitle{Python \& Cython}
\framesubtitle{\url{http://www.python.org} and \url{http://www.cython.org}}
\begin{center}
 \includegraphics[width=0.4\textwidth]{python-and-cython.png}
\end{center}
\emph{Python}
\begin{itemize}
\item easy for you to define \emph{your own data types} and methods on it (bitstreams, ciphers, rings, whatever).
\item very clean language that results in \emph{easy to read code}.
\item easy to learn: e.g., ``Dive into Python'' \url{http://www.diveintopython.org/}
\item a \emph{huge number of libraries}: statistics, networking, databases, bioinformatic, physics, video games,
3d graphics, numerical computation (scipy), and serious ``pure'' mathematics (via \SAGE)
\end{itemize}
\emph{Cython}
\begin{itemize}
\item almost Python compiler
\item allows to mix C and Python which is crucial for fast execution speed
\item makes easy to \emph{use existing C/C++ libraries} from Python.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{The Sage Release Process}
\begin{enumerate}
\item All enhancement proposals, bug reports and tasks are available on \url{http://trac.sagemath.org}.
\item All discussions happen in the open on public mailinglists and on a public chat channel.
\item One release per week on average: release often, release early.
\item Changes happening to the main repository can be tracked in real time online 
\item Code is refereed by a board of editors before inclusion if it isn't obvious: \emph{Journal of Sage}.
\item If code is rejected by the release maintainer every developer can appeal to this board of editors and they vote
on the inclusion of the patch.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Communication Channels}
\begin{description}
 \item[sage-devel] development discussions, 213 subscribers, ca. 800 messages per month
 \item[sage-support] support requests, 187 subscribers, ca. 200 messages per month
 \item[sage-forum] general discussions, 148 subscribers, low traffic
 \item[sage-newbie] basic questions about e.g. programming, 33 subscribers, low traffic
 \item[\#sage-devel] IRC channel, very busy during bug squashes, usually at least two \SAGE developers around
\end{description}
\end{frame}

\section{Wrap-Up}

\begin{frame} %wstein
\frametitle{Shortcomings of Sage}
\begin{enumerate}
\item  There are currently probably less than a thousand users of \SAGE (there are millions of Python users).
\item  \SAGE is not robust enough.
\item  \SAGE is sometimes much slower than Magma, Mathematica, etc. (and sometimes faster, to be fair).
\item  \SAGE is new – there are too many bugs.
\end{enumerate}
However, if something is wrong you can fix it, and the Sage mailing
lists and irc channel are extremely active and helpful (over 1000
messages a month!).
\end{frame}

\begin{frame} %wstein
\frametitle{Advantages of Sage}
\begin{enumerate}

\item \SAGE is the only serious general purpose mathematics software
  that uses a mainstream programing language (Python).

\item \SAGE is the only program that allows you to use Maple,
  Mathematica, Magma, etc., all together.

\item \SAGE has more functionality out of the box than any other open
  source mathematics software.

\item \SAGE has a huge, active, and well rounded developer community:
  [sage-devel] mailing list has over 200 subscribers, working very
  hard on everything from highly optimised arithmetic, to high school
  education, to computing modular forms.

\item \SAGE development is done in the open. You can read about why
  all decision are made, have input into decisions, see a list of
  every change anybody has made, etc. This is different than the
  situation with Magma and Mathematica.  Users love this.
\end{enumerate}
\end{frame}

\begin{frame}[fragile]
\frametitle{Questions?}
\begin{tabular}{cc}
\begin{minipage}{0.7\textwidth}
\includegraphics[width=1.0\textwidth]{class_hierarchy.png}
\end{minipage}
& Thank You!  
\end{tabular} 
\end{frame}

\end{document}

