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

CosetTableFpHom does not set one, useAddition expected by NEWTC_Rewrite #1819

Closed
clnbr opened this issue Oct 27, 2017 · 3 comments
Closed

CosetTableFpHom does not set one, useAddition expected by NEWTC_Rewrite #1819

clnbr opened this issue Oct 27, 2017 · 3 comments
Milestone

Comments

@clnbr
Copy link

clnbr commented Oct 27, 2017

I ran into a bug in NEWTC_Rewrite with the attached input. The test case could probably be made more minimal, but I don't really know may waya round the FpGroups functionality very well yet. It's a bug that I've run into a couple of times recently, and this is the only reasonably self-contained test case I've managed to come up with. I hope it's still helpful.

The offending rec is returned from CosetTableFpHom. I've included code that resolves the break loop in this particular case. The transcript is below and the input is a attached
NEWTC_Rewrite_bug.g.txt

 ┌───────┐   GAP 4.8.8-4401-g5f25772-dirty of today
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin15.6.0-gcc-default64
 Configuration:  gmp 6.1.2
 Loading the library and packages ...
 Components: trans 1.0, prim 3.0, small* 1.0, id* 1.0
 Packages:   AClib 1.2, Alnuth 3.0.0, AtlasRep 1.5.1, AutPGrp 1.8, CRISP 1.4.4, Cryst 4.1.12, CrystCat 1.1.6, CTblLib 1.2.2, FactInt 1.5.4, 
             FGA 1.3.1, GAPDoc 1.6, IO 4.4.6, IRREDSOL 1.4, LAGUNA 3.7.0, Polenta 1.3.7, Polycyclic 2.11, RadiRoot 2.7, ResClasses 4.6.0, 
             Sophus 1.23, SpinSym 1.5, TomLib 1.2.6, Utils 0.46
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> p := 5;
5
gap> gpAfp := (function(gpF)
>              return gpF / [gpF.a^(p^2), gpF.b^(p^2), Comm(gpF.a, gpF.b)];
>          end)(FreeGroup("a", "b"));
<fp group on the generators [ a, b ]>
gap> a := gpAfp.1;
a
gap> b := gpAfp.2;
b
gap> 
gap> # make a constructor for automorphisms from lists of images
gap> # need to use Group...ByImagesNC since there is no method to compute
gap> # IsSingleValued
gap> AutomorphismCtor := gpG -> imgs -> GroupHomomorphismByImagesNC(gpG, gpG, GeneratorsOfGroup(gpG), imgs);
function( gpG ) ... end
gap> AutForAImgs := AutomorphismCtor(gpAfp);
function( imgs ) ... end
gap> gpHgens_as_auts := [ AutForAImgs([ a^(p+1), b^(-p+1) ]), AutForAImgs( [ b^(-p)*a, a^(-p)*b ]) ];
[ [ a, b ] -> [ a^6, b^-4 ], [ a, b ] -> [ b^-5*a, a^-5*b ] ]
gap> # are they really automorphisms?
gap> List(gpHgens_as_auts, IsBijective);
[ true, true ]
gap> gpH_as_auts := GroupWithGenerators(gpHgens_as_auts, IdentityMapping(gpAfp));
<group with 2 generators>
gap> Size(gpH_as_auts);
Error, Record: '<rec>.one' must have an assigned value in
  c := DATA.one; at /Users/calin/prj/gap-head/lib/sgpres.gi:3264 called from 
NEWTC_Rewrite( aug, 1, LetterRepAssocWord( word ) ) at /Users/calin/prj/gap-head/lib/ghomfp.gi:269 called from
ImageElm( map, elm ) at /Users/calin/prj/gap-head/lib/mapping.gi:191 called from
Image( a, i ) at /Users/calin/prj/gap-head/lib/ghom.gi:594 called from
func( C[i] ) at /Users/calin/prj/gap-head/lib/coll.gi:746 called from
List( GeneratorsSmallest( Source( a ) ), function ( i )
      return Image( a, i );
  end ) at /Users/calin/prj/gap-head/lib/ghom.gi:594 called from
...  at *stdin*:17
you can 'return;' after assigning a value
brk> 
brk> DATA.one := One(DATA.homgens[1]);
<identity ...>
brk> return;
Error, Record: '<rec>.useAddition' must have an assigned value in
  if DATA.useAddition then
    c := c + DATA.aug[(j + offset)][i];
else
    c := WordProductLetterRep( c, DATA.aug[j + offset][i] );
fi; at /Users/calin/prj/gap-head/lib/sgpres.gi:3271 called from 
NEWTC_Rewrite( aug, 1, LetterRepAssocWord( word ) ) at /Users/calin/prj/gap-head/lib/ghomfp.gi:269 called from
ImageElm( map, elm ) at /Users/calin/prj/gap-head/lib/mapping.gi:191 called from
Image( a, i ) at /Users/calin/prj/gap-head/lib/ghom.gi:594 called from
func( C[i] ) at /Users/calin/prj/gap-head/lib/coll.gi:746 called from
List( GeneratorsSmallest( Source( a ) ), function ( i )
      return Image( a, i );
  end ) at /Users/calin/prj/gap-head/lib/ghom.gi:594 called from
...  at *stdin*:17
you can 'return;' after assigning a value
brk> DATA.useAddition := false;
false
brk> return;
25


@fingolfin
Copy link
Member

@hulpke wrote the new MTC code, so hopefully he has some insights on this.

@fingolfin
Copy link
Member

To ease debugging, here is the input, in a form that also works in older GAP versions:

p:=5;
f:=gpF -> gpF / [gpF.a^(p^2), gpF.b^(p^2), Comm(gpF.a, gpF.b)];
gpAfp := f(FreeGroup("a", "b"));
a := gpAfp.1;
b := gpAfp.2;
AutomorphismCtor := gpG -> imgs -> GroupHomomorphismByImagesNC(gpG, gpG, GeneratorsOfGroup(gpG), imgs);

AutForAImgs := AutomorphismCtor(gpAfp);
gpHgens_as_auts := [ AutForAImgs([ a^(p+1), b^(-p+1) ]), AutForAImgs( [ b^(-p)*a, a^(-p)*b ]) ];
List(gpHgens_as_auts, IsBijective);
gpH_as_auts := GroupWithGenerators(gpHgens_as_auts, IdentityMapping(gpAfp));
Size(gpH_as_auts);

In GAP 4.8.7 and older, the last command returns 25.

hulpke added a commit to hulpke/gap that referenced this issue Oct 31, 2017
…names

of components: "one" and "useAddition".
This fixes gap-system#1819.
@hulpke
Copy link
Contributor

hulpke commented Oct 31, 2017

Thank you, @fingolfin for isolating out the example. The issue is simply a forgotten component copy. I will fix it.

hulpke added a commit to hulpke/gap that referenced this issue Oct 31, 2017
…names

of components: "one" and "useAddition".
This fixes gap-system#1819.
hulpke added a commit to hulpke/gap that referenced this issue Nov 1, 2017
…names

of components: "one" and "useAddition".
This fixes gap-system#1819.
hulpke added a commit to hulpke/gap that referenced this issue Nov 1, 2017
…names

of components: "one" and "useAddition".
This fixes gap-system#1819.
@hulpke hulpke closed this as completed in 1252eda Nov 5, 2017
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.9.0 milestone Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants