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: Port CategoryTheory.Adjunction.Opposites #2424

Closed
wants to merge 17 commits into from

Conversation

adamtopaz
Copy link
Contributor

@adamtopaz adamtopaz commented Feb 21, 2023


Open in Gitpod

Mathbin -> Mathlib

fix certain import statements

move "by" to end of line

add import to Mathlib.lean
@adamtopaz adamtopaz added help-wanted The author needs attention to resolve issues WIP Work in progress mathlib-port This is a port of a theory file from mathlib. labels Feb 21, 2023
@semorrison semorrison added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 22, 2023
@semorrison semorrison added merge-conflict The PR has a merge conflict with master, and needs manual merging. and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. labels Feb 22, 2023
@semorrison semorrison removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 28, 2023
@adamtopaz adamtopaz added awaiting-review help-wanted The author needs attention to resolve issues and removed help-wanted The author needs attention to resolve issues WIP Work in progress awaiting-review labels Feb 28, 2023
@mattrobball
Copy link
Collaborator

Lint done.

@mattrobball mattrobball added awaiting-review and removed help-wanted The author needs attention to resolve issues labels Mar 11, 2023
adjointOfOpAdjointOp_homEquiv_symm_apply

-- Porting note: simpNF reports simplifying to itself here
@[simp, nolint simpNF]
Copy link
Member

Choose a reason for hiding this comment

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

I think the linter was right to flag this theorem. The LHS is simplified to something that looks the same, but has some different implicit arguments somewhere. Consequently, a lemma with the exact same statement as this one is not proved by simp even with this lemma marked as a simp lemma. I think this theorem is pretty useless until the LHS is in normal form including implicits.

@ChrisHughes24 ChrisHughes24 added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review labels Mar 11, 2023
homEquiv := fun {X Y} =>
((h.homEquiv (Opposite.op Y) (Opposite.op X)).trans (opEquiv _ _)).symm.trans
(opEquiv _ _)
homEquiv_naturality_left_symm := by
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have hope there was a porting note here noting the regression that this proof is needed at all!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@semorrison
Copy link
Contributor

The problematic lemmas generated by simps (which simpNF is correctly flagging) are not actually used anywhere (verified by backporting to mathlib3), so the simplest solution is to only generated the simp lemmas we need in the first place. I've backported their removal in leanprover-community/mathlib#18680.

bors bot pushed a commit to leanprover-community/mathlib that referenced this pull request Mar 28, 2023
… lemmas (#18680)

Some of the lemmas generated by `simps` in leanprover-community/mathlib4#2424 are bad according to the simpNF linter, and have proved hard to fix by hand. Fortunately, they are simply not needed. This PR verifies this by backporting their removal to mathlib3. Compiles locally, lets hope CI agrees.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@adamtopaz adamtopaz added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes labels Mar 28, 2023
@semorrison
Copy link
Contributor

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Mar 28, 2023
bors bot pushed a commit that referenced this pull request Mar 28, 2023


Co-authored-by: qawbecrdtey <qawbecrdtey@naver.com>
Co-authored-by: Matthew Ballard <matt@mrb.email>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>
@bors
Copy link

bors bot commented Mar 28, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: Port CategoryTheory.Adjunction.Opposites [Merged by Bors] - feat: Port CategoryTheory.Adjunction.Opposites Mar 28, 2023
@bors bors bot closed this Mar 28, 2023
@bors bors bot deleted the port/CategoryTheory.Adjunction.Opposites branch March 28, 2023 22:23
bors bot pushed a commit that referenced this pull request Mar 30, 2023
* [`category_theory.adjunction.opposites`@`f3ee4628e2dc737653af924c41fa681abc2a4f4a`..`0148d455199ed64bf8eb2f493a1e7eb9211ce170`](https://leanprover-community.github.io/mathlib-port-status/file/category_theory/adjunction/opposites?range=f3ee4628e2dc737653af924c41fa681abc2a4f4a..0148d455199ed64bf8eb2f493a1e7eb9211ce170)

The changes in leanprover-community/mathlib#18680 were already part of #2424, so we just need to update the SHA.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
joelriou pushed a commit that referenced this pull request Mar 30, 2023


Co-authored-by: qawbecrdtey <qawbecrdtey@naver.com>
Co-authored-by: Matthew Ballard <matt@mrb.email>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>
MonadMaverick pushed a commit that referenced this pull request Apr 9, 2023
* [`category_theory.adjunction.opposites`@`f3ee4628e2dc737653af924c41fa681abc2a4f4a`..`0148d455199ed64bf8eb2f493a1e7eb9211ce170`](https://leanprover-community.github.io/mathlib-port-status/file/category_theory/adjunction/opposites?range=f3ee4628e2dc737653af924c41fa681abc2a4f4a..0148d455199ed64bf8eb2f493a1e7eb9211ce170)

The changes in leanprover-community/mathlib#18680 were already part of #2424, so we just need to update the SHA.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
MonadMaverick pushed a commit that referenced this pull request Apr 9, 2023
* [`category_theory.adjunction.opposites`@`f3ee4628e2dc737653af924c41fa681abc2a4f4a`..`0148d455199ed64bf8eb2f493a1e7eb9211ce170`](https://leanprover-community.github.io/mathlib-port-status/file/category_theory/adjunction/opposites?range=f3ee4628e2dc737653af924c41fa681abc2a4f4a..0148d455199ed64bf8eb2f493a1e7eb9211ce170)

The changes in leanprover-community/mathlib#18680 were already part of #2424, so we just need to update the SHA.



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants