%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) William Stein
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{beamer}
\usepackage{beamerthemesplit}
\usepackage{pgfpages}
%\pgfpagesuselayout{4 on 1}[letterpaper,landscape, border shrink=5mm]
%\setbeamercolor{background canvas}{bg=black!5}
\usepackage{graphicx}
\newcommand{\page}[1]{\frame{#1}}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{color}
\definecolor{dbluecolor}{rgb}{0,0,0.6}
\definecolor{dredcolor}{rgb}{.5,0.0,0.0}
\definecolor{dgreencolor}{rgb}{0,0.4,0}
\definecolor{blue}{rgb}{.02, .02, .908}
\newcommand{\dred}{\color{dredcolor}\bf}
\newcommand{\dblue}{\color{dbluecolor}\bf}
\newcommand{\dgreen}{\color{dgreencolor}\bf}
%\newcommand{\dred}{\bf}
%\newcommand{\dblue}{\bf}
%\newcommand{\dgreen}{\bf}
\usepackage{xspace} % to allow for text macros that don't eat space
\newcommand{\SAGE}{{\color{blue}\sf SAGE}\xspace}
\newcommand{\sage}{\SAGE}
\title{SAGE: Software for Algebra and Geometry Experimentation}
\author{William Stein}
\date{July 12, 2006: CNTA\vspace{4ex}\\\includegraphics[width=1.5in]{pics/icon-5}}
\bibliographystyle{amsalpha}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\defn}[1]{{\em #1}}
% ---- SHA ----
\DeclareFontEncoding{OT2}{}{} % to enable usage of cyrillic fonts
\newcommand{\textcyr}[1]{%
{\fontencoding{OT2}\fontfamily{wncyr}\fontseries{m}\fontshape{n}%
\selectfont #1}}
\newcommand{\Sha}{{\mbox{\textcyr{Sh}}}}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\Vis}{Vis}
\DeclareMathOperator{\HH}{H}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\ord}{ord}
\renewcommand{\H}{\HH}
\newcommand{\hra}{\hookrightarrow}
\newcommand{\isom}{\cong}
\newcommand{\ds}{\displaystyle}
\renewcommand{\t}[1]{\begin{center}{\Large{\dblue #1}}\end{center}}
\begin{document}
\page{
\maketitle
Turn on my recorder and thank the organizers!
}
\begin{frame}[fragile]
\vfill
\t{The \sage Mailing List on Feb 2, 2006}
\vfill
{\tt
Dear SAGE community.\vspace{2ex}
My name is Tiziano and I'm from Italy. I'm
writing this mail first of all because I would
like to thank you all for SAGE. It's something
the world was really missing.\vspace{2ex}
[Every free computer algebra system I've tried
has] {\large\dred ``reinvented many times the wheel without
being able to build the car.''}
}
\vspace{2ex}
\vfill
\begin{center}
\hspace{-5ex}\includegraphics[height=0.3\textheight]{pics/car}
\qquad\qquad\includegraphics[height=0.3\textheight]{pics/tire_pile}
\end{center}
\end{frame}
\begin{frame}
\hfill
\t{PART I: SAGE -- Background: Why bother when we already have Magma? Isn't
it enough for everything we'll ever need?}
\hfill
\t{PART II: SAGE -- Status Report and Tour}
\hfill
\end{frame}
\begin{frame}
\t{Mathematics Software Timeline}
{\large
\hspace{-4em}
\begin{center}
\begin{tabular}{lllll}
1960s-now & 1970s-now & 1980s-now & 1990s-now & 2005-now\\\hline
{\dblue Maxima} & {\dgreen Mathematica} & {\dgreen Magma} & {\dblue Singular} & {\dblue SAGE}\\
& {\dgreen Maple} & {\dblue GAP} & {\dblue Macaulay2} & \\
& {\dred Axiom} & & {\dblue PARI} & \\
\end{tabular}
\end{center}
}
\end{frame}
\begin{frame}[fragile]
\t{What is SAGE?}
\includegraphics[width=0.9\textwidth]{pics/sage_vancouver}
\end{frame}
\begin{frame}[fragile]
\t{What is SAGE?} I started SAGE in {\bf\dred January 2005}, and it
has since mushroomed. There are now dozens of contributors all over
the world, and an
active mailing list. \vfill
\begin{enumerate}
\item {\dblue Completely \underline{free} and open source} {\em distribution}
of math software for Windows, OS X, and Linux. (All
under GPL compatible licenses.)
\vfill
\item {\dblue A new computer algebra system:} Uses a
{\em mainstream} language (unlike Magma, GAP, Mathematica,
Maple, etc.)
\vfill
\item {\dblue A new way to use your software:} use your
favorite ({\dred commercial} or free) mathematics software
{\em together}.
\end{enumerate}
\vfill
Strong {\dred number-theoretic bias} since I'm a number theorist.
\end{frame}
\begin{frame}
\t{1. Does Open Source Matter for Math Research?}
\small
``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? ''
\vspace{2ex}
-- J. Neub\"user in {\bf\LARGE 1993} (he started GAP in 1986).
\end{frame}
\begin{frame}[fragile]
\t{2. SAGE: A New Computer Algebra System}
\begin{verbatim}
algebras edu interfaces modular schemes
categories ext lfunctions modules sets
coding functions libs monoids structure
crypto geometry matrix plot tests
databases groups misc rings
$ cat */*.py */*/*.py */*/*/*.py */*.pyx */*/*.pyx |sort|uniq|wc -l
73451 # unique lines of human-written source code
$ cat */*.py */*/*.py */*/*/*.py */*.pyx */*/*.pyx |wc -l
142402
$ cat */*.py */*/*.py */*.pyx */*/*.pyx |sort|grep "sage: " | wc -l
11123 <-------- EXAMPLE INPUT LINES!
\end{verbatim}
\end{frame}
\begin{frame}
\t{Python: A \underline{Mainstream} Language}
\begin{itemize}
\item Completely free {\dred open source} language.
\item Guido van Rossum released first Python in {\dred 1991}.
\item A {\dblue ``gluing language''}, i.e., designed to be
easy to use other libraries and other programs.
\item {\dblue VAST range of libraries}: web servers,
2d and 3d graphics, numerical analysis, etc.
\item {\dblue Code:} Very easy to learn, read and explore.
%\item {\tt function?} gives documentation about function
%and {\tt function??} gives the {\bf source code}.
\item {\dblue IPython:} Excellent command line.
\item \SAGE programs can be written in Python. And Python
{\dblue can be used as a C/C++ library}, so SAGE can also be.
%\item Ken Nakamula's NZMATH is also in Python, so some sharing possible.
\end{itemize}
\mbox{}\hspace{3in}\includegraphics[width=1in]{pics/guido}
\end{frame}
\begin{frame}
\t{Pyrex: Compiled Python-like language}
\vfill
\begin{enumerate}
\item Written by {\dred Greg Ewing} of New Zealand.
\vfill
\item Code converted to C code that
is {\dred compiled by a C compiler}. All non-C memory
management done automatically.
\vfill
\item Very easy to read.
\vfill
\item Easy to use both C/C++ code and libraries and Python
code from Pyrex.
\vfill
\item {\dred Time-critical} \sage code gets implemented
in Pyrex, which is (as fast as) C code, but easier
to read (e.g., since all variables and scopes are explicit).
%And more of SAGE will be moved to Pyrex in the near future.
\item Analogue of PARI's brilliant {\dred gp2c}.
\end{enumerate}
\end{frame}
\page{
\t{3. Cooperation:\\``Everything Under One Roof'' (Stoll)}
({\dblue Blue} -- included with \sage):\mbox{}
\begin{itemize}
\item {\dblue GAP} -- groups, discrete math
\item {\dblue Singular} -- polynomial computation
\item {\dblue PARI {\em and} GP} -- number theory
\item {\dblue Maxima} -- symbolic manipulation
\item {\dblue mwrank, ec, simon, sea} -- elliptic curves
\item {\blue GMP-ECM, gfan, sympow, NTL, genus2reduction, polymake,
lcalc (Rubinstein), Dokchitser ($L$-series); and much more!}
\item Macaulay2 -- commutative algebra
\item KANT/KASH -- sophisticated algebraic number theory
\item Magma -- I {\dred\em really like} Magma!
\item Maple -- symbolic, educational
\item Mathematica -- symbolic, numerical, educational
\item Octave -- numerical analysis
\end{itemize}
}
\begin{frame}
\t{Status Report}
\begin{enumerate}
\item {\dred \sage can do {\em much} already}. ICM satellite
conference has a list of 15 problems that they invited authors of
computer algebra systems to solve. Last I
checked, \SAGE was the only one that could
{\dred solve all of them}.
\item {\dred Growing pains:} \SAGE has bugs and annoying issues; these
do get steadily resolved over time, especially as more and more people
use \sage.
\item {\dred Gotchas:} Using a mainstraim language (Python) instead of a
custom language -- The pros far outweight the cons, but there are
definite cons.
\item {\dred Installation:} Binary install not easy enough yet; cause
is lack of sufficiently stable releases. Next stable release: November.
\item {\dred Optimization:} Some new code is still
{\em \blue slower} than the non-free counterpart.
This primarily affects new algorithms implemented for
\sage, e.g., a PARI or GAP program called from \sage
is no slower than in PARI or GAP.
\end{enumerate}
\end{frame}
\begin{frame}
\t{Longterm GOALS for SAGE}
\begin{itemize}
\item Create {\dred the best} software environment for
{\em\dblue all} types of serious mathematics
research computation: {\dblue BUILD THE CAR}.\\
(I personally focus on number theory.)
\item Build a large {\dblue user base}.
\item Build a large {\dblue developer base} (with substantial
input from {\dred undergraduates}, who are the best programmers).
\item Do things {\dblue not done well enough} in other free mathematics
software before, e.g.:
\begin{itemize}
\item Web browser {\dred graphical user interface}
\item Integrated support for {\dred distributed computation}
\item {\dred Database} support, saving and loading individual objects
\item Exact {\dred linear algebra}
\end{itemize}
\item Start a {\dred SAGE Foundation}.
\item Longterm target audience: undergraduates, grad students, both
pure and applied mathematicians.
\end{itemize}
\end{frame}
\begin{frame}
\t{SAGE Workshops}
\begin{center}
\includegraphics[width=0.7\textwidth]{pics/img_1107}\\
\end{center}
\begin{itemize}
\item February 2006 (past): {\dred SAGE Days 1} in San Diego.
\item July 2006: {\dred SIMUW} 2-week workshop for {\em high school}
on the BSD conjecture that made extensive use of SAGE.
\item August 2006: {\dred MSRI grad student Workshop}
\item October 6--10, 2006: {\dred SAGE Days 2} in Seattle.
\end{itemize}
\hspace{18em}\includegraphics[width=0.5\textwidth]{pics/kohel}\\
\end{frame}
\begin{frame}
\includegraphics[width=\textwidth]{pics/poster-sagedays2.jpg}
\end{frame}
\begin{frame}
\t{SAGE Developers}
\begin{itemize}
\item I've hired
a team of {\dred five undergrads} to work on \sage.
\item Some \sage developers:
{\bf David Joyner},
{\bf Tom Boothby},
{\bf Martin Albrecht},
{\bf Alex Clemesha},
{\bf David Kohel},
{\bf Josh Kantor},
{\bf Bobby Moretti},
{\bf Gary Zablackis},
Gonzalo Tornaria,
Emily Kirkman,
Yi Qiang,
Ifti Burhanuddin,
John Cremona,
Didier Deshommes,
Naqi Jaffery,
Kiran Kedlaya,
David Roe,
David Kirkby,
Jon Hanke,
Gregg Musiker,
Fernando Perez,
Kyle Schalm,
Steven Sivek,
Jaap Spies,
Justin Walker,
Mark Watkins,
Joe Wetherell
\item {\dred Authorship is very explicit} whenever possible. {\em Try
it} -- send me an example for the documentation and your name will
be in the SAGE source code and docs.
\end{itemize}
\hspace{17em}\includegraphics[width=0.4\textwidth]{pics/sage-lab-uw2}
\end{frame}
\begin{frame}
\t{PART II: SAGE -- Status Report and Tour}
\begin{itemize}
\item {\dred Documentation:} tutorial, install guide, constructions,
reference manual, programming guide.
\item {\dred Download:} Source code; binaries for Linux, Windows, OS X
\item {\dred Mailing lists:} Support, Devel, Announce, Forum, DARCS.
\item {\dred Home for Software:} genus2reduction, lcalc, Hanke, sympow,
Simon's 2-descent, SEA, etc.; no need to rewrite your package
in another language, e.g., if you love C++ or PARI use it!
\item {\dred SAGE Notebook:} Flexible Web-browser based graphical
user interface for \SAGE
\item {\dred Databases:} Cremona, Sloane, Jones, Stein-Watkins, etc.
\item {\dred Elliptic Curves:} algorithms, graphs, etc.
\item {\dred Using PARI, GAP, Magma, etc. from SAGE}
\item {\dred Modular Forms:} much written; need optimization and testing
\end{itemize}
\end{frame}
\begin{frame}
\t{Documentation}
\begin{itemize}
\item {\dred Tutorial} -- 98 pages, written mainly by David Joyner with many
contributors. Done. If you want to learn SAGE,
sit down and spend 2--3 hours with this.
\item {\dred Install guide} -- 20 pages. Done.
\item {\dred Constructions} -- 103 pages, by David Joyner, answers dozens
of questions like ``How do a make a [[blank]] in \sage?'' Done.
\item {\dred Reference manual} -- 1258 pages; partly .tex files
and partly generated from source code files (literate programming).
Needs many more examples and intro text.
\item {\dred Programming guide} -- 65 pages; needs more, especially
regarding style.
\end{itemize}
\end{frame}
\begin{frame}
\t{Downloading SAGE}
\begin{itemize}
\item Show the web page.
\end{itemize}
\end{frame}
\begin{frame}
\t{DARCS}
\begin{itemize}
\item An excellent mature {\dred distributed} revision control system that
Gonzalo Tornario convinced us to use.
\item SAGE makes very extensive use of DARCS.
\item Makes my life vastly easier.
\item I still can't keep up with the volume of quality code
I'm getting though!
\end{itemize}
\end{frame}
\begin{frame}
\t{SAGE Command Line}
\begin{itemize}
\item SAGE uses IPython, which was written by Fernando Perez, who is a
computational physicist at University of Colorado.
\item By far the best command line I've ever used for any program.
\item Persistent history, completion, introspection,
interactive debugger, etc.
\item Under active development and moving forward.
\end{itemize}
\end{frame}
\begin{frame}
\t{SAGE Notebook}
\begin{itemize}
\item Writing a GUI -- why reinvent the wheel? Web browsers
do 90\% of the work already.
\item Alex Clemesha, Tom Boothby, and I wrote this
from scratch last month.
\item Fills a gap in open source software -- until now
there was no GUI for most open source math software.
Can be started in Magma/PARI/etc. mode.
\item Web browser based, which adds flexibility -- several
people can interact with the same session remotely, etc.
\item Very usable right now, though we have many ideas
for new features to add.
\item Can queue up calculations; use multiple worksheets
at once; save/load objects, worksheets, etc.
\item Try it any time: {\tt http://sage.math.washington.edu:8100}
\end{itemize}
\end{frame}
\begin{frame}
\t{Databases}
\begin{itemize}
\item Cremona's elliptic curves
\item Jones's global number fields
\item Stein-Watkins (over 100 million elliptic curves)
\item Sloane's integer sequences
\item Conway Polynomials
\item Etc...
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\t{Elliptic Curves}
\begin{itemize}
\item Birch and Swinnerton-Dyer related functions.
\item MWRANK -- SAGE provides an interpreter interface
\item $L(E,s)$
\item Plots
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\t{Using PARI, GAP, Magma, etc. from SAGE}
{\tiny\begin{verbatim}
sage: n = -2007
sage: print n.factor()
-1 * 3^2 * 223
sage: print factor(n)
-1 * 3^2 * 223
sage: n.factor(algorithm="kash")
-1 * 3^2 * 223
sage: gap(n).FactorsInt()
[ -3, 3, 223 ]
sage: pari(n).factor()
[-1, 1; 3, 2; 223, 1]
sage: gp(n).factor()
[-1, 1; 3, 2; 223, 1]
sage: maxima(n).factor()
-3^2*223
sage: kash(n).Factorization()
[ <3, 2>, <223, 1> ], extended by:
ext1 := -1,
ext2 := Unassign
sage: magma(n).Factorization(nvals = 2)
([ <3, 2>, <223, 1> ], -1)
sage: maple(n).ifactor()
-``(3)^2*``(223)
sage: mathematica(n).FactorInteger()
{{-1, 1}, {3, 2}, {223, 1}}
...
magma> n := -2007;
magma> F, s := Factorization(-2007);
magma> print F, s
[ <3, 2>, <223, 1> ]
-1
sage: magma('F')
[ <3, 2>, <223, 1> ]
\end{verbatim}}
\end{frame}
\begin{frame}[fragile]
\t{Saving and Loading Objects}
Most objects in \sage can easily be loaded and saved
in a compressed format. (This is a standard feature of Python!)
{\tiny
\begin{verbatim}
sage: R. = PolynomialRing(QQ,2)
sage: f = y^2 + y - x^3 - 17/3*x + 2/3
sage: f.save('f')
sage: load('f')
2/3 + y + y^2 - 17/3*x - x^3
sage: A = MatrixSpace(QQ,50).random_element()
sage: A.save('amat')
sage: load('amat')
[ 2 -1 2 2 2 -2 -1 -2 2 2 -2 1 -1 -1 2 -2 1 -1 -1 -1 1 -1 1 -1 2 1 1 -1 -1 2 -1 -1 -2
1 -2 -1 1 2 -2 2 2 -1 -2 1 -1 1 -2 2 2 -1]
...
sage: M = ModularSymbols(Gamma1(13),2); M
Modular Symbols space of dimension 15 for Gamma_1(13) of weight 2 with
sign 0 and over Rational Field
sage: M == loads(dumps(M))
True
sage: D = M.decomposition(2)
sage: D
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 15 for Gamma_1(13) of
weight 2 with sign 0 and over Rational Field,
...]
sage: D.save('D')
sage: load('D')
[
Modular Symbols subspace of dimension 1 of Modular Symbols space of dimension 15 for Gamma_1(13) of
weight 2 with sign 0 and over Rational Field, ...
]\end{verbatim}
}
\end{frame}
\begin{frame}[fragile]
\t{Some Algebraic Number Theory}
This examples makes lots of use of the PARI C library
and GAP.
{\tiny
\begin{verbatim}
sage: V = NumberField(x^2+17).composite_fields(NumberField(x^3-2))
sage: print V
sage: K = V[0]
[Number Field in a with defining polynomial x^6 + 51*x^4 - 4*x^3 + 867*x^2 + 204*x + 4917]
sage: G = K.galois_group()
sage: G
Transitive group number 3 of degree 6
sage: G.order()
12
sage: G.conjugacy_classes_representatives()
[(), (2,6)(3,5), (1,2)(3,6)(4,5), (1,2,3,4,5,6), (1,3,5)(2,4,6), (1,4)(2,5)(3,6)]
sage: gg = gap(G)
sage: gg.NormalSubgroups()
[ Group(()), Group([ (1,4)(2,5)(3,6) ]), Group([ (1,3,5)(2,4,6) ]),
Group([ (1,3,5)(2,4,6), (1,2)(3,6)(4,5) ]),
Group([ (1,3,5)(2,4,6), (2,6)(3,5) ]),
Group([ (1,2,3,4,5,6), (1,3,5)(2,4,6) ]), D(6) = S(3)[x]2 ]
sage: K.class_group()
Multiplicative Abelian Group isomorphic to C4
\end{verbatim}
}
\end{frame}
\begin{frame}[fragile]
\t{\large Not Just For Number Theory... E.g., Toric Geometry }
\begin{verbatim}
sage: P. = ProjectiveSpace(3,QQ)
sage: C = P.subscheme([y^2-x*z, z^2-y*w, x*w-y*z])
sage: len(C.irreducible_components()) # twisted cubic
1
sage: J = C.defining_ideal()
sage: G = J.groebner_fan()
sage: len(G.reduced_groebner_bases())
8
sage: G.fvector()
(1, 8, 8)
sage: f = prod(J.gens()) # \/-- newton polytope
sage: NP = polymake.convex_hull(f.exponents())
sage: NP.facets()
[(3/2, 5/2, -1, 0), (3, 1, -1, 0), (1, 0, 0, 0),
(-3/2, 2, 1, 0), (3, -1, 4, 0), (-3, 1, 5, 0)]
\end{verbatim}
\end{frame}
\begin{frame}[fragile]
\hfill
\t{Thanks}
\hfill
\end{frame}
%\begin{frame}
%\t{Attribution}
%\begin{itemize}
%\item Files, function docs, and the reference
% manual {\dblue state clearly who the author is}!
%\item {\dgreen Citation:}
% William Stein and David Joyner, \emph{SAGE: System for algebra and geometry
% experimentation}, Communications in Computer Algebra (SIGSAM Bulletin) (July
% 2005), {\tt http://sage.sourceforge.net/}.
%\item {\dblue VERY Important!} Always cite the underlying backends used
%by \sage for your work, e.g., GAP, Singular, PARI, Kash, etc. Ask in
%\sage forum and/or use {\tt function??} to view source.
%\end{itemize}
%\end{frame}
\end{document}