Creation Functions
In this section we describe the creation of maps, partial maps, and homomorphisms via the various forms of the constructors, as well as maps that define coercions between algebraic structures.
Creation of Maps
Maps between structures \(A\) and \(B\) may be specified either by providing the full graph (as defined in the previous section) or by supplying an expression rule for finding images.
- map< A -> B | G >: Str, Str -> Map
Given a finite structure \(A\), a structure \(B\), and a graph \(G\) of \(A \times B\), construct the mapping \(f : A \ar B\), as defined by \(G\). The graph \(G\) may be given by either a set, sequence, or list of tuples or arrow-pairs as described in the Introduction to this Chapter. Note that \(G\) must be a full graph, i.e., every element of \(A\) must occur exactly once as a first component.
- map< A -> B | x :-> e(x) >: Str, Str -> Map
Given a set or structure \(A\), a set or structure \(B\), a variable \(x\), and an expression \(e(x)\), usually involving \(x\), construct the mapping \(f : A \ar B\), as defined by \(e(x)\). It is the user’s responsibility to ensure that a value is defined for every \(x\in A\). The scope of the variable \(x\) is restricted to the map-constructor.
- map< A -> B | x :-> e(x), y :-> i(y) >: Str, Str -> Map
Given a set or structure \(A\), a set or structure \(B\), a variable \(x\), an expression \(e(x)\), usually involving \(x\), a variable \(y\), and an expression \(i(y)\), usually involving \(y\), construct the mapping \(f : A \rightarrow B\), as defined by \(x\mapsto e(x)\), with corresponding inverse \(f^{-1}: B \rightarrow A\), as defined by \(y \mapsto i(y)\). It is the user’s responsibility to ensure that a value \(e(x)\) is defined for every \(x\in A\), a value \(i(y)\) is defined for every \(y\in B\), and that \(i(y)\) is the true inverse of \(e(x)\). The scope of the variables \(x\) and \(y\) is restricted to the map-constructor.
Creation of Partial Maps
Partial mappings are quite different to both general mappings and homomorphisms, in that images need not be defined for every element of the domain.
- pmap< A -> B | G >: Str, Str -> Map
Given a finite structure \(A\) of cardinality \(n\), a structure \(B\), and a subgraph \(G\) of \(A \times B\), construct the partial map \(f : A \ar B\), as defined by \(G\). The subgraph \(G\) may be given by either a set, sequence, or list of tuples or arrow-pairs as described in the Introduction to this Chapter.
- pmap< A -> B | x :-> e(x) >: Str, Str -> Map
Given a set \(A\), a set \(B\), a variable \(x\), and an expression \(e(x)\), construct the partial map \(f : A \ar B\), as defined by \(e(x)\). This form of the map constructor is a special case of the previous one whereby the image of \(x\) can be defined using a single expression. Again the scope of \(x\) is restricted to the map-constructor.
Creation of Homomorphisms
The principal construction for homomorphisms consists of the generator image form, where the images of the generators of the domain are listed. Note that the kind of homomorphism and the kind and number of generators for which images are expected, depend entirely on the type of the domain. Moreover, some features of the created homomorphism, e.g. whether checking of the homomorphism is done during creation or whether computing preimages is possible, depend on the types of the domain and the codomain. We refer to the appropriate handbook chapters for further information.
- hom< A -> B | G >: Str, Str -> Map
Given a finitely generated algebraic structure \(A\) and a structure \(B\), as well as a graph \(G\) of \(A \times B\), construct the homomorphism \(f : A \rightarrow B\) defined by extending the map of the generators of \(A\) to all of \(A\). The graph \(G\) may be given by either a set, sequence, or list of tuples or arrow-pairs as described in the Introduction to this Chapter.
The detailed requirements on the specification are module-dependent, and can be found in the chapter describing the domain \(A\).
- hom< A -> B | y₁, ..., yₙ >: Str, Str -> Map
- hom< A -> B | x₁ -> y₁, ..., xₙ -> yₙ >: Str, Str -> Map
This is a module-dependent constructor for homomorphisms between structures \(A\) and \(B\); see the chapter describing the functions for \(A\). In general after the bar the images for all generators of the structure \(A\) must be specified.
- hom< A -> B | x :-> e(x) >: Str, Str -> Map
Given a structure \(A\), a structure \(B\), a variable \(x\), and an expression \(e(x)\), construct the homomorphism \(f : A \ar B\), as defined by \(e(x)\). This form of the map constructor is a special case of the previous one whereby the image of \(x\) can be defined using a single expression. Again the scope of \(x\) is restricted to the map-constructor.
Coercion Maps
Magma has a sophisticated machinery for coercion of elements into structures other than the parent. Non-automatic coercion is usually performed via the ! operator. To obtain the coercion map corresponding to ! in a particular instance the Coercion function can be used.