The Semirings package provides tools for enumerating semirings and related algebraic structures of small orders. The package allows users to count and generate semirings up to isomorphism or equivalence using a rudimentary algorithm and the library of small semigroups provided by Smallsemi. It supports a variety of structures and offers extensibility to custom constraints. This package fills a gap in the literature by providing the first known counts (in many cases) of semirings and their variants up to equivalence.
There are various definitions of semirings in the literature, and we make use of the following convention. A semiring is a set S with two binary operations, addition and multiplication, such that:
The additive reduct \((S, +)\), which we denote by \(A\), is a commutative semigroup.
The multiplicative reduct \((S, \cdot)\), which we denote by \(M\), is a semigroup.
Multiplication distributes over addition, i.e. for all \(a, b, c \in S\),
\[a \cdot (b + c) = (a \cdot b) + (a \cdot c) \quad \text{and} \quad (b + c) \cdot a = (b \cdot a) + (c \cdot a). \] It is sometimes useful to consider a semiring S as the pair (A, M).
We will also make use of the prefix 'ai' to mean 'additively idempotent'. For instance, an ai-semiring S is a semiring with the additional property that \[a + a = a \quad \text{for all } a \in S.\]
We make use of the convention that rings do not necessarily have a multiplicative identity.
In the remainder of this chapter, we discuss installation of the package.
This software is designed for use with GAP version 4.5 or later. It also requires the Smallsemi package (version 0.7.2) and the Semigroups package (version 5.5.1 or higher) to function correctly.
Due to its dependence on Smallsemi, Semirings can use large amounts of RAM. For more information on how GAP uses memory, see GAP command-line options. In the case that the user runs into memory issues, see Smallsemi: Memory Issues.
The installation follows standard GAP rules as outlined in the following two steps; see Reference: Installing a GAP Package for further details.
Ensure that Semigroups version 4.5 or later is available.
Ensure that Smallsemi version 0.7.2 or later is available.
Download an archive of the package from https://pramothragavan.github.io/assets/semirings.tar.gz.
Move the archive inside a pkg directory. This can be either the
main pkg directory in your GAP installation or your personal pkg directory.
Unzip and untar the file, this should create a directory called
semirings inside the pkg directory.
Inside the pkg/semirings directory, in your terminal type
configure && make
To use the package, start a GAP session and type LoadPackage("semirings"); at the GAP prompt. You should see the following:
gap> LoadPackage("semirings"); ----------------------------------------------------------------------------- Loading semirings 0.1 (Enumerate semirings) by James Mitchell (https://jdbm.me) and Pramoth Ragavan (https://pramothragavan.github.io/). Homepage: https://pramothragavan.github.io/semirings/ Report issues at https://github.com/pramothragavan/semirings/issues ----------------------------------------------------------------------------- true
You might want to start GAP with a specified amount of memory; see Smallsemi: Memory Issues.
You should verify the success of the installation by running the test file. This is done by the following command and should return a similar output:
gap> ReadPackage("semirings", "tst/testall.g"); Architecture: aarch64-apple-darwin23-default64-kv9 testing: /semirings/tst/ai.tst 3730 ms (997 ms GC) and 383MB allocated for ai.tst testing: /semirings/tst/equivalence.tst 54127 ms (5006 ms GC) and 20.0GB allocated for equivalence.tst testing: /semirings/tst/standard.tst 6197 ms (2139 ms GC) and 441MB allocated for standard.tst ----------------------------------- total 64054 ms (8142 ms GC) and 20.8GB allocated 0 failures in 3 files I No errors detected while testing
generated by GAPDoc2HTML