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

Using ranges for seeds in Orbits #5056

Closed
rfmorse opened this issue Sep 15, 2022 · 2 comments · Fixed by #5057
Closed

Using ranges for seeds in Orbits #5056

rfmorse opened this issue Sep 15, 2022 · 2 comments · Fixed by #5057

Comments

@rfmorse
Copy link

rfmorse commented Sep 15, 2022

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

Observed behaviour

gap> act := function(omega,g) return PowerModInt(omega,Int(g),15); end;
gap> ugrp := Units(ZmodnZ(Phi(15)));
gap> orbs := Orbits(ugrp,[1..5],act);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `[]:=' on 3 arguments
The 2nd argument is 'fail' which might point to an earlier problem
 at /Users/morse/gap-4.12.0/lib/methsel2.g:249 called from
PositionCanonical( D, o ) at /Users/morse/gap-4.12.0/lib/oprt.gi:1694 called from
op( G, D, gens, gens, act ) at /Users/morse/gap-4.12.0/lib/oprt.gd:654 called from
<function "Orbits for a group, a domain or list, and a function">( <arguments> )
 called from read-eval loop at *stdin*:3
type 'quit;' to quit to outer loop

Expected behaviour

#Same as

gap> orbs := Orbits(ugrp,[1,2,3,4,5],act);
[ [ 1 ], [ 2, 8 ], [ 3, 12 ], [ 4 ], [ 5 ] ]

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

 ┌───────┐   GAP 4.12.0 of 2022-08-18
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-apple-darwin21-default64-kv8
 Configuration:  gmp 6.2.1, GASMAN
 Loading the library and packages ...
 Packages:   AClib 1.3.2, Alnuth 3.2.1, AtlasRep 2.1.4, AutoDoc 2022.07.10, AutPGrp 1.11, Browse 1.8.14, 
             CaratInterface 2.3.4, CRISP 1.4.5, Cryst 4.1.25, CrystCat 1.1.10, CTblLib 1.3.4, FactInt 1.6.3, 
             FGA 1.4.0, Forms 1.2.8, GAPDoc 1.6.6, genss 1.6.7, IO 4.7.2, IRREDSOL 1.4.3, LAGUNA 3.9.5, orb 4.8.5, 
             Polenta 1.3.10, Polycyclic 2.16, PrimGrp 3.4.2, RadiRoot 2.9, recog 1.3.2, ResClasses 4.7.3, 
             SmallGrp 1.5, Sophus 1.27, SpinSym 1.5.2, TomLib 1.2.9, TransGrp 3.6.3, utils 0.76
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
@fingolfin
Copy link
Member

Thanks for the report!

In this case, the Orbits method from lib/oprt.gi line 1665 is invoked, which starts like this:

InstallMethod( Orbits, "for arbitrary domains", true, OrbitsishReq, 0,
function( G, D, gens, acts, act )

The info string is revealing: it suggests D is a domain (in the GAP sense) which is counter to what the documentation says (we have OrbitsDomain for this case). Rather, D should be called seeds to match the documentation.

This Orbits method then has a special case for when D / seeds is a plist. If it is not, it kinda assumed that D is a domain (i.e., closed under the action, i.e., a union of orbits).

Anyway, should be fixed by PR #5057

@rfmorse
Copy link
Author

rfmorse commented Sep 15, 2022

I was thinking of how to make the example simpler and made "act" the trivial action. However in this case the error does not occur.

gap> act := function(omega,g) return omega; end;
gap> orbs := Orbits(ugrp,[1..5],act);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ] ]

gap> act := function(omega,g) return PowerModInt(omega,Int(g),15); end;
gap> orbs := Orbits(ugrp,[1..5],act);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound . . .

Surprised that the action definition made a difference.

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

Successfully merging a pull request may close this issue.

2 participants