Skip to main content

Stallings graph representation of finitely generated subgroups of free groups

Project description

stallings_graphs Research Code implements tools to experiment with finitely generated subgroups of infinite groups in Sage, via a set of new Python classes. Many of the modules correspond to research code written for published articles (random generation, decision for various properties, etc). It is meant to be reused and reusable (full documentation including doctests).

Comments are welcome.


To install this module, you do:

sage -pip install stallings_graphs


sage -pip install

To use this module, you need to import it:

from stallings_graphs import *

This reference manual contains many examples that illustrate the usage of stallings_graphs. The examples are all tested with each release of stallings_graphs, and should produce exactly the same output as in this manual, except for line breaks.


This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.


Installing stallings_graph requires a working SageMath installation. Depending on the usage (especially to produce LaTeX, pdf, png outputs), it might be necessary to install the optional package dot2tex:

sage -i dot2tex

as well as the external packages ImageMagick, Graphviz.

On OSX, after installing Homebrew, one may do:

sudo brew install graphviz imagemagick

On Debian or Ubuntu, one may do:

sudo apt install graphviz imagemagick

Note that graphviz must be installed before dot2tex.

The package stallings_graph also uses Sébastien Labbé’s slabbe package and Thierry Coulbois’s train_track package. Both are automatically installed when stallings_graphs is installed.

Release history

Version 0.2, released September 2020 (Pascal Weil)

  • the package now works with Python 3

  • some bug fixes

  • addition of new methods on finitely generated subgroups, including the decision of free factors and the computation of the lattice of algebraic extensions of a subgroup

  • definition and usage of morphisms between free groups, by means of a connection to Thierry Coulbois’s train_track package

Version 0.1, released March 2019 (Pascal Weil)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stallings_graphs-0.2.tar.gz (949.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page