Mappings
functions
relations
A mapping in &GAP; is what is called a function in mathematics. &GAP; also implements generalized mappings in which one element might have several images, these can be imagined as subsets of the cartesian product and are often called relations.

Most operations are declared for general mappings and therefore this manual often refers to (general) mappings, unless you deliberately need the generalization you can ignore the general bit and just read it as mappings.

<#Include Label="[1]{mapping}">

For mappings which preserve an algebraic structure a kernel is defined. Depending on the structure preserved the operation to compute this kernel is called differently, see Section .

Some technical details of general mappings are described in section .

IsDirectProductElement (Filter)
<#Include Label="IsDirectProductElement">

Creating Mappings
<#Include Label="GeneralMappingByElements"> <#Include Label="MappingByFunction"> <#Include Label="InverseGeneralMapping"> <#Include Label="CompositionMapping"> <#Include Label="CompositionMapping2"> <#Include Label="IsCompositionMappingRep"> <#Include Label="ConstituentsCompositionMapping"> <#Include Label="ZeroMapping"> <#Include Label="IdentityMapping"> <#Include Label="Embedding"> <#Include Label="Projection"> <#Include Label="RestrictedMapping">

Properties and Attributes of (General) Mappings
<#Include Label="IsTotal"> <#Include Label="IsSingleValued"> <#Include Label="IsMapping"> <#Include Label="IsInjective"> <#Include Label="IsSurjective"> <#Include Label="IsBijective"> <#Include Label="Range"> <#Include Label="Source"> <#Include Label="UnderlyingRelation"> <#Include Label="UnderlyingGeneralMapping">

Images under Mappings
<#Include Label="ImagesSource"> <#Include Label="ImagesRepresentative"> <#Include Label="ImagesElm"> <#Include Label="ImagesSet"> <#Include Label="ImageElm"> <#Include Label="Image"> <#Include Label="Images">

Preimages under Mappings
<#Include Label="PreImagesRange"> <#Include Label="PreImagesElm"> <#Include Label="PreImageElm"> <#Include Label="PreImagesRepresentative"> <#Include Label="PreImagesSet"> <#Include Label="PreImage"> <#Include Label="PreImages">

Arithmetic Operations for General Mappings
<#Include Label="[3]{mapping}">

Mappings which are Compatible with Algebraic Structures

From an algebraical point of view, the most important mappings are those which are compatible with a structure. For Magmas, Groups and Rings, &GAP; supports the following four types of such mappings:

General mappings that respect multiplication
General mappings that respect addition
General mappings that respect scalar mult.
General mappings that respect multiplicative and additive structure

(Very technical note: &GAP; defines categories IsSPGeneralMapping and IsNonSPGeneralMapping. The distinction between these is orthogonal to the structure compatibility described here and should not be confused.)

Magma Homomorphisms
<#Include Label="IsMagmaHomomorphism"> <#Include Label="MagmaHomomorphismByFunctionNC"> <#Include Label="NaturalHomomorphismByGenerators">

Mappings that Respect Multiplication
<#Include Label="RespectsMultiplication"> <#Include Label="RespectsOne"> <#Include Label="RespectsInverses"> <#Include Label="IsGroupGeneralMapping"> <#Include Label="KernelOfMultiplicativeGeneralMapping"> <#Include Label="CoKernelOfMultiplicativeGeneralMapping">

Mappings that Respect Addition
<#Include Label="RespectsAddition"> <#Include Label="RespectsAdditiveInverses"> <#Include Label="RespectsZero"> <#Include Label="IsAdditiveGroupGeneralMapping"> <#Include Label="KernelOfAdditiveGeneralMapping"> <#Include Label="CoKernelOfAdditiveGeneralMapping">

Linear Mappings

Also see Sections , , and , .

<#Include Label="RespectsScalarMultiplication"> <#Include Label="IsLeftModuleGeneralMapping"> <#Include Label="IsLinearMapping">

Ring Homomorphisms
<#Include Label="IsRingGeneralMapping"> <#Include Label="IsRingWithOneGeneralMapping"> <#Include Label="IsAlgebraGeneralMapping"> <#Include Label="IsAlgebraWithOneGeneralMapping"> <#Include Label="IsFieldHomomorphism">

General Mappings
<#Include Label="IsGeneralMapping"> <#Include Label="IsConstantTimeAccessGeneralMapping"> <#Include Label="IsEndoGeneralMapping">

Technical Matters Concerning General Mappings
<#Include Label="[2]{mapping}">

<#Include Label="[4]{mapping}"> <#Include Label="IsSPGeneralMapping"> <#Include Label="IsGeneralMappingFamily"> <#Include Label="FamilyRange"> <#Include Label="FamilySource"> <#Include Label="FamiliesOfGeneralMappingsAndRanges"> <#Include Label="GeneralMappingsFamily"> <#Include Label="TypeOfDefaultGeneralMapping">