03 04 2019

The stallings_graphs package

This is a SageMath package, meant to experiment with finitely generated subgroups of (finite rank) free groups.

To install: run the following command under sage.

sage -pip install

To consult the documentation (pdf), click here.

You can also download the file stallings_graphs-0.1.tar.gz.

Additional install notes, based on my (limited) experience, mostly in mac OS…

These notes assume that sage is installed. See here for the version that corresponds to your machine.

The single command line

sage -pip install

assumes that openssl is installed. If it isn't, you may encounter messages that some internet link is missing. In that case, you can first use the command sage -i openssl and then try again sage -pip install etc…

If this fails, then download stallings_graphs-0.1.tar.gz and then run sage -pip install stallings_graphs-0.1.tar.gz from the folder containing stallings_graphs-0.1.tar.gz.

The functionality in stallings_graphs that allows producing a LaTeX / pdf / png representation of a Stallings graph uses graphical libraries that may or may not already be installed on your machine. You need to install dot2tex (command sage -i dot2tex).

For the same purpose, you also need to install the libraries graphviz and imagemagick. Under mac OS (or Linux?), a convenient way of doing that is to use (and therefore first install) homebrew.

And sage must have access to your pdflatex. Towards this purpose, I have a .bashrc file in my home directory, with the following content:

export PATH=/Library/TeX/texbin:$PATH


I also have an init.sage file in the ~/.sage/ directory with the following content (specific to mac OS):

path_to_pdflatex = ':' + os.path.sep + os.path.join('Library','TeX','texbin')

path_to_convert = ':/usr/local/bin'

os.environ['PATH'] += path_to_pdflatex

os.environ['PATH'] += path_to_convert

You are encouraged to look into the makefile file in the stallings_graphs folder, to see other potentially useful make commands.

Pascal Weil