Goto Chapter: Top 1 2 3 4 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 Functionality
 2.1 Functions for counting and enumerating structures
 2.2 Miscellaneous

2 Functionality

Semirings and various related algebraic structures of small order can be enumerated using the Semirings package. By small order, we mean at most 8, but in many cases even 8 is computationally unfeasible under the current implementation. Each structure type has an associated pair of functions: All<Structure> for enumeration and Nr<Structure> for counting. Here, <Structure> can be one of: AiSemirings, RingsWithOne, Rings, Semirings, SemiringsWithOneAndZero, AiSemiringsWithOneAndZero, SemiringsWithZero, AiSemiringsWithZero, AiSemiringsWithOne, or SemiringsWithOne.

For a given <Structure>, the All<Structure> function returns a list of all structures of that type (up to isomorphism or equivalence), each represented as a pair of Cayley tables. For instance, AllSemirings(n) returns a list of pairs [A, M], where A and M are n\times n Cayley tables as described in Section 1.1. The corresponding Nr<Structure> function returns the number of such structures without storing them, and so is both faster and more memory efficient.

2.1 Functions for counting and enumerating structures

2.1-1 AllSemirings
‣ AllSemirings( n[, U2E] )( function )
‣ AllSemiringsWithOne( n[, U2E] )( function )
‣ AllSemiringsWithZero( n[, U2E] )( function )
‣ AllSemiringsWithOneAndZero( n[, U2E] )( function )
‣ AllCommutativeSemirings( n[, U2E] )( function )
‣ AllCommutativeSemiringsWithOne( n[, U2E] )( function )
‣ AllCommutativeSemiringsWithZero( n[, U2E] )( function )
‣ AllCommutativeSemiringsWithOneAndZero( n[, U2E] )( function )
‣ AllAiSemirings( n[, U2E] )( function )
‣ AllAiSemiringsWithZero( n[, U2E] )( function )
‣ AllAiSemiringsWithOne( n[, U2E] )( function )
‣ AllAiSemiringsWithOneAndZero( n[, U2E] )( function )
‣ AllCommutativeAiSemirings( n[, U2E] )( function )
‣ AllCommutativeAiSemiringsWithOne( n[, U2E] )( function )
‣ AllCommutativeAiSemiringsWithZero( n[, U2E] )( function )
‣ AllCommutativeAiSemiringsWithOneAndZero( n[, U2E] )( function )
‣ AllRings( n[, U2E] )( function )
‣ AllRingsWithOne( n[, U2E] )( function )
‣ AllSemifields( n[, U2E] )( function )

Returns: a list of pairs of Cayley tables

These functions return a list of pairs of Cayley tables of order n. The optional argument U2E is a boolean that determines whether the structures are considered up to isomorphism (false, default) or equivalence (true).

2.1-2 NrSemirings
‣ NrSemirings( n[, U2E] )( function )
‣ NrSemiringsWithOne( n[, U2E] )( function )
‣ NrSemiringsWithZero( n[, U2E] )( function )
‣ NrSemiringsWithOneAndZero( n[, U2E] )( function )
‣ NrCommutativeSemirings( n[, U2E] )( function )
‣ NrCommutativeSemiringsWithOne( n[, U2E] )( function )
‣ NrCommutativeSemiringsWithZero( n[, U2E] )( function )
‣ NrCommutativeSemiringsWithOneAndZero( n[, U2E] )( function )
‣ NrAiSemirings( n[, U2E] )( function )
‣ NrAiSemiringsWithOne( n[, U2E] )( function )
‣ NrAiSemiringsWithZero( n[, U2E] )( function )
‣ NrAiSemiringsWithOneAndZero( n[, U2E] )( function )
‣ NrCommutativeAiSemirings( n[, U2E] )( function )
‣ NrCommutativeAiSemiringsWithOne( n[, U2E] )( function )
‣ NrCommutativeAiSemiringsWithZero( n[, U2E] )( function )
‣ NrCommutativeAiSemiringsWithOneAndZero( n[, U2E] )( function )
‣ NrRings( n[, U2E] )( function )
‣ NrRingsWithOne( n[, U2E] )( function )
‣ NrSemifields( n[, U2E] )( function )

Returns: an integer

These functions return the number of structures of order n. The optional argument U2E is a boolean that determines whether the structures are counted up to isomorphism (false, default) or equivalence (true).

For each <Structure>, it is the case that Length(All<Structure>(n, U2E)) = Nr<Structure>(n, U2E).

2.1-3 AllSemiringsWithX
‣ AllSemiringsWithX( n, structA, structM[, U2E] )( function )
‣ NrSemiringsWithX( n, structA, structM[, U2E] )( function )

These functions allow you to enumerate/count the number of semirings of order n respectively, while specifying constraints on the additive and multiplicative reducts of the semiring.

structA and structM should be lists of even length, where

The optional argument U2E is a boolean that determines whether the structures are considered up to isomorphism (false, default) or equivalence (true).

It is not necessary to specify additive commutativity in structA. This is always assumed as it forms part of the definition of a semiring.

For instance, AllSemiringsWithX(n, [IsBand, true], []) is equivalent to AllAiSemirings(n).

2.2 Miscellaneous

2.2-1 InfoSemirings
‣ InfoSemirings( info class )

is the info class (see Reference: Info Functions) of Semirings. The info level is initially set to 1 which triggers progress messages whenever any function in Section 2.1 is called.

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 Ind

generated by GAPDoc2HTML