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

[Merged by Bors] - feat(data/set/basic,order/filter/basic): add semiconj lemmas about images and maps #14970

Closed
wants to merge 7 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Jun 26, 2022

This adds function.commute and function.semiconj lemmas, and replaces all the uses of _comm lemmas with the semiconj version as it turns out that only this generality is needed.


Open in Gitpod

…with more useful API

`_comm` lemmas are usually of the form `f (g x) = g (f x)`, but this lemma was of the form
`f1 (f2 x) = f3 (f4 x)` which isn't commutativity in the usual sense.

This adds a `function.commute` and `function.semiconj` lemma, and renames `image_comm` to `image_image_eq_image_image_of_eq`..
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels Jun 26, 2022
Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

I am happy with the semiconj and commute lemmas (although I would like to see finset and filter versions as well), but image_image_eq_image_image_of_eq is a terrible name that goes against the naming conventions around algebraic replacement rules: see set.image2_comm, set.image2_assoc, the second half of data.finset.n_ary, the second half of data.filter.n_ary.

@eric-wieser
Copy link
Member Author

eric-wieser commented Jun 26, 2022

The finset lemmas can't exist until #14963 goes in, I'm working on the filter ones now.
I agree about reverting the name change, we seem to have precedent for this _comm naming even though I think in the long run it might be nice to have something like _comm2 or comm_sq to indicate that this is a different type of commutativity to function.commute or commute or mul_comm

@eric-wieser eric-wieser changed the title refactor(data/set/basic): replace the weirdly-named set.image_comm with more useful API feat(data/set/basic,order/filter/basic): add semiconj lemmas about images and maps Jun 26, 2022
@YaelDillies
Copy link
Collaborator

It's a matter of "commutativity in a group" vs "commutativity in a groupoid". Do you have examples of groupoids that are also groups in an incompatible way? If not, I think the naming convention can stay as such because the two use cases are analogous and disjoint.

@eric-wieser
Copy link
Member Author

The finset lemmas can't exist until #14963 goes in, I'm working on the filter ones now.

Both are now added

@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Jun 28, 2022
@urkud
Copy link
Member

urkud commented Jul 8, 2022

Thanks!
bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jul 8, 2022
bors bot pushed a commit that referenced this pull request Jul 8, 2022
…ages and maps (#14970)

This adds `function.commute` and `function.semiconj` lemmas, and replaces all the uses of `_comm` lemmas with the `semiconj` version as it turns out that only this generality is needed.
@bors
Copy link

bors bot commented Jul 8, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/set/basic,order/filter/basic): add semiconj lemmas about images and maps [Merged by Bors] - feat(data/set/basic,order/filter/basic): add semiconj lemmas about images and maps Jul 8, 2022
@bors bors bot closed this Jul 8, 2022
@bors bors bot deleted the eric-wieser/set.image_comm branch July 8, 2022 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants