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

RCWA package changes how free magma elements are printed (including group ring elements) #2020

Closed
fingolfin opened this issue Dec 12, 2017 · 3 comments
Assignees
Labels
kind: bug Issues describing general bugs, and PRs fixing them topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)

Comments

@fingolfin
Copy link
Member

@cdwensley reported the following: With no packages loaded, one gets this:

gap> R := GroupRing( GF(2), Group( (1,2,3) ) );;
gap> z := Zero(R);
<zero> of ...

But if the RCWA package by @Stefan-Kohl is loaded, one gets this instead:

gap> R := GroupRing( GF(2), Group( (1,2,3) ) );;
gap> z := Zero(R);
0

The problem is caused by this method in RCWA, file lib/rcwamap.gi:3165:

InstallMethod( ViewObj,
              "for elements of group rings of rcwa groups (RCWA)",
              ReturnTrue, [ IsElementOfFreeMagmaRing ], 100,
 function ( elm )
...

The description string suggests this is "for elements of group rings of rcwa groups (RCWA)", but the type selector applies to arbitrary group rings, thus causing the breakage.

Actually, the function tries to restrict itself, via this check:

    l       := CoefficientsAndMagmaElements(elm);
    grpelms := l{[1,3..Length(l)-1]};
    coeffs  := l{[2,4..Length(l)]};
    if not ForAll(grpelms,IsRcwaMapping) then TryNextMethod(); fi;

But this fails for the zero element, because for that l is empty.

One fix therefore would be to simply change RCWA to also print <zero> of ..., like the library.

Alternatively, one could always perform the check on the one element, like so:

if not IsRcwaMapping(CoefficientsAndMagmaElements(One(elm))[1]) then
  TryNextMethod();
fi;
@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker) labels Dec 12, 2017
@Stefan-Kohl
Copy link
Member

This should be solved with RCWA 4.6.1.

@olexandr-konovalov
Copy link
Member

@Stefan-Kohl thanks - it has been picked up this morning and is now under testing. If all is fine, it will appear in packages-stable-4.9.tar.gz and packages-master.tar.gz archives in a couple of days.

hulpke added a commit to hulpke/gap that referenced this issue Jan 1, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020
hulpke added a commit to hulpke/gap that referenced this issue Jan 1, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020
hulpke added a commit to hulpke/gap that referenced this issue Jan 9, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard
@olexandr-konovalov
Copy link
Member

RCWA 4.6.1 is now in the public GAP release.

hulpke added a commit to hulpke/gap that referenced this issue Jan 23, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
hulpke added a commit to hulpke/gap that referenced this issue Jan 31, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
hulpke added a commit to hulpke/gap that referenced this issue Feb 5, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
hulpke added a commit to hulpke/gap that referenced this issue Feb 8, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
hulpke added a commit to hulpke/gap that referenced this issue Feb 12, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
hulpke added a commit to hulpke/gap that referenced this issue Feb 22, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
hulpke added a commit to hulpke/gap that referenced this issue Mar 6, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
ChrisJefferson pushed a commit to ChrisJefferson/gap that referenced this issue Jun 14, 2018
with `IsomorphismFpGroup`, store the *inverse* of this isomorphism as a
known faithful map to a better behaved group, thus avoiding such a searched
renewed if any "finite group" calculation is done in the FpGroup (not that
this is advisable, but users do it).

Ditto translate a known faithful map after calling
`(Isomorphism)SimplifiedFpGroup`.

This is suggested by gap-system#2020

also bail out in complicated case instead of trying hard

The output of a `Random` call in test file has changed.

REBASE: Comment cleanup
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 topic: packages issues or PRs related to package handling, or specific to a package (for packages w/o issue tracker)
Projects
None yet
Development

No branches or pull requests

3 participants