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. The numerical endomorphism computations are heuristic [Bruin–Sijsling–Zotine 2019].

Contributions include the initial implementation, work on algebraization and isomorphisms, efficient integration, and the Abel–Jacobi map. Rigorous numerical integration supplies explicit error bounds for the integrals used in period calculations [Bruin–Disney-Hogg–Gao 2024].

SageMath documentation · Example scripts

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

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 and efficient evaluation of several partial derivatives together. The package also includes an arbitrary-precision implementation of Siegel reduction for period matrices.

Source code and installation · Documentation

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

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

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

Archive

Algae

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 and documentation.

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.