Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6409 +/- ##
==========================================
- Coverage 79.02% 78.97% -0.05%
==========================================
Files 685 685
Lines 294324 295121 +797
Branches 8647 8670 +23
==========================================
+ Hits 232591 233076 +485
- Misses 59925 60238 +313
+ Partials 1808 1807 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
stertooy
left a comment
There was a problem hiding this comment.
Very happy to see this PR revived!
One thing I'm a bit wary of, is how PreImagesSet( f, U ) always returns [ ] if U is not a subset of Range( f ), even if they have non-empty intersection. Intuitively, I would expect this function to follow the standard(?) mathematical definition of
PreImagesSetNC( Intersection( Range( f ), U ) )
|
@stertooy It's so good to get feedback on this work - I will get on with making the changes you suggest. |
|
Now I am really confused. The manual states: "If elms is a subset of the range of the general mapping map then PreImagesSet returns the set of all preimages of elms under map." Sticking to that, PreImagesSet should return fail if U is not a subset of the range. Alternatively, we could ditch PreImagesSetNC, and redefine PreImagesSet to return the preimage of the intersection, which could be []. |
|
Perhaps this is why I returned [] in PreImagesElm when the test failed: |
I think the question is what we want the non-NC functions to do for elements/sets not contained in the range. I see two options:
The former option keeps the NC and non-NC versions closer together, with the only difference being a extra check, which is what an NC version usually indicates in GAP. The latter option sticks closer to the standard mathematical definitions. Either option is fine with me (with a preference for option 2), but it should at least be consistent across all the affected functions.
I think we should still keep Perhaps @fingolfin @ThomasBreuer @hulpke want to weigh in, given that they were active in #4809 and #5173? |
|
Thanks for working on this again, @cdwensley. Unfortunately I don't have the bandwidth available to read all here, think about it, and come up with a good stance right now -- we'll get there, but I am afraid not in time for GAP 4.16.0 -- but I am confident it'll get merged eventually, certainly before 4.17.0. I'll try to get back to this when I have some mental capacity for it |
|
I think part of the reason of NC functions is to actually not have to worry about issues such as membership (which might require an extra test). |
|
Never expected it to make 4.16.0 but I will try to keep it up-to-date with gapdev.On 28 May 2026, at 01:03, Max Horn ***@***.***> wrote:fingolfin left a comment (gap-system/gap#6409)
Thanks for working on this again, @cdwensley. Unfortunately I don't have the bandwidth available to read all here, think about it, and come up with a good stance right now -- we'll get there, but I am afraid not in time for GAP 4.16.0 -- but I am confident it'll get merged eventually, certainly before 4.17.0.
I'll try to get back to this when I have some mental capacity for it
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
Agree - will make adjustments in due course.On 28 May 2026, at 02:49, Alexander Hulpke ***@***.***> wrote:hulpke left a comment (gap-system/gap#6409)
I think part of the reason of NC functions is to actually not have to worry about issues such as membership (which might require an extra test).
I.e. the result of PreImagesSetNC should undefined if the set is not in the image of the map, but if it is returns the same as PreImagesSet.
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Teach args helper about multi-arg variadic functions.
…s were not supported (#6401) Add runtime argument checks to the user-facing GF2 and 8-bit kernel entry points instead of relying on debug-only assertions or unchecked representation assumptions. Use shared Require helpers for compressed vectors and matrices, and tighten plain-list validation where these entry points expect list-backed inputs. Harden the exported vec8bit kernel entry points that assumed a first row existed, and fix SHIFT_VEC8BIT_RIGHT for empty compressed vectors. AI assistance from OpenAI Codex helped prepare these kernel validation changes. Co-authored-by: Codex <codex@openai.com>
Resolves #2570 Co-authored-by: Codex <codex@openai.com>
If input group is infinite or not solvable, fail is returned.
Mostly avoid putting to many things on one line, for better readability and more accurate code coverage tracking. Also remove obsolete restrictions for perfect group orders 86016, 368640, 737280
... as discussed on PR #6357
This undocumented function accepted more than one argument, but ignored any beyond the first. Apparently this was introduced in the GAP 4.5 days for compatibility reasons? But compatibility with what? No package known to me calls this. For reference in GAP 4.4 it had two arguments (but also was undocumented, and not called by any outside code).
The OrbitStabilizer entry in the reference manual only documented the algorithm, not what the operation returns. Adds: - A short sentence explicitly stating the return value is an immutable record with `orbit` (the orbit as a list) and `stabilizer` (the point stabilizer subgroup of G). - A small example block using the same `g:=Group((1,3,2),(2,4,3));;` setup already used by the adjacent `Stabilizer` example, so the rendered output is identical to verified output already in this file.
…files (#6467) Corrects misprints and grammatical errors (misspellings, subject/verb agreement, stray commas, non-idiomatic phrasing, etc.) in comments across all files listing Alexander Hulpke as a (co)author. Boilerplate headers, citation keys, GAP identifiers, GAPDoc markup, non-English notes, and genuinely ambiguous/garbled comments were left untouched. Co-authored-by: hulpke <hulpke@math.colostate.edu> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
... and in general make its phrasing more consistent. Also update some several outdated sections of the documentation about break loops and error handling. Co-authored-by: Codex <codex@openai.com>
* Align and clarify break loop instructions further * Adjust <Log> blocks to new late error msg * Regenerate tst/testspecial
They are not referenced anywhere and nowadays at most of historical interest.
|
Thanks for your comments. Away for a few days - will address them when we return. |
|
There was a merge conflict in |
Restyle the browser GAP page to match www.gap-system.org (Ubuntu fonts, GAP logo, crimson accents, dark-mode support) and vendor all runtime assets (xterm 4.17.0, xterm-pty 0.9.4, the fit addon, logo, fonts) so the deployed site has no CDN dependency. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|
As suggested last week I have removed the recently introduced PreImagesNC from the library, though PreImages remains. In fact there were 12 calls to PreImages in the library which were changed to PreImagesNC and are now back to PreImages (in alglie.gi, grp.gi, grpnice.gi, grpprmcs.gi, mapprep.gi and relation.gi). Entries for PreImages in mapping.gd and mapping.gi have reverted to the versions in master. |
ThomasBreuer
left a comment
There was a problem hiding this comment.
Thanks a lot for the changes, and sorry for not checking them earlier.
I have added a few comments which should be easy to address.
The only missing bit is then the remark for the release notes.
I think that this pull request can be described as follows.
- Fix the behaviour of the functions in question (in the sense of the examples from #4809).
- Introduce
NCvariants for the functions such that the newly introduced checks can be omitted in situations where they are unnecessary. - Change the GAP library such that these new
NCvariants are called. (For GAP package maintainers, we should give a hint that the code of their package may be slowed down by the new checks, and that the recommended solution is to use theNCvariants where appropriate.)
Once this is done, we should really merge this pull request.
(And afterwards we should think about follow-up changes for ImagesRepresentativeNC and related functions, since now we know which changes are needed.)
| # check that <elm> has at least one preimage under <map> | ||
| if IsEmpty( pres ) then | ||
| return fail; | ||
| return []; |
There was a problem hiding this comment.
I think the fail result is correct.
When PreImagesRepresentativeNC was called via a PreImagesRepresentative call then pres cannot be empty, but if one has called PreImagesRepresentativeNC directly then the statement "anything may happen if elm is not an element of the range of map" from the documentation does not cover all cases where elm is not an element of the image of map.
In this sense, we can either change the documentation of PreImagesRepresentativeNC to "anything may happen if elm is not an element of the image of map", or the PreImagesRepresentativeNC methods have to deal with the situation that elm is not in the image.
I prefer the former solution.
| ## If <A>elm</A> is not even in the range then an error is signalled. | ||
| ## <P/> | ||
| ## When using <C>PreImagesRepresentativeNC</C> anything may happen if | ||
| ## <A>elm</A> is not an element of the range of <A>map</A>. |
There was a problem hiding this comment.
| ## <A>elm</A> is not an element of the range of <A>map</A>. | |
| ## <A>elm</A> is not an element of the image of <A>map</A>. |
PreImagesRepresentative checks whether elm is in the image, from this point of view PreImagesRepresentativeNC can assume that elm is in the image, and need not deal with situations where this is not the case.
(See the comment about line 1316 of mapping.gi.)
| #O PreImagesElmNC( <map>, <elm> ) . . . . . . . . . . . under a gen. mapping | ||
| ## | ||
| ## <#GAPDoc Label="PreImagesElm"> | ||
| ## <ManSection> |
There was a problem hiding this comment.
Add a line
## <Oper Name="PreImagesElmNC" Arg='map, elm'/>
below the corresponding line for PreImagesElm, because otherwise ?PreImagesElmNC will not work.
|
Thanks @cdwensley -- I really hope we can finally get this in for GAP 4.17.0 |
|
@cdwensley I took the liberty of fixing the merge conflicts with |
|
@ThomasBreuer, @fingolfin : thanks for all these comments. Not sure when I shall be able to address them. |
This aims to continue work on the process outlined in issue #4809, and started in PR #5073.
(The latter PR was so far out of sync with the master that rebasing has proved to be very difficult, hence this version.)
The operations PreImages, PreImagesSet, PreImagesElm and PreImagesRepresentative have all been renamed throughout the library by adding 'NC' to their names. New versions of the four operations have been introduced which just add a simple test and then call the NC versions.
Authors of packages which include a method for one of the four operations have been asked to adjust their packages to prepare for the change. The packages which have merged a PR, and made a release after that are: cryst, fr, orb, polycyclic, matgrp, qpa, rcwa, semigroups, utils and wedderga, while fga has merged a PR but not made a release.
The fining package has closed PR#28 without merging it - it installs another method for PreImagesSet.