Software

Riemann surfaces in SageMath

The RiemannSurface class in SageMath models the Riemann surface associated with a plane algebraic curve. Its functionality includes homology bases, period matrices, the Abel–Jacobi map, and numerical computations of endomorphisms and homomorphisms of Jacobians. [Bruin–Sijsling–Zotine 2019].

In further joint work we implemented more efficient and rigorous numerical integration that provides explicit error bounds on the integrals used in period calculations. Support for numerical computation of the Abel–Jacobi map was also added [Bruin–Disney-Hogg–Gao 2024].

SageMath documentation

RiemannTheta

A SageMath package, developed with Sohrab Ganjian as part of an Undergraduate Summer Research project, for numerical evaluation of Riemann theta functions with characteristics and their derivatives to arbitrary precision. It supports characteristics of arbitrary level. The package also includes an arbitrary-precision implementation of Siegel reduction for period matrices.

Source code and installation · Documentation

Brauer–Manin obstructions on plane quartics

Magma code developed with Brendan Creutz for computing Brauer–Manin obstructions on plane quartic curves and their Picard torsors [Bruin–Creutz 2026]. The distribution includes the main obstruction routines, data for Galois actions on bitangents, and examples demonstrating their use.

Source code and examples

Two-cover descent on plane quartics

Magma routines developed with Daniel Lewis for two-cover descent on plane quartics whose 28 bitangents are all rational [Bruin–Lewis 2020]. The accompanying resources include code for constructing and analysing curves from moduli parameters, usage instructions, and the data sets used in the paper.

Code, instructions and data

Contributions to Magma

Contributions to the arithmetic geometry functionality distributed with Magma include

See [Bruin 2006] for worked examples on how to use most of these routines.

Other contributions include algorithms and parts of the design of Magma’s differential rings module.

Magma acknowledgements · 2006 chapter · Local solvability · Elliptic-curve Chabauty · Two-cover descent

SageMath infrastructure contributions

Other SageMath contributions include the binary interface between Python and Embeddable Common Lisp (ECL). This underpins SageMath’s library interface to Maxima, used for symbolic calculus. Contributions also include weak-reference dictionaries and containers for storing coercion data, supporting efficient lookup and garbage collection in the SageMath library.

Python/ECL interface · Maxima library interface · Weak-reference dictionaries · Coercion data containers

Magma kernel for Jupyter

A Jupyter kernel for working with Magma in notebooks and consoles. Based on Christopher Granade’s Magma kernel, this version adds tab completion, links to the Magma documentation for help requests, and reporting of partial output while a computation is running. It uses an existing Magma installation.

Source code and installation

Archive: Algae package

Algorithms for arithmetic on elliptic curves over general number fields, based on KASH. The main feature is an implementation of 2-descent and 2-isogeny-descent routines (taking care of even class numbers). This code is no longer maintained and only here for archival purposes.

software download · README · documentation.

Old routines to verify computational claims in [Bruin 2000]:

A precursor to the 2-descent program mentioned above: thesis.sh, a shar archive of KASH scripts for computations concerning reports W99-14, W99-15 and my PhD thesis [Bruin 1999a]