General Info
NumericalSemigroup is a Python class for use with the computer algebra system Sage that adds functionality for working with Numerical Semigroups. Internally, it uses the GAP package numericalsgps, and is intended to help ease the interface between Sage and the GAP package.
- All types returned are true Sage types, not just wrappers around GAP types.
- Autocomplete is supported in the Sage web interface, i.e. typing
McNuggets.<TAB>
will give a list of available functions. See the sample code below. - Most factorization invariants supported by GAP are implemented, and more functionality will continue to be added. In fact, feature requests are encouraged, just send me an email!
Download
Given below is a (mostly) current version of NumericalSemigroup.sage. You can also email me for access to the most up to date version.
- NumericalSemigroup.sage, posted August 9, 2014
Usage
To set up your machine to use NumericalSemigroup.sage, do the following.
- First, install Sage on your machine. Instructions for doing so can be found here.
- Next, install the GAP package numericalsgps into your Sage installation. Instructions for installing GAP packages in Sage can be found here, and the URL for the numericalsgps package can be found here.
- Finally, download NumericalSemigroup.sage at the link above, and place it in your favorite folder.
The following code fragment gives an overview of how to use the NumericalSemigroup class from within Sage, and more complete documentation will be added in the near future.
load('/PATH_TO_FILE/NumericalSemigroup.sage') McNuggets = NumericalSemigroup([6,9,20]) print McNuggets.frob print McNuggets.LengthSet(400) print McNuggets.DeltaSet(400) print McNuggets.OmegaPrimality(400) print McNuggets.CatenaryDegree(400)