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: a/c ≡ b/c mod m/c → a ≡ b mod m #3259

Closed
wants to merge 14 commits into from

Conversation

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged awaiting-CI labels Apr 4, 2023
@@ -496,7 +496,7 @@ theorem inv_mul' : (a * b)⁻¹ = a⁻¹ / b := by simp
#align inv_mul' inv_mul'
#align neg_add' neg_add'

@[to_additive]
@[to_additive (attr := simp)]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is tagged simp in mathlib. As there is no porting note, I assume dropping the simp was an error.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If the simp is there in mathlib4 it gives linter errors; removing that simp makes everything check out.

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 you need to have simp only on the multiplicative version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It doesn't make "everything check out" since the proof of my new lemma broke because it was missing. However, it's easy to work around it and potentially non trivial to solve, so I'm leaving a porting note and outsourcing the problem to #3309.

This doesn't have anything to do with additive vs multiplicative stuff. At this level, both worlds have the same simp lemmas.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Please clarify the porting comment about swap, otherwise LGTM!

bors d+

@bors
Copy link

bors bot commented Apr 6, 2023

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@semorrison semorrison added delegated and removed awaiting-review The author would like community review of the PR labels Apr 6, 2023
@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request Apr 6, 2023
leanprover-community/mathlib#18119, leanprover-community/mathlib#18666.

* [`algebra.ring.divisibility`@`f1a2caaf51ef593799107fe9a8d5e411599f3996`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/ring/divisibility?range=f1a2caaf51ef593799107fe9a8d5e411599f3996..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.order.lemmas`@`2258b40dacd2942571c8ce136215350c702dc78f`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/order/lemmas?range=2258b40dacd2942571c8ce136215350c702dc78f..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.gcd`@`d4f69d96f3532729da8ebb763f4bc26fcf640f06`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/gcd?range=d4f69d96f3532729da8ebb763f4bc26fcf640f06..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`algebra.char_p.basic`@`ceb887ddf3344dab425292e497fa2af91498437c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/char_p/basic?range=ceb887ddf3344dab425292e497fa2af91498437c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.zmod.basic`@`297619ec79dedf23525458b6bf5bf35c736fd2b8`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/zmod/basic?range=297619ec79dedf23525458b6bf5bf35c736fd2b8..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)



Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Apr 6, 2023

Build failed (retrying...):

@Parcly-Taxel Parcly-Taxel added the WIP Work in progress label Apr 6, 2023
bors bot pushed a commit that referenced this pull request Apr 6, 2023
leanprover-community/mathlib#18119, leanprover-community/mathlib#18666.

* [`algebra.ring.divisibility`@`f1a2caaf51ef593799107fe9a8d5e411599f3996`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/ring/divisibility?range=f1a2caaf51ef593799107fe9a8d5e411599f3996..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.order.lemmas`@`2258b40dacd2942571c8ce136215350c702dc78f`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/order/lemmas?range=2258b40dacd2942571c8ce136215350c702dc78f..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.gcd`@`d4f69d96f3532729da8ebb763f4bc26fcf640f06`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/gcd?range=d4f69d96f3532729da8ebb763f4bc26fcf640f06..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`algebra.char_p.basic`@`ceb887ddf3344dab425292e497fa2af91498437c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/char_p/basic?range=ceb887ddf3344dab425292e497fa2af91498437c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.zmod.basic`@`297619ec79dedf23525458b6bf5bf35c736fd2b8`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/zmod/basic?range=297619ec79dedf23525458b6bf5bf35c736fd2b8..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)



Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Apr 6, 2023

Build failed (retrying...):

  • Build

bors bot pushed a commit that referenced this pull request Apr 6, 2023
leanprover-community/mathlib#18119, leanprover-community/mathlib#18666.

* [`algebra.ring.divisibility`@`f1a2caaf51ef593799107fe9a8d5e411599f3996`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/ring/divisibility?range=f1a2caaf51ef593799107fe9a8d5e411599f3996..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.order.lemmas`@`2258b40dacd2942571c8ce136215350c702dc78f`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/order/lemmas?range=2258b40dacd2942571c8ce136215350c702dc78f..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.gcd`@`d4f69d96f3532729da8ebb763f4bc26fcf640f06`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/gcd?range=d4f69d96f3532729da8ebb763f4bc26fcf640f06..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`algebra.char_p.basic`@`ceb887ddf3344dab425292e497fa2af91498437c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/char_p/basic?range=ceb887ddf3344dab425292e497fa2af91498437c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.zmod.basic`@`297619ec79dedf23525458b6bf5bf35c736fd2b8`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/zmod/basic?range=297619ec79dedf23525458b6bf5bf35c736fd2b8..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)



Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@eric-wieser
Copy link
Member

bors r-

@bors
Copy link

bors bot commented Apr 6, 2023

Canceled.

@YaelDillies YaelDillies removed the WIP Work in progress label Apr 6, 2023
@YaelDillies
Copy link
Collaborator Author

Should be good this time.

bors merge

bors bot pushed a commit that referenced this pull request Apr 6, 2023
leanprover-community/mathlib#18119, leanprover-community/mathlib#18666.

* [`algebra.ring.divisibility`@`f1a2caaf51ef593799107fe9a8d5e411599f3996`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/ring/divisibility?range=f1a2caaf51ef593799107fe9a8d5e411599f3996..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.order.lemmas`@`2258b40dacd2942571c8ce136215350c702dc78f`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/order/lemmas?range=2258b40dacd2942571c8ce136215350c702dc78f..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.gcd`@`d4f69d96f3532729da8ebb763f4bc26fcf640f06`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/gcd?range=d4f69d96f3532729da8ebb763f4bc26fcf640f06..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`algebra.char_p.basic`@`ceb887ddf3344dab425292e497fa2af91498437c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/char_p/basic?range=ceb887ddf3344dab425292e497fa2af91498437c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.zmod.basic`@`297619ec79dedf23525458b6bf5bf35c736fd2b8`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/zmod/basic?range=297619ec79dedf23525458b6bf5bf35c736fd2b8..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)



Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Apr 6, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: a/c ≡ b/c mod m/c → a ≡ b mod m [Merged by Bors] - feat: a/c ≡ b/c mod m/c → a ≡ b mod m Apr 6, 2023
@bors bors bot closed this Apr 6, 2023
@bors bors bot deleted the modeq_of_div branch April 6, 2023 19:15
MonadMaverick pushed a commit that referenced this pull request Apr 9, 2023
leanprover-community/mathlib#18119, leanprover-community/mathlib#18666.

* [`algebra.ring.divisibility`@`f1a2caaf51ef593799107fe9a8d5e411599f3996`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/ring/divisibility?range=f1a2caaf51ef593799107fe9a8d5e411599f3996..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.order.lemmas`@`2258b40dacd2942571c8ce136215350c702dc78f`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/order/lemmas?range=2258b40dacd2942571c8ce136215350c702dc78f..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.gcd`@`d4f69d96f3532729da8ebb763f4bc26fcf640f06`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/gcd?range=d4f69d96f3532729da8ebb763f4bc26fcf640f06..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`algebra.char_p.basic`@`ceb887ddf3344dab425292e497fa2af91498437c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/char_p/basic?range=ceb887ddf3344dab425292e497fa2af91498437c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.zmod.basic`@`297619ec79dedf23525458b6bf5bf35c736fd2b8`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/zmod/basic?range=297619ec79dedf23525458b6bf5bf35c736fd2b8..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)



Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
MonadMaverick pushed a commit to MonadMaverick/mathlib4 that referenced this pull request Apr 9, 2023
leanprover-community/mathlib#18119, leanprover-community/mathlib#18666.

* [`algebra.ring.divisibility`@`f1a2caaf51ef593799107fe9a8d5e411599f3996`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/ring/divisibility?range=f1a2caaf51ef593799107fe9a8d5e411599f3996..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.order.lemmas`@`2258b40dacd2942571c8ce136215350c702dc78f`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/order/lemmas?range=2258b40dacd2942571c8ce136215350c702dc78f..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.gcd`@`d4f69d96f3532729da8ebb763f4bc26fcf640f06`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/gcd?range=d4f69d96f3532729da8ebb763f4bc26fcf640f06..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.nat.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/nat/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.int.modeq`@`2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/int/modeq?range=2ed7e4aec72395b6a7c3ac4ac7873a7a43ead17c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`algebra.char_p.basic`@`ceb887ddf3344dab425292e497fa2af91498437c`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/algebra/char_p/basic?range=ceb887ddf3344dab425292e497fa2af91498437c..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)
* [`data.zmod.basic`@`297619ec79dedf23525458b6bf5bf35c736fd2b8`..`47a1a73351de8dd6c8d3d32b569c8e434b03ca47`](https://leanprover-community.github.io/mathlib-port-status/file/data/zmod/basic?range=297619ec79dedf23525458b6bf5bf35c736fd2b8..47a1a73351de8dd6c8d3d32b569c8e434b03ca47)



Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants