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

Something is Seriously odd in the World of Composition of Mappings #2540

Open
stevelinton opened this issue Jun 11, 2018 · 2 comments
Open
Labels
kind: bug Issues describing general bugs, and PRs fixing them kind: discussion discussions, questions, requests for comments, and so on

Comments

@stevelinton
Copy link
Contributor

stevelinton commented Jun 11, 2018

Please use the following template to submit an issue
(you may delete lines which are not used). Thank You!

Observed behaviour

gap> phi := IdentityMapping(SymmetricGroup([1..5]));
IdentityMapping( Sym( [ 1 .. 5 ] ) )
gap> psi := IdentityMapping(SymmetricGroup([1,2,3,4,6]));
IdentityMapping( Sym( [ 1, 2, 3, 4, 6 ] ) )
gap> CompositionMapping(phi,psi);
CompositionMapping( IdentityMapping( Sym( [ 1 .. 5 ] ) ), IdentityMapping( Sym( [ 1, 2, 3, 4, 6 ] ) ) )
gap> Source(last);
Sym( [ 1, 2, 3, 4, 6 ] )
gap> alpha := CompositionMapping(phi,psi);
CompositionMapping( IdentityMapping( Sym( [ 1 .. 5 ] ) ), IdentityMapping( Sym( [ 1, 2, 3, 4, 6 ] ) ) )
gap> Source(alpha);
Sym( [ 1, 2, 3, 4, 6 ] )
gap> Range(alpha);
Sym( [ 1 .. 5 ] )
gap> ImagesSource(alpha);
Group([ (1,2,3,4,6), (1,2) ])
gap> PreImagesRange(alpha);
Group([ (1,2,3,4,5), (1,2) ])
gap> ImagesRepresentative(alpha,(1,2,3,4,5));
(1,2,3,4,5)
gap> 

Expected behaviour

alpha should be the identity mapping on the INTERSECTION of Sym([1..5]) and Sym([1,2,3,4,6])
In fact it seems to be a fairly inconsistent object.

Copy and paste GAP banner (to tell us about your setup)

master branch.

So something pretty odd is going on here. For z := CompositionMapping(x,y) the manual doesn't seem to tell us either (a) what the requirements for Source(x) and Range(y) are?
(b) What Source(z) and Range(z) should be. Once we know that, we can fix the methods.

I haven't explored non-identity mappings yet.

@stevelinton
Copy link
Contributor Author

Digging into the manual, I see I should really have used Images rather than ImagesRepresentative but the result is still odd:

gap> Images(alpha,(1,2,3,4,6));
RightCoset(Group(()),(1,2,3,4,6))
gap> Range(alpha);             
Sym( [ 1 .. 5 ] )

So the Images are outside the Range, even though the input is inside the Source

@stevelinton
Copy link
Contributor Author

More oddness:

gap> g := Subgroup(s,[(1,2,3,4,5),(1,2)]);
Group([ (1,2,3,4,5), (1,2) ])
gap> h := Subgroup(s,[(1,2,3,4,6),(1,2)]);
Group([ (1,2,3,4,6), (1,2) ])
gap> k := Subgroup(s,[(1,2,3,4,7),(1,2)]);   
Group([ (1,2,3,4,7), (1,2) ])
gap> alpha := GroupHomomorphismByImages(g,h);
[ (1,2,3,4,5), (1,2) ] -> [ (1,2,3,4,6), (1,2) ]
gap> beta := GroupHomomorphismByImages(h,k); 
[ (1,2,3,4,6), (1,2) ] -> [ (1,2,3,4,7), (1,2) ]
gap> CompositionMapping(beta,alpha);
[ (1,2,3,4,5), (1,2) ] -> [ (1,2,3,4,7), (1,2) ]
gap> CompositionMapping(beta,beta); 
Error, List Element: <list>[7] must have an assigned value in
  img := opr( img, S.transimages[bimg[1]] ); at /Users/sal/GIT/gap/lib/ghomperm.gi:108 called from 
ImageSiftedBaseImage( S, OnTuples( BaseStabChain( S ), elm ), S.idimage, OnRight 
 ) at /Users/sal/GIT/gap/lib/ghomperm.gi:1008 called from
ImagesRepresentative( hom1, g ) at /Users/sal/GIT/gap/lib/ghomperm.gi:1047 called from
func( C[i] ) at /Users/sal/GIT/gap/lib/coll.gi:665 called from
List( S.labelimages, function ( g )
      return ImagesRepresentative( hom1, g );
  end ) at /Users/sal/GIT/gap/lib/ghomperm.gi:1047 called from
CompositionMapping2( nxt, com ) at /Users/sal/GIT/gap/lib/mapping.gi:398 called from
...  at *stdin*:8
you can 'return;' after assigning a value
brk> 

Arguably this should give an error abotu the sources and ranges (or be a restricted mapping), but this is clearly wrong. As is

gap> l := ClosureGroup(h,k);       
Group([ (1,2,3,4,6), (1,2), (1,2,3,4,7) ])
gap> gamma := IdentityMapping(l);  
IdentityMapping( Group([ (1,2,3,4,6), (1,2), (1,2,3,4,7) ]) )
gap> delta := CompositionMapping(alpha,gamma);
CompositionMapping( [ (1,2,3,4,5), (1,2) ] -> [ (1,2,3,4,6), (1,2) ],
 IdentityMapping( Group([ (1,2,3,4,6), (1,2), (1,2,3,4,7) ]) ) )
gap> ImagesSource(delta);
Error, List Element: <list>[6] must have an assigned value in
  img := opr( img, S.transimages[bimg[1]] ); at /Users/sal/GIT/gap/lib/ghomperm.gi:108 called from 
ImageSiftedBaseImage( S, OnTuples( BaseStabChain( S ), elm ), S.idimage, OnRight 
 ) at /Users/sal/GIT/gap/lib/ghomperm.gi:1008 called from
ImagesRepresentative( com!.map2, im 
 ) at /Users/sal/GIT/gap/lib/mapprep.gi:287 called from
ImagesRepresentative( map, gen ) at /Users/sal/GIT/gap/lib/mapphomo.gi:278 called from
func( C[i] ) at /Users/sal/GIT/gap/lib/coll.gi:665 called from
List( GeneratorsOfMagmaWithInverses( elms ), function ( gen )
      return ImagesRepresentative( map, gen );
  end ) at /Users/sal/GIT/gap/lib/mapphomo.gi:278 called from
...  at *stdin*:27
you can 'return;' after assigning a value
brk> 
gap> Range(alpha);
Group([ (1,2,3,4,6), (1,2) ])
gap> Source(delta);
Group([ (1,2,3,4,6), (1,2), (1,2,3,4,7) ])
gap> 

@stevelinton stevelinton changed the title Something is Seriously odd in the World of Composition of Identity Mappings Something is Seriously odd in the World of Composition of Mappings Jun 12, 2018
@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them kind: discussion discussions, questions, requests for comments, and so on labels Jun 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them kind: discussion discussions, questions, requests for comments, and so on
Projects
None yet
Development

No branches or pull requests

2 participants