CoCalc Shared Filespeople / wstein / 2016-08-17-talk / scratch.mdOpen in CoCalc with one click!
Authors: Jennifer Balakrishnan, Sarah Berner, Alina Bucur, Jamal Hassan, John Jeng, Kiran Kedlaya, Nicholas Ruhland, Harald Schilly, ℏal Snyder, William A. Stein, and 3 more authors...

Talk: What is SageMath good for?

Speaker: William Stein

Abstract: Answer – almost everything you do. I will talk about how you can use SageMath in teaching and research. In particular, how to use Sage to support courses involving computation, to help in collaborative writing of LaTeX documents, to contribute and improve peer reviewed implementations of algorithms, and to explore new mathematics.

SCREEN RECORDING: https://youtu.be/wOCYTLdvVDM

What is SageMath?

  • 1998: I wrote Hecke (C++ library and command line for modular forms)
  • 1999: Started working with Magma group in Sydney (3 visits); contributed a lot of modular forms (and related).
  • 2005: Made first public release of Sage. Goal was to create an open source alternative to Magma (for my research), buiding on existing open source software when possible (e.g., Python, PARI).
  • 2006: Goal expanded. Mission statement: Create a viable free open source alternative to Magma, Maple, Mathematica and Matlab.
  • 2016: Over 500 contributors; nearly million lines of code; sagemath.org has about 50K monthly active users (growth stopped in 2011). It does a lot.

What is SageMathCloud?

  • 2012: Meeting at the Simons Foundation about funding open source software for math and physics, which caused me to dream again about what it would be like to have actual money to support Sage development. Conclusion: fund Magma. Motivated me to try to find better funding.
  • 2013: Launched SageMathCloud, a collaborative web-based interface to all open source software that I use in teaching courses on "open source math software" to students and writing research papers.
  • 2016: SageMath, Inc. company; several people working fulltime on SageMathCloud, including me. Nearly 1000 paying customers. If this become profitable, it would fund Sage development.

Teaching a computational course

If you're teaching a course and want to use open source technical software with zero installation headaches, SageMathCloud (SMC) is the canonical choice.

Course management:

  • create a project
  • create a course in the project
  • add students -- projects are automatically created for each student
  • assignments and handouts are just arbitrary directories of files:
    • a latex document that students fill in
    • a worksheet where they put answers
    • code in language like R, Python, C, or anything else open source
    • NO realtime automated homework yet (SMC is not webassign or webwork yet)

Experience:

  • Students (and you) can do everything through their web browser.
  • TimeTravel: second-level recording of what (and who and when) is doing their homework, which you can see globally. Chat so students can easily ask questions, and you instantly see their problems.
  • Used by hundreds of courses, including many times at UH Hilo by Aaron Tresham.
  • Professionally supported: you and your students can get help on using Sage, Latex, etc., by experts who can see exactly what is going wrong.

Note:

  • A LOT of our users are in biology, chemistry, CS, etc. -- not math. We will have a more general brand/product called CoCalc, which standards for "Collaborative CALCulation".

Collaboratively writing math papers

If you're writing a paper using LaTeX with other people, you can author it in SageMathCloud.

Benefits:

  • If the paper involves computation using Sage (R, Julia, etc.), you can do the computations in the same place where you're writing the paper. Output from computations is directly there to use from Latex.

  • Sagetex (just works in SMC): it lets you run any Sage code from inside a latex paper.

  • TimeTravel: second-level recording when you edit your paper, code, etc.

  • Multiple cursors; forward and inverse search.

  • Recent survey says that the LaTeX editor is the number one thing people want us to make even better, so expect more dev work on it.

SageMath: Peer-reviewed implementation of algorithms

SageMath provides a rare way to subject your work on software to same sort of rigorous peer review that research papers get, and ensure maintenance of your software.

The Sage Developers Guide explains how to contribute new code to Sage.

  1. Create a trac ticket.
  2. Write and push code (this can take you days of suffering). Set the ticket to "needs review".
  3. Other people will review the code.
  4. Code goes into next Sage release (happens frequently).

Unlike many math journals:

  • Refereeing is public: You can browse trac to see what happens. For example, here is a Google Summer of Code project on analytic ranks of elliptic curves...

  • Open: your contribution to Sage is free and open source. You pay nothing to us to contribute. (Unlike journals where "open" means you pay us thousands of dollars for the privilege of giving us content...)

Exploring new mathematics

SageMath itself has an enormous range of capabilities for research mathematics. It's particularly strong at:

  • Numerical/applied computation: due to the Python ecosystem of scipy, numpy, etc.
  • Number theory
  • Algebraic combinatorics
  • Graph theory
  • (exact) Linear algebra
  • Geometry and topology

Browse the reference manual!

Major Strength: about 95% of functions in Sage have examples that actually work. If you like to learn by copy/pasting examples that work, you will love Sage's documentation.

Some notable (to me) weaknesses:

  • Noncommutative algebra (e.g., quaternion algebras), Hilbert modular forms
  • Algebraic curves (and varieties), e.g., because function fields and all that builds on them are pitiful in Sage.
  • Symbolic special functions (at least compared to mathematica???) -- numerical is very good.
  • 1657 known bugs right now!
  • Caveat Emptor!