sagebrush
Fast, certified engines for research mathematics, in Rust, for Python. Permissively licensed (MIT OR Apache-2.0): use them anywhere, in anything, from agents and notebooks to products. No C libraries; one abi3 wheel per platform covers Python 3.9 and later.
This is an early release of Sagebrush, which also runs in the browser at sagebrush.space.
>>> from sagebrush import nf, mf, ap, poly
>>> nf.bnf([-11, 0, 0, 1]) # Q[x]/(x^3 - 11): class group, regulator
{'cyc': [2], 'degree': 3, 'disc': -3267, 'h': 2, 'r1': 1, 'r2': 1, 'regulator': '5.5872066260609077619', 'w': 2}
>>> nf.factor_integer(2**128 + 1) # ECM
[(59649589127497217, 1), (5704689200685129054721, 1)]
>>> nf.primes_above([-11, 0, 0, 1], 5) # 5 = P_1 P_2 with residue degrees 1, 2
[{'e': 1, 'f': 1, 'p': 5, 'pi': [-1, 1, 0], 'pi_den': 1}, {'e': 1, 'f': 2, 'p': 5, 'pi': [1, 1, 1], 'pi_den': 1}]
>>> nf.lll([[1, 1, 1], [-1, 0, 2], [3, 5, 6]])
[[0, 1, 0], [1, 0, 1], [-1, 0, 2]]
>>> poly.factor([5, -1, -1, 1]) # x^3 - x^2 - x + 5 over Z
(1, [([5, -1, -1, 1], 1)])
>>> d = mf.newforms(389, 2, bound=6) # newform orbits of S_2(Gamma0(389))
>>> d["status"], [(o["letter"], o["dim"]) for o in d["newforms"]]
('proven', [('a', 1), ('b', 2), ('c', 3), ('d', 6), ('e', 20)])
Polynomials are coefficient lists, constant term first.
Engines
sagebrush.nf: number fields: maximal orders, prime ideals, class groups, units and regulators (assuming GRH, with a field-specific bound for the generators), quadratic class groups to |D| ~ 10^60; integer factoring (ECM); Hermite and Smith forms, LLL; complex roots to any precision.sagebrush.mf: modular forms of weight k >= 2 with character: dimensions, exact Hecke characteristic polynomials, newform orbits, trace forms.sagebrush.modsym: weight-2 modular symbols for Gamma0(N).sagebrush.ap: traces of Frobenius a_p of elliptic curves over Q.sagebrush.poly: factoring in Z[x] and F_p[x].
Results are checked against independent systems: PARI for class groups, Sage and Magma for the rest, and LMFDB for modular forms.
License
Copyright (c) 2026 SageMath, Inc. Licensed under either of the Apache License, Version 2.0 or the MIT license, at your option.
Metadata
Release files for sagebrush 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sagebrush-0.1.0.tar.gz | 359.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| sagebrush-0.1.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| sagebrush-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| sagebrush-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| sagebrush-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| sagebrush-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 6.1 MB
Release files / sagebrush-0.1.0.tar.gz
| Download URL | sagebrush-0.1.0.tar.gz |
|---|---|
| Size | 359.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d775c27692f234707d1e1f61c705ab29c66c5370818d3ff84a729478588f1baf
|
|
BLAKE2b-256 checksum How to use checksums |
20336dc9c28364170bc4528e006888ec11c1d2f9e6214d485929b7f97708a064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sagebrush-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | sagebrush-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7a35eda0ba951280150c335ecd40d108e335a253fd3271cbd8b76983cd14a2cd
|
|
BLAKE2b-256 checksum How to use checksums |
a2c0473ef134db85c2c3d690dedbb3b3663c80c5214c236c268ffa0721533854
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sagebrush-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | sagebrush-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3987382946ad444245771dfbf407f8f45c2e38ec095d8e307a8bd0aa8a229aa3
|
|
BLAKE2b-256 checksum How to use checksums |
90a4cc9c5ba46e3aaec64ceda3db8f22ff73ec4ea71f867e8928ee6fc2b2b25f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sagebrush-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | sagebrush-0.1.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6b977c2608eee18a324ac36f1e2e95ccc9304c0817914f96dc6f0032c52ea227
|
|
BLAKE2b-256 checksum How to use checksums |
0f5461937ace52ccb4672e51967935ca42e9c70878a4584814c2e2f434a87386
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sagebrush-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | sagebrush-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e9521ef64e28c2a4156e871eea4833b580bea5925c92420a62d49188ac55268c
|
|
BLAKE2b-256 checksum How to use checksums |
0fa2f0f577589e074d488ad6abb2c765284c745b42ab61616e1f3240377d5d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / sagebrush-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | sagebrush-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
728742434f0a21e9f69bf4d8c8f6c08ed10874cdeee7e76d793551771d36100e
|
|
BLAKE2b-256 checksum How to use checksums |
4d0819632563c8c6320e0d39c502631d7a33cda39e85253ca8a8491a1214bc7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log