Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify and correct documentation of CompositionMapping, add an example #3449

Merged
merged 1 commit into from
May 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions lib/mapping.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1204,11 +1204,13 @@ DeclareGlobalFunction("CompositionMapping2General");
## <Ref Func="CompositionMapping"/> allows one to compose arbitrarily many
## general mappings,
## and delegates each step to <Ref Oper="CompositionMapping2"/>.
## The result is a map that maps an element first under the last argument,
## then under the penultimate argument and so forth.
## <P/>
## Additionally, the properties <Ref Prop="IsInjective"/> and
## <Ref Prop="IsSingleValued"/> are maintained;
## if the source of the <M>i+1</M>-th general mapping is identical to
## the range of the <M>i</M>-th general mapping,
## <Ref Prop="IsSingleValued"/> are maintained.
## If the range of the <M>i+1</M>-th argument is identical to
## the range of the <M>i</M>-th argument,
## also <Ref Prop="IsTotal"/> and <Ref Prop="IsSurjective"/> are maintained.
## (So one should not call <Ref Oper="CompositionMapping2"/> directly
## if one wants to maintain these properties.)
Expand All @@ -1220,6 +1222,20 @@ DeclareGlobalFunction("CompositionMapping2General");
## decompose elements of the source of <A>map2</A> into generators) or as an
## (iterated) composition
## (see&nbsp;<Ref Filt="IsCompositionMappingRep"/>).
## <P/>
## <Example><![CDATA[
## gap> f := GroupHomomorphismByImages(CyclicGroup(IsPermGroup, 2),
## > CyclicGroup(IsPermGroup, 1));
## [ (1,2) ] -> [ () ]
## gap> g := GroupHomomorphismByImages(CyclicGroup(IsPermGroup, 6),
## > CyclicGroup(IsPermGroup, 2));
## [ (1,2,3,4,5,6) ] -> [ (1,2) ]
## gap> CompositionMapping(f, g);
## [ (1,2,3,4,5,6) ] -> [ () ]
## gap> CompositionMapping(g, f);
## [ (1,2) ] -> [ () ]
## ]]></Example>
## <P/>
## </Description>
## </ManSection>
## <#/GAPDoc>
Expand Down