One significant combinatorial building block is that of partitions. A partition of a (positive) integer n is a way of writing n as a sum of positive integers (and is represented within Magma by a sequence of those integers, arranged in decreasing order). A restricted partition is a partition where the summands are constrained to come from some particular subset of the integers.
Magma provides the standard counting functions for partitions and restricted partitions, as well as functions for enumerating partitions. When enumerating it is possible to restrict to partitions of a specific size. Such enumerative functions can greatly simplify enumeration through an ad hoc combinatorial structure of the user's creation.
Magma builds on the partition functionality to provide tools for working with Young tableaux and associated monoids. The monoids in question are ordered monoids, which will usually be the positive integers, although Magma supports more general constructions. Related to such an ordered monoid is the associated plactoid monoid, which is the quotient of the monoid with respect to Knuth equivalence. Magma provides constructions for ordered monoids and the matching plactic monoid, and testing of words for Knuth equivalence.
A Young diagram (also called a Ferrers diagram) is a collection of boxes arranged in rows, where each row is aligned at the left and has at least as many boxes in it as the row below it. A Young tableau (or just tableau) is obtained from a Young diagram by placing an element from an ordered monoid in each box in such a way that the entries are increasing when read down columns and non-decreasing when read across rows. Young tableaux are thus created from the words of an ordered monoid. It turns out that each word is Knuth equivalent to that of some (unique) tableau, and thus that the elements of the associated plactic monoid may be put into correspondence with (distinct) tableaux.
Magma provides facilities for enumerating all tableaux with specified properties or for generating random tableaux. It also provides skew tableaux (the results of deleting a smaller tableau from the top left of some other tableau). Other functionality includes conjugate tableaux, hook length computations, jeu de taquin, and a realisation of the Robinson–Schensted–Knuth correspondence.
The irreducible complex representations of Sym(n) are in one-to-one correspondence with a set of Young diagrams. Thus Young tableaux are an important tool in the study of representations of the symmetric group and the general linear group. This machinery is used within Magma to construct representations of Sym(n).
A further extension of partitions and Young tableaux lies in the realm of symmetric function algebras. Here the object of interest lies in a basis for the algebra and the main operation of interest is changing between a pair of the five bases of interest. The five main bases of a symmetric function algebra are best understood in terms of operations on a set of associated tableaux. Symmetric function algebras allow the manipulation of symmetric functions over an infinite number of indeterminates, whereas the more usual polynomial rings are restricted to a finite number.
Symmetric function algebras in Magma may be created over any of the five standard basis types: Schur, monomial, elementary, homogeneous, or power sum functions. Arithmetic and composition operations are provided and are able to transition smoothly between the different basis types as required. Conversions are also possible to and from symmetric polynomials.
The Schur functions are the generating basis for the standard tableaux, and it is possible to get the tableau corresponding to such a function. There is also a correspondence between Schur functions and characters of the symmetric group — the irreducible characters are precisely those arising from Schur functions indexed by a single partition — and Magma provides an explicit construction of this correspondence.