Differences between revisions 4 and 40 (spanning 36 versions)
Revision 4 as of 2006-11-19 21:23:12
Size: 6425
Editor: DavidJoyner
Comment:
Revision 40 as of 2014-07-20 19:51:41
Size: 6821
Editor: chapoton
Comment: no more hg
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Short introduction to SAGE: Software for Algebra and Geometry Experimentation == == A Short Introduction to Sage ==
Line 3: Line 3:
SAGE is a framework for number theory, algebra, and geometry computation. The implementation is due to William Stein and over 30 other contributors from around the world. It is open source and freely available under the terms of the GNU General Public License (GPL). Sage is a mathematics software package for number theory, algebra, and geometry computation. The implementation is due to [[William_Stein]] and over 50 other contributors from [[http://www.sagemath.org/development-map.html|around the world]]. It is open source and freely available under the terms of the GNU General Public License (GPL).  Sage is
Line 5: Line 5:
SAGE is a Python library with a customized interpreter. It is written in Python, C++, and C (via Pyrex). Python is an open source object-oriented interpreted language, with a large number of libraries, e.g., for numerical analysis, which are available to users of SAGE. Python can also be accessed in library mode from C/C++ programs.  * A unified distribution of free mathematics software that mere mortals can build from source;
Line 7: Line 7:
SAGE will provide a unified interface to several important open source libraries, including SINGULAR (for commutative algebra) and GAP (for group theory), John Cremona's MWRANK library (for elliptic curves), the PARI library for number theory, and Shoup's number theory library NTL, Maxima (for symbolic manipulation). There are also interfaces to many commercial or closed source CAS's such as Maple, KASH/KANT, MAGMA, Mathematica, Axiom, and many others. For graphics, SAGE includes Matplotlib (for 2-d and some 3-d graphics) and tachyon (a 3-d ray tracer).  * A new Python library for mathematical computation with graphical and command-line interfaces; and
Line 9: Line 9:
The design of SAGE is heavily by the carefully thought out and mature class structure of the closed source computer algebra program MAGMA. However, SAGE is not meant to be an clone of MAGMA and other packages (such as GAP and Mathematica) have also played an influencial role.  * An interface to existing mathematics software packages.
Line 11: Line 11:
The main longterm goals and guiding principles for SAGE: It is written in [[Python]], C++, and C (via [[Pyrex" / "Cython]] http://www.cython.org/). Python is an open source object-oriented interpreted language, with a large number of libraries, e.g., for numerical analysis, which are available to users of Sage. Python can also be accessed in library mode from C/C++ programs.
Line 13: Line 13:
 * 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. Just as mathematicians gain a deeper understanding of a theorem by carefully reading or at least skimming the proof, people who do computations should be able to understand how the calculations work by reading documented source code. All software included in the SAGE core distribution must be free and open source, and arbitrary modifications and redistribution of every single line must be allowed. Sage ships with and provides a unified interface to several important open source libraries, including [[Singular|SINGULAR]] (for commutative algebra), [[scipy|SciPy]] (for applied mathematics), [[GAP]] (for group theory), John Cremona's [[MWRANK]] library (for elliptic curves), the [[PARI]] library for number theory, [[linbox|LinBox]] (for linear algebra), Victor Shoup's number theory library [[NTL]], and [[Maxima]] (for symbolic manipulation). There are also interfaces to many commercial or closed source mathematics software packages including Maple, MATLAB, Mathematica, KASH/KANT, MAGMA, Axiom, and many others. For graphics, Sage includes Matplotlib (for 2-D and some 3-D graphics), jmol (3-D graphics) and tachyon (a 3-D ray tracer).
Line 15: Line 15:
 * Good programming environment: It is hoped that SAGE will form a stable environment to begin programming new mathematical software projects. We should provide a model for the mathematical community of software development with a strong emphasis on openness, community, cooperation, and collaboration. The main long-term goals and guiding principles for Sage are:

 * 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. Just as mathematicians gain a deeper understanding of a theorem by carefully reading or at least skimming the proof, people who do computations should be able to understand how the calculations work by reading documented source code. All software included in the Sage core distribution must be free and open source, and arbitrary modifications and redistribution of every single line must be allowed.

 * Good programming environment: It is hoped that Sage will form a stable environment to begin programming new mathematics software projects. Sage provides a model for the mathematical community of software development with a strong emphasis on openness, community, cooperation, and collaboration.
Line 19: Line 23:
 * User friendly: The hope is to eventually attain a high level of user support. (The ''GAP Forum'' email list is an ideal example of the support it is hoped that SAGE can attain.)  * User friendly: The hope is to eventually attain a high level of user support.
Line 21: Line 25:
 * Easy to compile: SAGE should be relatively easy to compile from source for Linux and OS X users. This provides more flexibility in modifying the system.  * Easy to compile: Sage should be relatively easy to compile from source for Linux and Mac OS X users. This provides more flexibility in modifying the system.
Line 23: Line 27:
 * Cross-platform: SAGE runs under Linux, OS X, Windows (cygwin and colinux binary).  * Cross-platform: Sage runs under Linux, Mac OS X, Windows.
Line 29: Line 33:
 * Tools: Provide robust interfaces to some of the functionality of PARI, GAP, GMP, Maxima, SINGULAR, MWRANK, and NTL. These are all are GPL'd and SAGE provides (or will provide) a unified interface for using them.  * Tools: Provide robust interfaces to some of the functionality of PARI, GAP, GMP, Maxima, SINGULAR, MWRANK, and NTL. These are all GPL'd and Sage provides a unified interface for using them.
Line 31: Line 35:
 * Well documented: Reference manual, Tutorial, API reference with examples for every function, and an extensive ``How can ... be constructed in SAGE?" document.  * Well documented: Reference manual, tutorial, API reference with examples for every function, and an extensive "How can ... be constructed in Sage?" document.
Line 34: Line 38:
Download SAGE, an installation guide and a tutorial, from its webpage Download Sage, an installation guide and a tutorial, from its webpage
Line 36: Line 40:
http://sage.scipy.org/. http://www.sagemath.org/.
Line 38: Line 42:
Although SAGE uses Python and PARI and other packages, keep in mind that it is not necessary to have this software preinstalled on the computer. The installation of SAGE is really designed to be relatively painless, but if there are any problems, please ask (the web page has links to the email lists for SAGE support). There are installation instructions at http://sage.scipy.org/sage/doc/html/inst/index.html. Moreover, if SAGE is installed once, upgrading to the newest version is especially easy with the ``upgrade'' command option (this is described on the website given above and assumes wget is installed and an internet connection). Although Sage uses Python, PARI, and other packages, keep in mind that it is not necessary to have those software packages preinstalled on your computer. The installation of Sage is really designed to be relatively painless, but if there are any problems, please ask (the web page has links to the email lists for Sage support). There are installation instructions at http://www.sagemath.org/doc/html/inst/index.html. Moreover, if Sage is installed once, upgrading to the newest version is especially easy with the "upgrade" command option (this is described on the website given above and assumes that the command "{{{wget}}}" is installed and you have an Internet connection).
Line 40: Line 44:
Once SAGE is installed into a directory such as sage-x.y.z, there will be a subdirectory called ''bin''. In Linux, cd to this ''bin'' subdirectory and type the command "./sage" to start SAGE and display the SAGE prompt "sage:". This is one way to use SAGE. Another way is to next type into SAGE "notebook(open_viewer=True)" at the SAGE prompt, which
(a) starts the SAGE server running (loading the previously used worksheet, if any) and
(b) opens the firefox browser (or starts a new tab if it is already open) and displays the SAGE notebook webpage.
Once Sage is installed into a directory such as "{{{sage-x.y.z}}}" in Linux, cd to this directory and type the command "{{{./sage}}}" to start Sage. Another way to use Sage is to, from within a command-line Sage session, type "{{{notebook(open_viewer=True)}}}" at the Sage prompt. This (a) starts the Sage server running (loading the previously used worksheet, if any); and (b) opens the Firefox (or your default system) browser (or starts a new tab if it is already open) and displays the Sage notebook webpage.
Line 44: Line 46:
At the SAGE prompt, type "factor(100)" (hit return) and then enter Ctrl-d (hold the Ctrl ket and d at the same time) or "quit" (return) SAGE will first factor 100 and then exit. To do this in the notebook, enter "factor(100)" into a "cell" (an empty white window in the www browser) and then enter shift-enter. SAGE will display the factorization in the space just below the cell. To exit, the notebook version of SAGE, first go back to the command line, and enter Ctrl-c. Next, exit the browser. This quits SAGE's notebook. At the Sage prompt, type "{{{factor(100)}}}" and then press the Return or Enter key. Sage will output the prime factorization of 100. Type "{{{factor??}}}" (and press Return) and the source code of the function "{{{factor}}}" will be shown. Enter Ctrl-d (hold the Ctrl key and d at the same time) or type "quit" (return), and Sage will exit. To do this computation in the notebook, enter "{{{factor(100)}}}" into a "cell" (an empty white window in the web browser) and then press shift-enter. Sage will display the factorization in the space just below the cell. To exit the notebook, go back to the command line and press Ctrl-c. Next, exit the browser. This quits Sage's notebook.
Line 46: Line 48:
There are more examples, in the tutorial, constructions, and reference manuals, available on the SAGE webpage. Please try them out! There are thousands of additional examples in the tutorial, constructions, and reference manuals, which are available on the Sage webpage. Please try them out!
Line 48: Line 50:
SAGE is in an early stage of development, but is actively growing, and is already usable. There is a SAGE discussion board, bug-tracker, and wish list. Please visit Sage is actively growing, and is already usable. There are Sage discussion lists, [[http://trac.sagemath.org/sage_trac|bug-tracker]], [[http://wiki.sagemath.org|wiki]], and [[https://github.com/sagemath/sage|code browser]]. Please visit
Line 50: Line 52:
http://sage.scipy.org/ http://www.sagemath.org/  (west coast of USA)
Line 54: Line 56:
http://sage.math.washington.edu/sage/ http://sage.apcocoa.org (Germany)
Line 58: Line 60:
http://echidna.maths.usyd.edu.au/sage/ http://echidna.maths.usyd.edu.au/sage/ (Australia)
Line 62: Line 64:
email William Stein at [email protected] email the Sage group at one of the email lists http://www.sagemath.org/lists.html
Line 64: Line 66:
for more information. Above all, have fun with SAGE! for more information. Above all, have fun with Sage!
Line 74: Line 76:
Last Updated 11-19-2006. Last Updated 1-18-2008.

DocumentationProject

A Short Introduction to Sage

Sage is a mathematics software package for number theory, algebra, and geometry computation. The implementation is due to William_Stein and over 50 other contributors from around the world. It is open source and freely available under the terms of the GNU General Public License (GPL). Sage is

  • A unified distribution of free mathematics software that mere mortals can build from source;
  • A new Python library for mathematical computation with graphical and command-line interfaces; and
  • An interface to existing mathematics software packages.

It is written in Python, C++, and C (via Pyrex" / "Cython http://www.cython.org/). Python is an open source object-oriented interpreted language, with a large number of libraries, e.g., for numerical analysis, which are available to users of Sage. Python can also be accessed in library mode from C/C++ programs.

Sage ships with and provides a unified interface to several important open source libraries, including SINGULAR (for commutative algebra), SciPy (for applied mathematics), GAP (for group theory), John Cremona's MWRANK library (for elliptic curves), the PARI library for number theory, LinBox (for linear algebra), Victor Shoup's number theory library NTL, and Maxima (for symbolic manipulation). There are also interfaces to many commercial or closed source mathematics software packages including Maple, MATLAB, Mathematica, KASH/KANT, MAGMA, Axiom, and many others. For graphics, Sage includes Matplotlib (for 2-D and some 3-D graphics), jmol (3-D graphics) and tachyon (a 3-D ray tracer).

The main long-term goals and guiding principles for Sage are:

  • 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. Just as mathematicians gain a deeper understanding of a theorem by carefully reading or at least skimming the proof, people who do computations should be able to understand how the calculations work by reading documented source code. All software included in the Sage core distribution must be free and open source, and arbitrary modifications and redistribution of every single line must be allowed.
  • Good programming environment: It is hoped that Sage will form a stable environment to begin programming new mathematics software projects. Sage provides a model for the mathematical community of software development with a strong emphasis on openness, community, cooperation, and collaboration.
  • Extensible: Be able to define new data types or derive from built-in types, and make code written in a favorite language (including C/C++) part of the system.
  • User friendly: The hope is to eventually attain a high level of user support.
  • Easy to compile: Sage should be relatively easy to compile from source for Linux and Mac OS X users. This provides more flexibility in modifying the system.
  • Cross-platform: Sage runs under Linux, Mac OS X, Windows.
  • Comprehensive: Implement enough algorithms to be really useful. Unify free open source mathematics software. Be a comprehensive mainstream high quality open source free mathematics software system.
  • Efficient: Be very fast---comparable to or faster than anything else available. This is very difficult, since many systems are closed source, algorithms are sometimes not published, and finding fast algorithms is often extremely difficult (years of work, Ph.D. theses, luck, etc.).
  • Tools: Provide robust interfaces to some of the functionality of PARI, GAP, GMP, Maxima, SINGULAR, MWRANK, and NTL. These are all GPL'd and Sage provides a unified interface for using them.
  • Well documented: Reference manual, tutorial, API reference with examples for every function, and an extensive "How can ... be constructed in Sage?" document.

Download Sage, an installation guide and a tutorial, from its webpage

http://www.sagemath.org/.

Although Sage uses Python, PARI, and other packages, keep in mind that it is not necessary to have those software packages preinstalled on your computer. The installation of Sage is really designed to be relatively painless, but if there are any problems, please ask (the web page has links to the email lists for Sage support). There are installation instructions at http://www.sagemath.org/doc/html/inst/index.html. Moreover, if Sage is installed once, upgrading to the newest version is especially easy with the "upgrade" command option (this is described on the website given above and assumes that the command "wget" is installed and you have an Internet connection).

Once Sage is installed into a directory such as "sage-x.y.z" in Linux, cd to this directory and type the command "./sage" to start Sage. Another way to use Sage is to, from within a command-line Sage session, type "notebook(open_viewer=True)" at the Sage prompt. This (a) starts the Sage server running (loading the previously used worksheet, if any); and (b) opens the Firefox (or your default system) browser (or starts a new tab if it is already open) and displays the Sage notebook webpage.

At the Sage prompt, type "factor(100)" and then press the Return or Enter key. Sage will output the prime factorization of 100. Type "factor??" (and press Return) and the source code of the function "factor" will be shown. Enter Ctrl-d (hold the Ctrl key and d at the same time) or type "quit" (return), and Sage will exit. To do this computation in the notebook, enter "factor(100)" into a "cell" (an empty white window in the web browser) and then press shift-enter. Sage will display the factorization in the space just below the cell. To exit the notebook, go back to the command line and press Ctrl-c. Next, exit the browser. This quits Sage's notebook.

There are thousands of additional examples in the tutorial, constructions, and reference manuals, which are available on the Sage webpage. Please try them out!

Sage is actively growing, and is already usable. There are Sage discussion lists, bug-tracker, wiki, and code browser. Please visit

http://www.sagemath.org/ (west coast of USA)

or

http://sage.apcocoa.org (Germany)

or

http://echidna.maths.usyd.edu.au/sage/ (Australia)

or

email the Sage group at one of the email lists http://www.sagemath.org/lists.html

for more information. Above all, have fun with Sage!


David Joyner [email protected]

William Stein [email protected]

Last Updated 1-18-2008.

DocumentationProject