You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gap> F:=FreeGroup(2);
<free group on the generators [ f1, f2 ]>
gap> mhom:=IsomorphismFpMonoid(F);
MappingByFunction( <free group on the generators [ f1, f2 ]>, <fp monoid on the generators [ f1, f1^-1, f2, f2^-1
]>, function( x ) ... end, function( x ) ... end )
gap> mon:=Image(mhom);
<fp monoid on the generators [ f1, f1^-1, f2, f2^-1 ]>
gap> k:=KnuthBendixRewritingSystem(mon);
Knuth Bendix Rewriting System for Monoid( [ f1, f1^-1, f2, f2^-1 ] ) with rules
[ [ f1*f1^-1, <identity ...> ], [ f1^-1*f1, <identity ...> ], [ f2*f2^-1, <identity ...> ],
[ f2^-1*f2, <identity ...> ] ]
gap> k1:=ShallowCopy(k);
Knuth Bendix Rewriting System for Monoid( [ f1, f1^-1, f2, f2^-1 ] ) with rules
Error, Record Element: '<rec>.freefam' must have an assigned value in
fam := kbrws!.freefam; at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/kbsemi.gi:703 called from
Rules( kbrws ) at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/kbsemi.gi:763 called from
SetUserHasQuit( 1 ); at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/error.g:325 called from
fam := kbrws!.freefam; at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/kbsemi.gi:703 called from
Rules( kbrws ) at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/kbsemi.gi:763 called from
SHELL( GetBottomLVars( ), false, false, 3, true, prompt, function ( )
if IsBound( OnGAPPromptHook ) and IsFunction( OnGAPPromptHook ) then
OnGAPPromptHook( );
else
return;
fi;
return;
end, "*stdin*", "*stdout*", true ); at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/session.g:60 called from
... at *stdin*:11
you can 'return;' after assigning a value
brk> quit;
Expected behaviour
gap> F:=FreeGroup(2);
<free group on the generators [ f1, f2 ]>
gap> mhom:=IsomorphismFpMonoid(F);
MappingByFunction( <free group on the generators [ f1, f2 ]>, <fp monoid on the generators [ f1, f1^-1, f2, f2^-1
]>, function( x ) ... end, function( x ) ... end )
gap> mon:=Image(mhom);
<fp monoid on the generators [ f1, f1^-1, f2, f2^-1 ]>
gap> k:=KnuthBendixRewritingSystem(mon);
Knuth Bendix Rewriting System for Monoid( [ f1, f1^-1, f2, f2^-1 ] ) with rules
[ [ f1*f1^-1, <identity ...> ], [ f1^-1*f1, <identity ...> ], [ f2*f2^-1, <identity ...> ],
[ f2^-1*f2, <identity ...> ] ]
gap> k1:=ShallowCopy(k);
Knuth Bendix Rewriting System for Monoid( [ f1, f1^-1, f2, f2^-1 ] ) with rules
[ [ f1*f1^-1, <identity ...> ], [ f1^-1*f1, <identity ...> ], [ f2*f2^-1, <identity ...> ],
[ f2^-1*f2, <identity ...> ] ]
Copy and paste GAP banner (to tell us about your setup)
┌───────┐ GAP 4.10.0 of 01-Nov-2018
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-unknown-cygwin-default64
Configuration: gmp 6.1.0, readline
Loading the library and packages ...
Packages: AClib 1.3.1, Alnuth 3.1.0, AtlasRep 1.5.1, AutoDoc 2018.09.20, AutPGrp 1.10, Browse 1.8.8, CRISP 1.4.4,
Cryst 4.1.18, CrystCat 1.1.8, CTblLib 1.2.2, FactInt 1.6.2, FGA 1.4.0, GAPDoc 1.6.2, IO 4.5.4,
IRREDSOL 1.4, LAGUNA 3.9.0, Polenta 1.3.8, Polycyclic 2.14, PrimGrp 3.3.2, RadiRoot 2.8,
ResClasses 4.7.1, SmallGrp 1.3, Sophus 1.24, SpinSym 1.5, TomLib 1.2.7, TransGrp 2.0.4, utils 0.59
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
The second error:
is triggered by the AddRule method. Notice that AddRuleReduced works as it should. Continuing the example above:
Observed behaviour
gap> k!.tzrules;
[ [ [ 1, 2 ], [ ] ], [ [ 2, 1 ], [ ] ], [ [ 3, 4 ], [ ] ], [ [ 4, 3 ], [ ] ] ]
gap> AddRule(k,[[4,4],[]]);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `AddRule' on 2 arguments at /proc/cygdrive/C/gap-4.10.0-x86_64/lib/methsel2.g:250 called from
<function "HANDLE_METHOD_NOT_FOUND">( <arguments> )
called from read-eval loop at *stdin*:12
type 'quit;' to quit to outer loop
brk> quit;
gap> AddRuleReduced(k,[[4,4],[]]);
gap> k!.tzrules;
[ [ [ 1, 2 ], [ ] ], [ [ 2, 1 ], [ ] ], [ [ 3, 4 ], [ ] ], [ [ 4, 3 ], [ ] ], [ [ 4, 4 ], [ ] ] ]
I think what this needs is freefam := kbrws!.freefam, adding as line 790 in lib/kbsemi.gi. This would match up with the definition at line 110 of the same file, and fixes the immediate problem.
However, this isn't an area I'm a great expert on, so would it be possible for you to try that, and see if that seems to fix things, and maybe try doing some other things? For example, it seems a bit weird to me we don't make a copy pairs2check (also around line 790), and instead make a new empty list.
The first error:
is triggered by
ShallowCopy
:Observed behaviour
Expected behaviour
Copy and paste GAP banner (to tell us about your setup)
The second error:
is triggered by the
AddRule
method. Notice thatAddRuleReduced
works as it should. Continuing the example above:Observed behaviour
Expected behaviour
The text was updated successfully, but these errors were encountered: