[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Maps

Maps

Maps are returned by many standard Magma intrinsics, such as OrbitAction(G, T). Several constructors, such as quo, return maps as one of their return values. Most of these maps are homomorphisms.

Maps can be defined by the user too. The map constructor

map< A -> B | MAP RULE >

returns a map from the domain A to the codomain B.

The MAP RULE tells Magma how to calculate the image of any element of A as an element of B. It can be given in essentially two ways: as an expression in IDENTIFIER for the image of a general element IDENTIFIER of A:

map< A -> B | IDENTIFIER :-> EXPRESSION >

or as a complete collection of domain element and image element pairs.

In the first of these forms, IDENTIFIER is local to the constructor. It will not affect or be affected by an identifier of the same name outside the constructor.

In the second of these forms, what has to be supplied is known as a graph G, a subset of the Cartesian product A x B such that the first parts of the tuples contain each element of A exactly once:

map< A -> B | G >

G can be given a list or a set of its elements, and each element can be given as a tuple <a, b> or an arrow-pair a->b.

Given an element x of A and a map m from A to B, the image of x may be calculated as

x@a

or as

a(x)

whichever is preferred.

The composition of maps m: A to B and n: B to C is (m * n).

The functions Domain(m) and Codomain(m) return the domain and codomain of m.

Example

> R16:=RealField(16);
> trigmap:=map< R16 -> R16 | x :-> x-Sin(x) >;

A bijection between the integers modulo 4 and the finite field of 4 elements, by explicitly giving the image of each domain element: > Z4 := Integers(4); > F4<w> := FiniteField(4); > m := map< Z4 -> F4 | <0, 0>, <1, 1>, <2, w>, <3, w^2> >; > print 2@m; w

[Next] [Prev] [Right] [Left] [Up] [Index] [Root]