loading…
Fileskept in this browser;
open("name") in Python reads and writes them; drop files here
TimeTravel
The cells as they were, version by version, kept in this browser (outputs are not kept). Reverting adds a new version, so it can be undone here too. The marks are the versions where code ran.
How it is built
Articles, algorithm by algorithm: what worked, what did not, and why.
Independent and open
MIT or Apache-2.0, written from papers and books. No code from Magma, PARI, Sage, Singular, FLINT or GMP, so when Sagebrush agrees with them, that is independent confirmation.
Use it anywhere
- Here, in your browser
- Python:
pip install sagebrush - Command line:
npx sagebrush - Agents: llms.txt and an MCP server
Notebook tips
- The keys are Jupyter's: Shift+Enter runs a cell and moves on, Ctrl/Cmd+Enter runs it in place; Esc is command mode (A/B insert, DD deletes, M/Y switch to Markdown or code, H lists them all); Ctrl+; splits a cell. Drag a cell by its prompt to move it; hover between cells to add one.
- + Text adds a Markdown cell (headings, lists, tables, links,
$math$): Shift+Enter shows it, double-click edits it. - Tab after a name completes it (
e.Tab lists whatecan do); otherwise it indents: press Esc first to Tab out of the cell. File → Print saves the notebook, outputs and all, as a PDF. Variables persist between cells; the Console (in the ⋯ menu) is a scratchpad with its own interpreter. - Sage mode:
^is a power (^^is xor),2/3is an exact rational;factor,is_prime,ModularSymbols,EllipticCurve, polynomial rings, Gröbner bases and symbolic calculus (diff,integrate,solve,desolve) run on Sagebrush's Rust engines. - Magma mode: Magma programs are translated to Python in this page and print what Magma prints.
- Python: CPython 3.14's own grammar, with
numpy(checked against NumPy itself),matplotlib.pyplot, Sage-styleplot,@interactandanimate; pure-Python packages such as mpmath pass their own test suites. - Notebooks and files are saved in this browser as you work: File opens, downloads and uploads
.ipynb; Files lists what Python'sopen()sees. Your code runs in a Web Worker on this page; nothing is sent anywhere.