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

Allow function-call syntax for general mappings. #3901

Merged
merged 1 commit into from
Mar 2, 2020
Merged

Conversation

stevelinton
Copy link
Contributor

@stevelinton stevelinton commented Feb 23, 2020

#2006 Description
Inspired by a recent GAP Forum request. This PR allows a function-call like syntax for taking images of general mappings. Specifically map( x ) is treated as Image( map, x) whenever map is a general mapping.

It's really just for comments. The change is just a couple of lines, plus tests and a note in the manual,
so it seemed better to demonstrate the idea before discussing, but I'd not wedded to it.

Text for release notes

Allows a function-call like syntax for taking images of general mappings.

Incorporates #3902 which should be addressed first.

If this pull request should be mentioned in the release notes,
please provide a short description matching the style of the GAP
CHANGES.md file in the root directory.

Further details

If necessary, please provide further details here.

Checklist for pull request reviewers

  • [x ] proper formatting

If your code contains kernel C code, run clang-format on it; the
simplest way is to use git clang-format, e.g. like this (don't
forget to commit the resulting changes):

git clang-format $(git merge-base HEAD master)
  • usage of relevant labels

    1. either release notes: not needed or release notes: to be added
    2. at least one of the labels bug or enhancement or new feature
    3. for changes meant to be backported to stable-4.X add the backport-to-4.X label
    4. consider adding any of the labels build system, documentation, kernel, library, tests
  • runnable tests

  • lines changed in commits are sufficiently covered by the tests

  • adequate pull request title

  • well formulated text for release notes

  • relevant documentation updates

  • sensible comments in the code

@stevelinton stevelinton added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: library release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 23, 2020
@ChrisJefferson
Copy link
Contributor

This feels like an improvement to me. If we decided we really didn't want this, I'd still want to add a function which told people to use Image.

@stevelinton stevelinton added the status: awaiting a different PR PRs that should not be merged until (at least one) other PR is merged label Feb 23, 2020
@stevelinton stevelinton removed the status: awaiting a different PR PRs that should not be merged until (at least one) other PR is merged label Feb 26, 2020
@fingolfin fingolfin mentioned this pull request Mar 1, 2020
8 tasks
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many people have been confused by this in the past, and I got a question about this just a few weeks ago, so...

The one objection I can think of is that GAP actions are always right actions, and this syntax is a strictly speaking a syntax for left actions; i.e., we have x^(f*g) = (x^f)^g but (f*g)(x) = g(f(x)). But I think that's not a major issue; though it might be worthwhile to point this property out explicitly in the documentation.

Please rebase so that tests have a chance of running.

@stevelinton stevelinton added the do not merge PRs which are not yet ready to be merged (e.g. submitted for discussion, or test results) label Mar 2, 2020
@stevelinton
Copy link
Contributor Author

@fingolfin Agreed about a warning in the documentation -- added "do not merge" until I have a minute to add it

@coveralls
Copy link

coveralls commented Mar 2, 2020

Coverage Status

Coverage remained the same at 84.779% when pulling 8d29de9 on func-auts into 9f22a72 on master.

@stevelinton stevelinton removed the do not merge PRs which are not yet ready to be merged (e.g. submitted for discussion, or test results) label Mar 2, 2020
@stevelinton
Copy link
Contributor Author

Documentation warning added.

@stevelinton stevelinton merged commit b068bb1 into master Mar 2, 2020
@stevelinton stevelinton deleted the func-auts branch March 2, 2020 15:00
@danielrademacher danielrademacher self-assigned this Feb 16, 2021
@ThomasBreuer ThomasBreuer self-assigned this Feb 17, 2021
ThomasBreuer added a commit to ThomasBreuer/gap that referenced this pull request Feb 17, 2021
... which had been introduced in pull request gap-system#3901
@ThomasBreuer ThomasBreuer added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 17, 2021
fingolfin pushed a commit that referenced this pull request Feb 17, 2021
... which had been introduced in pull request #3901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: added PRs introducing changes that have since been mentioned in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants