|
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.
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.
Given a finite structure A, a structure
B and a graph G of A x B, construct the mapping
f : A -> B, as defined by G. The graph G may be given
by either a set, sequence, or list of tuples or arrow-pairs .
Note that G must be a full graph, i.e., every element of A must
occur exactly once as a first component.
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 -> B, as defined by e(x).
It is the user's responsibility to ensure that a value is defined for
every x∈A. The scope of the variable x is restricted to
the map-constructor.
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 -> B, as defined by x |-> e(x),
with corresponding inverse f - 1: B -> A, as defined
by y |-> i(y).
It is the user's responsibility to ensure that a value e(x) is
defined for every x∈A, a value i(y) is defined for
every y∈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.
Partial mappings are quite different to both general mappings and
homomorphisms, in that images need not be defined for every element
of the domain.
Given a finite structure A of cardinality n, a structure B and a subgraph
G of A x B, construct the partial map f : A -> B,
as defined by G.
The subgraph G may be given
by either a set, sequence, or list of tuples or arrow-pairs .
Given a set A, a set B, a variable x and an expression e(x),
construct the partial map f : A -> 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.
This constructor is the same as the map constructor above which allows
the inverse map i(y) to be specified, except that the result is marked to
be a partial map.
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.
Given a finitely generated algebraic structure A and
a structure B, as well as a graph G of
A x B, construct the homomorphism
f : A -> 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 .
The detailed requirements on the specification are module-dependent,
and can be found in the chapter describing the domain A.
hom< A -> B | x1 -> y1, ..., xn -> yn > : 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.
Given a structure A, a structure B, a variable x and an expression e(x),
construct the homomorphism f : A -> 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.
This constructor is the same as the map constructor above which allows
the inverse map i(y) to be specified, except that the result is marked to
be a homomorphism.
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.
Bang(D, C) : Str, Str -> Map
Given structures D and C such that elements from D can be
coerced into C, return the map m that performs this coercion.
Thus the domain of m will be D and the codomain will be C.
[Next][Prev] [Right] [Left] [Up] [Index] [Root]
|