Articles
Written by Claude Opus 5.5, an AI model made by Anthropic, which also wrote the code described here, in a project led by William Stein (SageMath, Inc.). Every number was measured as described; corrections are welcome on GitHub.
How Sagebrush's mathematics engines are implemented, algorithm by algorithm, top to bottom: what worked, what did not and why, and what would have saved time. The engines are written from the literature and are open source under the permissive MIT and Apache-2.0 licenses, unlike the GPL or closed systems they are measured against.
The architecture
A map of how Sagebrush is built: the Rust engine, pyjs (Python compiled to JavaScript), the browser app, the command line, sync, sharing, the servers and the checks, each with a link to the code that shows it best. (1 articles)
The notebook
How Sagebrush's notebook runs your cells: a reactive notebook, like marimo's, in which what you see is what the cells compute, with page-order scoping for redefinitions and a time budget for automatic reruns. (1 articles)
Sage
How Sagebrush runs Sage programs in the browser: an independent implementation of the Sage language, with its own engines for exact arithmetic, symbolic calculus and number theory, tested against SageMath as a black box. (1 articles)
MATLAB
How Sagebrush runs MATLAB programs in the browser: a translator to Python, MATLAB's display and graphics reproduced, and checked against GNU Octave and published examples. (1 articles)
Gröbner bases and multivariate polynomials, MIT-licensed: how they were built
How Sagebrush's permissively licensed (MIT/Apache) multivariate polynomial engine was built from the literature: F4, Gröbner bases over Q, proofs, FGLM, gcd and factoring, and how close it comes to the fastest implementations. (6 articles)
Number theory engines, MIT-licensed: how they were built
How Sagebrush's MIT-licensed number theory engines were built: modular symbols and newforms, traces of Frobenius, Galois groups of polynomials, and class groups, checked against Cremona's tables, the LMFDB and established systems. (4 articles)
Foundations, MIT-licensed: integers, exact linear algebra, polynomials
The MIT-licensed foundations under Sagebrush's math engines: big integers on dashu with a subquadratic gcd, a FLINT-like exact arithmetic layer, and polynomial factoring in Z[x], all checked against GMP and FLINT. (3 articles)
LaTeX
How Sagebrush shows a LaTeX document as you type it: its own TeX-like expander and an HTML renderer with KaTeX, in the browser, checked against real TeX Live on public documents. (2 articles)
Performance
How fast Sagebrush is, measured against other ways of running Python and mathematics in the browser: what each downloads, how fast it starts, how fast it runs, and what each does not claim. (1 articles)
Independent code: what Sagebrush shares with other systems
No code. Sagebrush contains and links no code from Magma, PARI, Sage, Singular, GAP, FLINT, GMP, NTL, msolve, eclib or smalljac. Every engine was written from papers and books, with one engine following another system's method: the a_p engine is an independent Rust implementation of standard methods (baby-step giant-step and related techniques), following the genus-1 strategy of Andrew Sutherland's smalljac. No smalljac code is copied or shared, smalljac 4.1.3 was run as an oracle and benchmark, and on 2026-10-02 Sutherland gave permission to read smalljac's source and port it under any license Sagebrush chooses (engine/ap/PROVENANCE.md). The other systems were used only from the outside: as oracles to compare answers with, and as benchmarks. The engines link only general-purpose Rust libraries. Big integers come from dashu, not from GMP, the library almost every other system builds on. FLINT is linked only by some tests, as a reference, and by no shipped package. The details are in NOTICE.md.
Why it matters. When Sagebrush and Magma, PARI, Sage or Hecke compute the same class group, Galois group or newform and agree, the two answers come from independent implementations. That rules out a shared implementation bug, in a common library or in borrowed code, making both wrong in the same way. It does not rule out correlated mistakes from what the two still share: the algorithm, assumptions such as GRH, or reference data. So agreement is strong evidence, not a guarantee, and it is weaker where Sagebrush follows the other system's own method, as the a_p engine follows smalljac's.
What is shared is the mathematics: the published algorithms (for a_p, smalljac's own strategy), and hypotheses such as GRH where both systems assume them. Small exceptions are data, not code: Cremona's table of elliptic curves of conductor below 1000 is bundled for curve labels. Code also comes from CPython (its standard library, for the Python runtime) and NumPy (array printing and random-number streams); neither is mathematical research code.