Skip to content

JamesRickards-Canada/Eisenstein

Repository files navigation

DOI

Eisenstein

This code accompanies the paper Eisenstein circle packings and the Eisenpint Schmidt arrangement by James Rickards and Katherine E. Stange, and consists of methods for computing various things related to integral Eisenstein circle packings. This includes:

  • Methods to generate primitive integral Eisenstein circle packings and perform the basic operations (swaps, reduction, etc.);
  • Automatic creation of pictures of circle packings in LaTeX;
  • Finding all curvatures in a given range in a packing;
  • Finding all missing or sporadic curvatures in a given range in a packing;
  • Basic arithmetic with the Eisenstein integers;
  • Working with the Eisenstein/Eisenpint Schmidt arrangement.

See here for a more detailed Users Guide.

Methods relating to searching for curvatures have been optimized for speed and memory as much as possible (aside from parallelization).

Bibtex

If you use this code in a project, please let me know! Here is a Bibtex entry that points to the latest version:

@software{EisensteinCode,
	AUTHOR = {Rickards, James},
	DOI = {10.5281/zenodo.19827399},
	LICENSE = {GPL-3.0},
	TITLE = {{Eisenstein}},
	URL = {https://github.com/JamesRickards-Canada/Eisenstein},
	YEAR = {2026},
	VERSION = {1.0.0},
}

Installation Instructions

Downloading the code

Call git clone https://github.com/JamesRickards-Canada/Eisenstein.git. If you are on Windows, be sure to git clone from WSL (see below), as Windows line endings (carriage returns) may be added to files, causing issues.

Prerequisites

  • PARI/GP, but not the downloaded ready-to-go binary. The PARI/GP website has binaries for Windows and Mac avaliable, but these will not work with the package. See below for OS specific instructions.
  • You should have a guess as to the location of the pari.cfg file for the version of PARI/GP you are running. Suggestions on how to do this can be found below.
  • This package has been tested on versions:

2.15.3 - 2.15.5,   2.17.0 - 2.17.3,   2.18.1

If you try to use it on a different version, be aware that it may not work.

Operating systems

  • Linux - No further requirements
  • Windows - You need to use Windows Subsytem for Linux. See the guide I wrote for additional instructions.
  • Mac - You need to have Homebrew installed. This is also an easy way to install PARI/GP: brew install pari

Configuring and building the package

  • From inside the project folder, call ./configure to initialize the project. This helps you search for pari.cfg, and stores the location to a file. You should supply it with a folder to search in!
  • The script displays the corresponding versions of the found files, so if you have multiple versions, you can choose the correct one. This can be useful if you keep multiple copies of PARI/GP around.
  • If the location of the installation of PARI/GP does not change, you do not need to reconfigure. If when you update PARI/GP there is a new location (e.g. if the version number is in the file path of pari.cfg), you should call ./configure again.
  • Call make to build the project, and make clean to remove all .o object files. If you update to a new version of PARI/GP, you must make clean and then make again.
  • Once this is done, a call to gp eis starts gp with the package installed!
  • Further updates to the package (that you download with git pull) just require calling make again.
  • Call ?eis to access further help for this package.

Where is pari.cfg?

  • The configuration file will search for this, but it is preferrable to not search your entire hard drive (as this can be very slow). So, you should at least supply a guess as to the location of pari.cfg. Often only the top-level folder (e.g. /usr or /opt) suffices.
  • On Linux or WSL, if you build PARI/GP from source, it should be located in /usr/local/lib/pari/pari.cfg, or at least somewhere in the /usr folder.
  • On a Mac, if you install PARI/GP with Homebrew, it may be found in a folder like /opt/homebrew/Cellar/pari/VERSION/lib/pari. Searching /opt/homebrew should be fine.
  • If you are obtaining it through SageMath, it might be found where the library files of SageMath are
  • Assuming you open PARI/GP with the command gp, try type -a gp, which will display where this command lives. The corresponding file(s) are likely symbolic links, and you can call readlink -f LOCATION on each of them to see where it lives. This can provide a clue as to the place to search for pari.cfg.
  • Another clue comes from gp itself. Open gp, and type default(). Look for the entries datadir and help. It is often the case that datadir is in X/share/pari, help is in X/bin/gphelp, and pari.cfg is in X/lib/pari/pari.cfg.

Optional packages

  • sudo apt-get install texlive and sudo apt-get install texlive-latex-extra: LaTeX compiler with additional packages, which allows for automatic compilation of circle packings in LaTeX.
  • sudo apt-get install texlive-luatex: if you'd like to make circle packing pictures with over 2000 circles, you need the luatex compiler as well.

Testing

From the command line, call ./testing/test-eis to run the testing suite. If it passes, the last line of output should be All tests passed!

Troubleshooting

  • If you are encoutering unexpected errors or warnings when building, ensure you found the correct pari.cfg file. You need to configure the project with the same installation of PARI/GP that you will run it with.
  • If you change versions of PARI/GP, the package needs to be rebuilt: make clean to reset the object files, reconfigure with ./configure, and then run make again.
  • When in doubt, rebuild the project as above to troubleshoot.
  • If you have any further issues with installation or using the code, please let me know!

About

Methods for Eisenstein circle packings and the Eisenpint Schmidt arrangement.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors