Skip to content

GroupHomomorphismByImages does not work for GroupWithMemory #6795

Open

Description

@TWiedemann

Example 1:

gap> F := FreeGroup(2);
<free group on the generators [ f1, f2 ]>
gap> FM := GroupWithMemory(F);
Group([ <f1 with mem>, <f2 with mem> ])
gap> hom := GroupHomomorphismByImages(F, FM, GeneratorsOfGroup(F), GeneratorsOfGroup(FM));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `LetterRepAssocWord' on 1 arguments
[...]

Example 2:

gap> hom := GroupHomomorphismByImages(FM, F, GeneratorsOfGroup(FM), GeneratorsOfGroup(F));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `LetterRepAssocWord' on 1 arguments
[...]

Example 3:

gap> S := SymmetricGroup(3);
Sym( [ 1 .. 3 ] )
gap> SM := GroupWithMemory(S);
Group([ (1,2,3), (1,2) ])
gap> hom := GroupHomomorphismByImages(S, SM, GeneratorsOfGroup(S), GeneratorsOfGroup(SM));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `RestrictedPermNC' on 2 arguments
[...]

However, the NC-variants work:

gap> hom := GroupHomomorphismByImagesNC(F, FM, GeneratorsOfGroup(F), GeneratorsOfGroup(FM));
[ f1, f2 ] -> [ <f1 with mem>, <f2 with mem> ]
gap> hom(F.1);
<f1 with mem>
gap> hom := GroupHomomorphismByImagesNC(S, SM, GeneratorsOfGroup(S), GeneratorsOfGroup(SM));
[ (1,2,3), (1,2) ] -> [ <(1,2,3) with mem>, <(1,2) with mem> ]

Activity

  1. hulpke commented on Nov 5, 2026

    @hulpke
    Contributor

    This looks as if some methods are missing for memory elements, that will just dispatch to the underlying object.

  2. ThomasBreuer commented on Nov 5, 2026

    @ThomasBreuer
    Contributor

    I am rather surprised that the NC variant works. In fact it doesn't.

    gap> hom := GroupHomomorphismByImagesNC(S, SM, GeneratorsOfGroup(S), GeneratorsOfGroup(SM));;
    gap> hom(S.1);
    Error, no method found! For debugging hints type ?Recovery from NoMethodFound
    [...]
    

    If we ignore the memory in the internal data of the homomorphism, we have to make sure that there is some point where the memory of the result gets constructed.

    I think it depends on the kind of homomorphism whether this can work.
    For example, a homomorphism that maps by decomposing the given element into generators and then forms a corresponding product in the image group will automatically provide elements with memory if the generators in the image have memory.
    On the other hand, if the elements get created in a different way, this does not work.
    (Consider an action homomorphism that creates permutations from positions in an action domain. It cannot provide memory information which one may want to get in the image.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions