\documentclass[12pt]{article}
%\usepackage[active]{srcltx}

\usepackage{amssymb}
\usepackage{amscd}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{url}
\usepackage{xspace}

\newcommand{\SAGE}{{\sf SAGE}\xspace}
\newcommand{\sage}{\SAGE}

\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\GF}{GF}

%%%% Theoremstyles
\theoremstyle{plain}
\newtheorem*{theorem}{Theorem}
\newtheorem*{conjecture}{Conjecture}


\begin{document}

\title{Open Source Mathematical Software:\\A White Paper
%In an email, Emil Volcheck 
%(Chair of the ACM SIGSAM executive committee)
%mentioned that Bob Grafton, an NSF program officer who works 
%with symbolic computation funding, requested a ``white paper'' on
%suggested NSF funding of CAS's. This paper is to address that request.
\\
%{\small {\it (12th draft version)}}
}
\author{ D. Joyner\thanks{Math Dept, USNA, Annapolis, MD 21402,
    wdjoyner@gmail.com}\hspace{1ex} and W. Stein\thanks{Math Dept, Univ Washington,
    Seattle, WA 98195, wstein@gmail.com}}
\date{1-15-2008}
\maketitle

\tableofcontents
\newpage

Open source software has had a profound effect on computing during the
last decade, especially on web servers (Apache), web browsers
(Firefox), operating systems (Linux and OS X), and programming
languages (GCC, Java, Python, Perl, etc.).  The purpose of this paper
is to put forward the case that open source development methodologies
might also have a positive effect on mathematical software, especially
if the National Science Foundation (NSF) increases their support of
open source mathematical software development.  We argue that careful
funding of open source mathematical software may lead to a lower total
cost of ownership in the research and education community, and to more
efficient and trustworthy mathematical software.

\begin{quote}
``I think we need a symbolic standard to make computer manipulations 
easier to document and verify. And with all due respect to the 
free market, perhaps we should not be dependent on commercial 
software here. An open source project could, perhaps, find better 
answers to the obvious problems such as availability, bugs, backward 
compatibility, platform independence, standard libraries, etc. 
One can learn from the success of \TeX\ and more specialized software 
like Macaulay2. I do hope that funding agencies are looking into this.''

\hspace{3ex}-- {\em Andrei Okounkov, 2006 Fields Medalist} (see \cite{MP}).
\end{quote}

By {\it mathematical software} we mean a collection of specific
implementations of algorithms and data structures for computation with
mathematical objects such as matrices, functions, groups, rings,
graphs, differential equations, and so on.  The term {\em open source} is
defined in \cite{osi}:
\begin{quote}
  ``Open source is a development method for software that harnesses the
  power of distributed peer review and transparency of process. The
  promise of open source is better quality, higher reliability, more
  flexibility, lower cost, and an end to predatory vendor lock-in.''
\end{quote}
Anyone should be able to inspect open source software, 
modify it, and share it with others.

In Section~\ref{sec:contrib} we discuss some selected contributions of
mathematical software to mathematics research.  In
Section~\ref{sec:principles} we lay out basic values, priorities and
principles for mathematical software.  Section~\ref{sec:sage}
discusses \SAGE, which is mathematical software created
to address many ease of use and functionality issues with existing
mathematical software.  In Section~\ref{sec:which} we
briefly discuss some criteria that NSF may use in deciding which
software to consider funding, and give a list of software that
satisfies these criteria.  Finally, Section~\ref{sec:edu} discusses
open source software in the context of mathematics education.

Througout this paper we will focus about equally on the open source
software GAP and \sage, because those are the systems the
authors are most familiar with.

%\vspace{2ex}
%\noindent{\bf Key Points:}
%\begin{enumerate}
%\item
%Mathematical software leads to {\bf important advances} in pure and applied
%mathematics.
%\item 
%Funding research that critically depends on 
%{\bf closed source software} may be counterproductive. 
%\item 
%Funding research and development of open source mathematical software
%may lower the {\bf total cost of ownership}.
%\item
%Open source mathematical software is more likely to remain {\bf publicly
%accessible} than software built using closed source software.
%\end{enumerate}


\vspace{2ex}
\noindent{\bf Acknowledgment:} Many people have offered their generous
suggestions (almost all of which of which were included in one form 
of another) but we are especially grateful to ACM SIGSAM and
especially Emil Volcheck, in his capacity as chair, for support and
advice. We thank Craig Citro, Richard Fateman, Dan Grayson, and Jaap
Spies for their very careful reading and helpful suggestions.

\section{Some contributions of the software GAP}\label{sec:contrib}

Mathematical software has greatly contributed to mathematical
research, enabling exciting advances in mathematics and providing
extensive data for conjectures.  Perhaps three of the most well-known
applications of computation to mathematical research are resolution of
the {\em four-color conjecture} by Appel and Haken in 1976 (see \cite{AH},
\cite{AHK}, though it is now reproven in
\cite{RSST}), Hales's proof \cite{H} of the {\em Kepler's conjecture}, and
the formulation of the {\em Birch and Swinnerton-Dyer conjecture}
\cite{birch:bsd}  which grew out of extensive numerical computation.

To give a concrete flavor of how open source mathematical software
contribute to research, we will focus in the rest of this section on
the 20-year old open source mathematical software package GAP.  The
GAP web page lists {\em 780 publications that reference GAP}.  We now give a
few specific illustrations of these applications of GAP to
mathematical research.


\subsection{Riemann Surfaces} Max Dehn once said that there is no difference
between combinatorial group theory and the theory of the fundamental
group of two-dimensional topological surfaces. Therefore, it is not
surprising that GAP -- primarily a group theory package -- is very
helpful in the investigation of Riemann surfaces and curves with
``large'' automorphism groups.  Thomas Breuer's Ph.D. thesis \cite{B1}
initiated a computational program to exploit this connection using
GAP.  His thesis focues on the following two problems:

\begin{itemize}
\item[(1)] 
Classify all groups of automorphisms of 
compact Riemann surfaces $X$ of fixed genus $g(X)\ge 2$ up to 
equivalence of the natural action on ${\cal H}^1(X)$. 
\item[(2)] 
Classify all characters of a given finite group $G$ 
that arise from the natural action of groups of automorphisms 
(isomorphic to $G$) of compact Riemann surfaces $X$ on 
${\cal H}^1(X)$.
\end{itemize}
Heavy use of calculations with GAP help to present a 
classification as required in (1) for genus $2\le g\le 48$. 
(Only classifications for $2\le g \le 5$ had been achieved earlier.)
Considering (2), for example, he obtained full classifications for 
arbitrary dihedral and abelian groups.

The work \cite{MSV} using the GAP package BRAID 
was inspired by Thomas Breuer's  earlier work. 
Let $G$ be a finite group. By Riemann's Existence Theorem, braid
orbits of generating systems of $G$ with product 1 correspond to
irreducible families of covers of the Riemann sphere with 
monodromy group $G$. Using BRAID for the computation of braid 
orbits, it is possible to classify irreducible families of 
indecomposable rational functions with exceptional monodromy group. 
Other papers by Magaard, Shpectorov, and V\"olklein use BRAID  
to deal with other questions in the theory of 
monodromy groups of Riemann surfaces.

This is not the only use of GAP in Riemann surface theory.
Indeed, Paul Bailey, in his Ph.D. thesis \cite{Ba},
computed a Hurwitz space using GAP. Then he and
his advisor Mike Fried wrote a paper \cite{BaF}
based on a different Hurwitz space, where they also
used GAP to compute the number of components and their genus.
Joyner and Ksir \cite{JK} used it to understand which representations 
of $\SL_2(\GF(p))$ occur in the decomposition of 
$H^1(X(p),{\mathbb{C}})$, where $X(p)$ is a modular
curve and $p>5$ is a prime.

\subsection{Character theory}
Knutson's 1973 book \cite{K} contains the following conjecture:
\begin{conjecture}
Let $G$ be a finite group, $\rho$ the right regular
representation of $G$ and $\pi$ any irreducible
representation. There is a $\pi'$  in the Grothendieck ring
$R(G)$ such that $({\rm tr}\, \pi)({\rm tr}\, \pi')={\rm tr}\, \rho$.
\end{conjecture}


This was disproved by Thomas Breuer using GAP by examining character
tables of finite groups. He found that the group $\SL_2(\GF(13))$
yielded a counterexample \cite{B2}.  This discovery could, in
principle, have been done in 1973 but the search would likely have
taken too long. With GAP, it is a matter of knowing enough
representation theory to figure out what to program and then have GAP
(fairly quickly) compute the necessary data.

This is illustrative of GAP's ability to dispose of such 
character-theoretic questions with relative ease. 

\subsection{Coding theory}

The open source GAP error-correcting codes package GUAVA was
originally written in the 1990's by Jasper Cramwinckel, Erik
Roijackers, and Reinald Baart as a final project at Delft University
of Technology, Department of Pure Mathematics, under the direction of
Professor Juriaan Simonis \cite{GU}.  

Regarding a code $C$ as a vector subspace of $F^n$ ($F$ a finite
field) with a fixed basis, the key ``parameters'' of $C$ are its
length $n$, its dimension $k$, and the smallest number $d$ of nonzero
coordinates of any of the nonzero vectors in $C$. For a given $n$, the
larger $k$ is the more ``information'' $C$ can be used to transmit,
and the larger $d$ is the more errors $C$ can ``correct''. A main
problem in coding theory is to find, for a given $F$, $n$, and $k$,
the code $C$ that has the largest possible $d$.  Using GUAVA and some
additional GAP programming, a code $C$ over $\GF(8)$ with 
previously unknown parameters $[49,11,28]$ was discovered by
the first author \cite{J}. This illustrates the wide variety of
applications that GAP has to not only pure mathematics but also in
applied mathematics.

Of even more significance, GUAVA was also useful in the classification
of self-dual codes \cite{FGHP}.

Coding theory is not the only applied area of mathematics on which GAP
has had an impact.  For example, several applications of GAP to
chemistry (via the theory of crystallographic groups) are indicated on
the GAP web page under ``Examples''.

\subsection{Sporadic groups}
Sporadic groups are important objects in the classification of all
finite simple groups.  GAP has been used by many to investigate the
sporadic groups, especially the large ones, which are difficult to
analyze ``by hand''.  Two examples are A. Hulpke and S. Linton
\cite{HL}, who investigate the group $\text{Co}_3$, and S. Linton,
R. Parker, P. Walsh, and R. Wilson \cite{LPWW}, who investigate the
Monster simple group.  
%It is interesting to note that the paper
%\cite{HL} used, in addition to the ``core'' GAP functionality, the GAP
%package GUAVA referred to above.
 

\section{Rigor and design principles}\label{sec:principles}

In mathematics, correctness and verifiability rule with an iron
fist. This holds true for scholarly papers, and should
hold as well for the mathematical software that supports them.
In this section we expand on this idea and its implications
for software design. 

\subsection{Rigor in research and software}
If we (the collective ``we'' -- the society of mathematicians) are to
welcome results of mathematical software into the field as the partner
of our theorems then we must also subject the implementations to the
same level of rigor.  Mathematical theorems are usually not {\em
  formally} proved correct by writing them out as logical statements
that rely on basic axioms; likewise, we do {\em not} advocate that mathematical
software must be {\em formally} proved correct.  Formal proof of
correctness of programs is often not feasible except in fairly trivial
cases. Instead we require that any mathematician should be able to
inspect any part of a calculation, in the same way that a
mathematician can inspect any part of a proof in a research paper,
without having to sign a nondisclosure agreement. 

That proofs are openly published is critical to the development of new
mathematics.  Mathematical research usually builds on a careful
analysis of the reasoning of several key, important papers in the
field -- they extend the other paper's arguments, improve the
analysis, or provide a simpler proof of an important result. The
development of mathematical software also has the potential to greatly
benefit from this open model.  Implementations of new algorithms often
are built on older ones, and the algorithms of today form the basis of
tomorrow's algorithm.

\begin{quote}
``I think, fundamentally, open source does tend to be more stable
software. It's the right way to do things. I compare it to science
versus witchcraft. In science, the whole system builds on people looking
at other people's results and building on top of them. In witchcraft,
somebody had a small secret and guarded it -- but never allowed others
to really understand it and build on it.

Traditional software is like witchcraft. In history, witchcraft just
died out. The same will happen in software. When problems get serious
enough, you can't have one person or one company guarding their
secrets. You have to have everybody share in knowledge.''

\hspace{3em} -- Linus Torvalds, author of the Linux operating system.
\end{quote}


There is a legitimate concern that much code that might have been made
publicly available will instead be made part of commercial programs,
thereby diminishing their usefulness to the general public.  Most
commercial software requires that copyright of code they include be
signed over to them, just as assignment of copyright is required when
publishing an article in most mathematical journals.  Commercial
mathematics software closely resembles a journal that only publishes
the statements of theorems but not their proofs!  Increasingly,
implementations of mathematical algorithms whose development was
funded by taxpayers, is thus absorbed into commercial programs.  If
mathematical research were published in exactly this way, the NSF
would likely refuse to fund it.

It is not desirable for mathematical papers to be supported by
computations that cannot be inspected or verified except possibly by
employees of the commercial software that was used.  Consider the
following scenario.  A well-known mathematician, call her Jane, says a
theorem is true and she can prove it. We probably will believe her,
but she knows that she will be required to produce a proof if
required.  However, suppose now Jane says a theorem is true based on
the results of mathematical software. In this case, something else
enters into the balance -- the mathematical software.  The closest we
can reasonably hope to get to a rigorous proof (without new ideas) is
the open inspection and ability to use all the computer code on which
the result depends.  If the program is proprietary, then verification
by any researcher is usually not possible, and we mathematicians have
every right to be distrustful.  This is not only due to a vague
distrust of computers but because even the best programmers regularly
make mistakes.  Moreover, if one reads the proof of Jane's theorem in
hopes of extending her ideas or applying them in a new context, it
could be very frustrating to not have access to the inner workings of
the software on which Jane's result builds.

Even if not all mathematicians value open source mathematical software
as being {\it a priori} more trustworthy than proprietary software,
having an important algorithm in both a proprietary or commercial
program and an open source program is an advantage. Often in practice
the implementations are different, so if the commercial and open
source programs output the same answer, the result of the calculation
is perhaps more convincing.  
%If in addition a description of the
%implementation has been published in a research journal such as the
%Mathematics of Computation then an even greater degree of confidence
%is given the result.

Non-verifiable results are data, possibly even interesting data, but
{\it not rigorous mathematics}.  We are not saying such data is not
useful; only that it is not rigorous mathematics.  Here are a few
examples where such data could be important and the type of software
used (open or closed source) is not immediately relevant:

\begin{itemize}
\item[(a)]
Suppose one is searching for a counterexample to a
conjecture. Often times, it takes just one data point
to disprove a conjecture and perhaps the data point
itself, if computed using proprietary software, can be independently
checked. For example, if one is searching for a factorization of, say, 
a large integer into proper divisors, once it is found
by even a proprietary system, the result can be quickly 
verified.
 
\item[(b)] Suppose a mathematician is trying to model the banking
  industry using very complicated economic principles. Her
  mathematical model looks correct but she needs to run simulations to
  see if her parameters are reasonable. Once she has more data, she
  can focus on using mathematics to improve her model. The data itself
  is not mathematics, but it is used to help her determine what
  mathematical tools to use. For her purpose, the data could be
  gathered using commercial or open source software.
\end{itemize}
In our opinion, when possible, open source software is to be
preferred. For example, what if in case (a) the system was closed
source and next year someone wants to test a slightly different
conjecture?

We close this section with a quote by Wolfram Research from the
documentation of Mathematica that illustrates the opposing perspective
that understanding how the mathematical software we use actually works
is usually a waste of time.
\begin{quote}
``Particularly in more advanced applications of Mathematica, it may
  sometimes seem worthwhile to try to analyze internal algorithms in
  order to predict which way of doing a given computation will be the
  most efficient. And there are indeed occasionally major improvements
  that you will be able to make in specific computations as a result
  of such analyses.

  But most often the analyses will not be worthwhile. For the
  internals of Mathematica are quite complicated, and even given a
  basic description of the algorithm used for a particular purpose, it
  is usually extremely difficult to reach a reliable conclusion about
  how the detailed implementation of this algorithm will actually
  behave in particular circumstances.''

\hspace{1em}-- \url{http://reference.wolfram.com/mathematica/tutorial/WhyYouDoNotUsuallyNeedToKnowAboutInternals.html}
\end{quote}

Increasingly, proprietary software and the
algorithms used are an essential part of mathematical proofs.  To
quote Joachim Neub\"user \cite{N}, the ``father'' of GAP,
``{\em with this situation two of the most basic rules
of conduct in mathematics are violated: In mathematics information is
passed on free of charge and everything is laid open for checking.}''

\subsection{Design principles}

In trying to design mathematical software based on objective
{\it principles}, as opposed to what features will increase the
customer base the fastest, and make the most money, we want
software that is

\begin{enumerate}
\item
{\bf open source} and written in a readable and accessible language, for
reliability and extensibility,
\item
 {\bf easy to use and free} for greater availability, thus fostering 
cooperation and collaboration, 
\item 
{\bf maintainable} so that researchers are confident to build their
work on the software, and
\item
{\bf scientifically motivated} to address important research problems.
\end{enumerate}

We elaborate on some of the above points.  With open source software,
ideally it is possible for {\it anyone} who is sufficiently
comfortable with the implementation programming language to find and
fix bugs by analyzing the code, especially if the implementation
language is easy to learn and readable. This increases reliability
because it exposes the flaws (if any) in the source code to more eyes,
and is critical to long-term maintainability. 

By {\it extensibility} we mean that the source code can be analyzed,
inspected, modified and improved.  When you read the proof of a
theorem instead of just the statement, you much more deeply understand
what the theorem really asserts, you are better equipped to prove a
similar theorem, and you learn {\it techniques} that can be applied to
proving new theorems in related (and sometimes unrelated) areas.
Likewise, with open source mathematical software, something analogous
happens.

A key difference between mathematical theorems and software, is that
theorems require little maintenance (other than perhaps submitting an
errata list to the publisher for typos), whereas {\em mathematical
  software requires substantial and potentially expensive maintenance}
(bug fixes, changes in the underlying interpreter/compiler, updates
when the underlying algorithms are improved, and so on).  Mathematical
research usually generates no direct revenue for researchers, and
likewise open source mathematical software does not directly generate
revenue.  The financial support of the NSF (and other organizations)
is thus critical to the success of open source mathematical software.

\subsection{\SAGE}
\label{sec:sage}

The second author (Stein) created \SAGE \cite{sage} in 2005 to meet
the basic principles outlined above.  Since
its inception \SAGE has received substantial NSF funding (substantial
computer hardware, two workshops, student support, VIGRE-funded
undergraduate projects, etc.), and the NSF recently generously funded
a three-year \SAGE postdoc.

Instead of reinventing the wheel, \SAGE combines the best open source
mathematical software (e.g., GAP, Pari, Maxima, SciPy, and Singular) 
together in a coherent package, provides a unified interface to it, and
implements a wide range of important new functionality.  The main
guiding principles of \SAGE development are as follows:

\begin{itemize}

\item {\bf Useful}: \SAGE's intended audience 
is mathematics students (from high school to graduate
school), teachers, research mathematics, and engineers. The aim
  is to provide software that can be used to explore and experiment
  with mathematical constructions in algebra, geometry, number theory,
  calculus, cryptography, numerical computation, and many other areas. 
   
\item {\bf Efficient:} Be very fast, often as good or better than
  anything available in any other general purpose system.  \sage uses
  highly-optimized robust components including GMP, PARI, GAP, SciPy,
  Singular and NTL; these are very fast at certain operations.

\item {\bf Free and open source:} The source code must be freely
  available and readable so users can understand what the system is
  really doing and more easily extend it. 
 If you use \sage to do computations in a paper you 
  publish, you can rest assured that your readers will always have
  free access to \sage and all its source code, and you are even
  allowed to {\em archive and re-distribute} the version of \sage used.

\item {\bf Easy to read and compile:} \SAGE source code should be easy
  to read and to compile from source code.  This provides more
  flexibility for users to modify the system.  

\item {\bf Cooperation:} Provide robust {\em interfaces} to most
  mathematical software (open source and proprietary), including 
  Kash/Kant, MATLAB, Magma, Maple, and Mathematica.  \sage is meant to unify
  existing mathematics software.

\item {\bf Well documented and tested:} Tutorial, programming guide,
reference manual, with numerous examples and 
discussion of background mathematics. To be accepted, code must have
carefully formatted doctests and pass a refereeing process.

\item {\bf Extensible:} Be able to define new data types or derive
  from built-in types, and use code written in a range of languages.

\item {\bf User friendly}: Easy to understand what functionality is
  provided for a given object and view documentation and source code.
  Also easy to attain a high level of user support.
  
\end{itemize}


\section{Which mathematical software should NSF fund?}
\label{sec:which}

Research projects that mainly involve creating contributions to
proprietary systems should only be funded by the NSF if they can be
justified based on the total cost of ownership to the proposer 
{\it and others in his research area}. For example, given the choice,
funding a student or researcher to implement a needed function in an
open source mathematical software package is likely preferable to
funding dozens of researchers over the course of several years to
purchase a commercial software program to perform the same function.

Here is an example of this idea. In the 1980's Jeffrey Leon began
working on a ``partition backtracking'' programs written in C which
performs certain difficult computations in combinatorics, design
theory, and error-correcting codes very well. Though Leon soon
afterwards ceased maintaining his code, his programs were used both by
GUAVA and by MAGMA's error-correcting codes package. For years, use of
Leon's code was subject to the following: ``Copyright (C) 1992 by
Jeffrey S. Leon. This software may be used freely for educational and
research purposes. Any other use requires permission from the
author.'' As bugs were reported to the MAGMA version, presumably they
were fixed. As bugs were discovered in the GUAVA version, this license
became an increasingly serious problem. It is hard to find volunteers
to maintain someone else's abandoned code, since the original author
can do what he wants with it at any time.  Leon was convinced, through
a fortuitous series of events, to release his code in April 2007 under
an open source license that allows others to modify and improve his
code. Immediately afterwards (within hours), Robert Miller, (graduate
student, University of Washington) and Tom Boothby (undergraduate,
University of Washington), began fixing all of the bugs in Leon's code
as part of Jim Morrow's NSF-funded REU at University fo Washington.
Within a month, all the known bugs were fixed.  

The ``openness'' of the new license (the GNU Public License), combined
with the research and educational necessity to have more rigorously
verifiable data for Robert Miller's Ph.D. research (which Leon's code
was used to produce), were the main motivations for Robert Miller to
volunteer his work as he did (and continues to do).  This case
illustrates that (a) great open source software can be maintained with
a little NSF support (NSF provided support for Robert Miller
and Tom Boothby for this work), (b) there is a direct research and
educational benefit to this support, (c) the students gain self-esteem
and a greater sense of service in the knowledge that their work can
now be used by everyone for free. (In our experience, it is remarkable
how well ``service to the scientific/educational community'' motivates
so many students.)

The following is an alphabetical list of some open source mathematical
software projects.

\begin{itemize}\setlength{\itemsep}{0ex}

\item
Axiom (and OpenAxiom and FriCAS)

\item
CoCoA version 5

\item
GAP

\item
GINAC 

\item
Macaulay2

\item
Magnus

\item
Maxima

\item
Octave

\item
Pari

\item
R

\item
\sage

\item
scipy

\item
Singular

\item
YACAS

\end{itemize}

We next sketch some details about these systems.

\begin{itemize}
\item
Axiom is a general purpose computer algebra system. 
It is useful for research and development of mathematical algorithms. 
It defines a strongly typed, mathematically correct type hierarchy. 
It has a programming language and a built-in compiler. 
Axiom is free and open source (distributed under a BSD-like license). 
See also the Axiom developer page,
\url{http://wiki.axiom-developer.org/FrontPage/},
the FriCAS page
\url{http://www.math.uni.wroc.pl/~hebisch/fricas.html},
and the OpenAxiom page
\url{http://www.open-axiom.org/index.html}.

For example, Axiom is a leader in ``reverse computation''
(guessing formulas for a sequence given its first few terms;
see Martin Rubey's package GUESS \cite{R}).

\item
CoCoALib 5 (``{\it Co}mputations in {\it Co}mmutative {\it A}lgebra'') 
Its web page is: \url{http://cocoa.dima.unige.it/} (at the time of this
writing, CoCoALib 5 is still in development version).
 
\item
GAP is a system for computational discrete algebra, with particular
emphasis on computational group theory. GAP provides a programming
language, a library of thousands of functions implementing algebraic
algorithms written in the GAP language as well as large data libraries
of algebraic objects. GAP is used in research and teaching for
studying groups and their representations, rings, vector spaces,
algebras, combinatorial structures, error-correcting codes, and
more. GAP is included in \sage and is
distributed freely under the GNU General Public
License.\url{http://www.gap-system.org/}

\item
GINAC
("Ginac Is Not A Cas") does not try to provide extensive algebraic
capabilities and a simple programming language but instead accepts a given
language (C++) and extends it by a set of algebraic capabilities. See the
tutorial for more details. It is free software distributed under the GPL.
\url{http://www.ginac.de/}.

\item
Macaulay2 is mathematical software for algebraic geometry and
commutative algebra that has {\em received substantial NSF
  funding.}  It is distributed under the terms of the GNU General
Public License, version 2.  \url{http://www.math.uiuc.edu/Macaulay2/}.

\item
The Magnus Computational Group Theory Package is an innovative symbolic
algebra package providing facilities for doing calculations in and about
infinite groups. It is distributed under the terms of the 
GNU General Public License, version 2.
\url{http://zebra.sci.ccny.cuny.edu/web/nygtc/software/aboutmagnus.html}.

\item
Maxima is general purpose mathematical software, with abilities such
as symbolic integration, 3D plotting, and an ODE solver. Maxima is a
descendant of DOE (Department of Energy) Macsyma, which had its
origins in the late 1960s at MIT. Macsyma was the first of a new breed
of computer algebra systems, leading the way for programs such as
Maple and Mathematica. This particular variant of Macsyma was
maintained by William Schelter from 1982 until he passed away in
2001. In 1998 he obtained the copyright from the Department of Energy
and made the source code open source.
\url{http://maxima.sourceforge.net/}.
Maxima is included in \sage.

\item
GNU Octave is primarily intended for numerical computations. It
provides a convenient command line interface for solving linear and
nonlinear problems numerically, and for performing other numerical
experiments using a language that is mostly compatible with Matlab. It
may also be used as a batch-oriented language. You may redistribute
Octave and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation.
\url{http://www.octave.org}.

\item
PARI/GP is a widely used computer algebra system designed for fast
computations in number theory (factorizations, algebraic number theory,
elliptic curves...), but also contains a large number of other useful
functions to compute with mathematical entities such as matrices, polynomials,
power series, algebraic numbers, etc., and many transcendental
functions. It is distributed under the GNU General Public License.
\url{http://pari.math.u-bordeaux.fr/} and is included in \sage.

\item
The R Project for Statistical Computing is a system for 
statistical computation and graphics. It consists of a language 
plus a run-time environment with graphics, a debugger, access to 
certain system functions, and the ability to run programs stored 
in script files. See also CRAN for some mirror sites and extensions. 
It is open source software distributed under a GNU-style copyleft, and 
an official part of the GNU project. 
\url{http://www.r-project.org/}.

\item
\sage was mentioned above already.
\url{http://www.sagemath.org/}.

\item
SciPy (pronounced ``Sigh Pie'') is free open-source software for
numerical mathematics, science, and engineering that is included in
\SAGE. It is written in C, Python and Fortran.  The commercial company
Enthought maintains SciPy and uses it to provide its clients with
solutions to industrial problems. \url{http://www.scipy.org/}.

\item
Singular is a Computer Algebra System for polynomial computations 
with special emphasis on the needs of commutative algebra, 
algebraic geometry, and singularity theory. It is distributed 
freely under the GNU General Public License.
\url{http://www.singular.uni-kl.de/}, and is included in \sage.

\item
YACAS (``{\it Y}et {\it A}nother {\it C}omputer {\it A}lgebra {\it S}ystem'') 
is a a program for symbolic
manipulation of mathematical expressions. The system has a library 
of scripts that implement many of the
symbolic algebra operations; new algorithms can be easily added to the
library. (Unlike Maxima, YACAS also function as a {\it library} and is 
written in C++.). It is open source software. 
\url{http://yacas.sourceforge.net/}.

\end{itemize}

\section{Educational impact}\label{sec:edu}

Mathematical education is incredibly important to mathematical
research and to a healthy economy, so we conclude this paper with some
remarks on the educational impact of the principles discussed in
Section~\ref{sec:principles}.

Through many programs, such as CSUMS, CCLI and VIGRE, the NSF 
generously supports educational training and development
in U.S. universities and colleges. Much of this support involves
development of software ``modules'' (worksheets for particular software,
with some mathematical explanation, and accompanying exercises).

When the worksheets developed using NSF funds use proprietary
software, then not only must all the students have access to the
system (at a considerable cost to either the student or the school),
but any other school that wishes to make use of this
government-funded work must also purchase this software.

Now, contrast this with the situation for free software.  When
worksheets developed using NSF funds use a free and cross-platform
program, then not only can all the students have equal (free) access
to the system, but any other school (no matter what their software
budget is) that wishes to make use of this government-funded work can
also do so.  The total cost of ownership and the greater accessibility
of such worksheets make a compelling case that the NSF should
fund educational projects that involve free and open source software.

%Another illustration of the educational impact: 
Ted Kosan is currently developing 
teaching materials for computer technology for 
distance learning courses taught to high-schoolers in Ohio. 
He selected \SAGE. In his own words \cite{Ko}:

\begin{quotation}
``As part of this process, I have been searching for open source
mathematics software that has a modern programming environment
intimately integrated into it.  I also wanted it to be alive and well
20 or 30 years from now.  After a long and grueling search I have
finally decided to go with \SAGE.  I think that \SAGE's design
philosophy is brilliant and the balance it strikes between mathematics
and computing is exceptional.''
\end{quotation}

% There is one other impact worth mentioning - the contribution to 
% research in computer algebra. The development of \SAGE, 
% Axiom, GAP, MAGMA, SciPy, and even commercial
% mathematical software has forced one to address the following
% questions:
% 
% \begin{itemize}
% \item
% What types of data structures 
% should be implemented in an interpreted computer language 
% designed to solve problems in group theory?
% \item
% How should the data structure 
% representing a homomorphism of abelian groups be related (if at all)
% to homomorphisms of (slightly more general) polycyclic groups,
% or to (much more generally) finitely presented groups? 
% \item
% Once a property of an object (say, a group or a linear code) 
% is computed, how is this best stored in memory?
% \end{itemize}
% 
% Generally, how does one best to think of mathematics from 
% the computer scientist's point of view?
% 
% These types of important questions must be carefully thought out by
% mathematical software developers. Only by continued NSF funding can
% these issues be properly worked out, thereby leading to more efficient
% implementations, faster computations, and therefore more new
% computational discoveries.
% 
% %\section{Impact in Industry of open source mathematical software}
%
%Both the writers being in the academic world, we are
%not experts on the commercial impact of mathematical software.



\section{Conclusions}

Mathematical software leads to important advances in mathematics
(Kepler's conjecture, the classification of automorphism groups of
Riemann surfaces, the theory of error-correcting codes, and so on).
We have discussed how greater funding can lead to new and better
research.

Funding open source mathematical software has the potential to lead to
a lower total cost of ownership in the research and educational
community.

Finally, careful funding of certain open source mathematical software
projects will potentially lead to much more efficient and
trustworthy software tools for mathematicians.



\newpage
\begin{thebibliography}{99}

\bibitem[AH]{AH}
K. Appel and W. Haken, ``Every planar map is four colorable,''
Part I. Discharging, Illinois J. Math. 21 (1977), 429-490.

\bibitem[AHK]{AHK}
K. Appel, W. Haken and J. Koch, ``Every planar map is four colorable,''
Part II. Reducibility, Illinois J. Math. 21 (1977), 491--567.

\bibitem[Ba]{Ba}
Paul Bailey,
{\it Incremental Ascent of a Modular Tower via Branch Cycle Designs},
Ph.D. Dissertation (2002).

\bibitem[BaF]{BaF}
------ and Michael Fried,
``Hurwitz monodromy, spin separation, and higher levels of a Modular Tower,'' 
Proc Symp Pure Math, vol. 70, American Math. Society (2002), 79-220.

\bibitem[BSD]{birch:bsd}
B.\thinspace{}J. Birch, \emph{Elliptic curves over \protect{${\mathbf{Q}}$:
  {A}} progress report}, 1969 Number Theory Institute (Proc. Sympos. Pure
  Math., Vol. XX, State Univ. New York, Stony Brook, N.Y., 1969), Amer. Math.
  Soc., Providence, R.I., 1971, pp.~396--400.

\bibitem[B1]{B1}
T. Breuer. {\it Characters and Automorphism Groups of 
Compact Riemann Surfaces}, Volume 280 of the London Mathematical 
Society Lecture Notes Series, Cambridge University Press, 2000.

\bibitem[B2]{B2}
------, private email and postings to Group-Pub Forum 
email list, March 2003.

\bibitem[FGHP]{FGHP}
J. Fields, P. Gaborit, W. C. Huffman, V. Pless, 
``On the classification of extremal even formally self-dual codes 
of lengths 20 and 22,'' Discrete Appl. Math., 111 (1-2), (2001), p. 75--86.

\bibitem[GAP]{GAP4}
 The GAP~Group, \emph{GAP -- Groups, Algorithms, and Programming, 
Version 4.4}; 2005, \url{http://www.gap-system.org/}.

\bibitem[GU]{GU}
D. Joyner, ``GUAVA: An error-correcting codes package,''
Communications in Computer Algebra, vol 152, June 2005, pages 65-68.

\bibitem[H]{H} 
T. C. Hales, ``The Kepler conjecture,'' preprint math.MG/9811078.

\bibitem[HL]{HL}
Alexander Hulpke and Steve Linton, 
``Construction of Co3. An example of the use of an integrated system for 
computational group theory,'' Groups St Andrews 1997 in Bath, (CUP, 1999).

\bibitem[J]{J}
D. Joyner, ``Toric codes over finite fields,''
Appl. Alg. Eng. Comm. Comp., 15 (1), (2004), p. 63--79.

\bibitem[JK]{JK} ------ and A. Ksir,
``Modular representations on some Riemann-Roch spaces of 
modular curves X(N),'' in {\it Computational Aspects 
of Algebraic Curves}, Editor: T. Shaska, Lecture Notes 
in Computing, WorldScientific, 2005.

\bibitem[K]{K}
D Knutson,
{\it $\lambda$-rings and the representation theory of the symmetric group},
Lecture Notes in Mathematics, vol. 308, Springer-Verlag,
1973.

\bibitem[Ko]{Ko} T. Kosan, post to \sage -support email list:
\newline
\url{http://thread.gmane.org/gmane.comp.mathematics.sage.support/1263}

\bibitem[L]{L} S. Linton, {\it GAP: Groups, Algorithms \& Programming},
a SAGE Days 1 slide presentation.
\newline 
\url{http://www.sagemath.org/sage/days1/linton.pdf}
\newline
\url{http://sage.scipy.org/sage/days1/linton.pdf}

\bibitem[LPWW]{LPWW}
S. Linton,  R. Parker, P. Walsh, and R. Wilson,   
``Computer construction of the Monster,'' J. Group Theory, 1 
(1998), p. 307--337

\bibitem[MP]{MP} Vicente Mu\~{n}oz and Ulf Persson,
``Interviews with Three Fields Medalists,''
Notices of the AMS, March 2007, Volume 54 , Number 3 (2007)
405-410.
\newline 
{\small{
\url{http://www.ams.org/notices/200703/comm-fields-interviews.pdf}
}}

\bibitem[MSV]{MSV}
K. Magaard and S. Shpectorov, and H. V\"olklein,   
``A GAP package for braid orbit computation and applications,'' 
Experiment. Math., 12, (2003), p. 385--393.

\bibitem[N]{N} J. Neub\"user, ``An invitation to Computational Group Theory,''
in {\bf Groups St Andrews, Galway, 1993}, (ed.  C. M. Campbell),
Cambridge University Press, 1995.
\newline
Available at: \url{http://www.gap-system.org/Doc/Talks/talks.html}.

\bibitem[OSI]{osi}
Open Source Initiative, \url{http://www.opensource.org/}.

\bibitem[RSST]{RSST}
N. Robertson, D. P. Sanders, P. D. Seymour and R. Thomas, 
``The four colour theorem,'' J. Combin. Theory Ser. B. 70 (1997), 2-44.

\bibitem[R]{R} Martin Rubey, {\it Extended Rate, more GFUN}, preprint 2007. 
Available at: \url{http://front.math.ucdavis.edu/math.CO/0702086}.

\bibitem[SAGE]{sage}
W. Stein, \emph{{SAGE} {M}athematics {S}oftware ({V}ersion 2.8)}, The
  SAGE~Group, 2007, \url{http://www.sagemath.org}.



\end{thebibliography}



\end{document}
