Skip to content

[Merged by Bors] - refactor: Int.negOnePow as a map to ℤˣ rather than ℤ#8307

Closed
joelriou wants to merge 11 commits intomasterfrom
negonepow-refactor
Closed

[Merged by Bors] - refactor: Int.negOnePow as a map to ℤˣ rather than ℤ#8307
joelriou wants to merge 11 commits intomasterfrom
negonepow-refactor

Conversation

@joelriou
Copy link
Copy Markdown
Contributor

@joelriou joelriou commented Nov 9, 2023

Following #7866, Int.negOnePow is redefined as a map ℤ → ℤˣ rather than ℤ → ℤ.


Open in Gitpod

@joelriou joelriou added the WIP Work in progress label Nov 9, 2023
@joelriou joelriou added awaiting-review and removed WIP Work in progress labels Nov 10, 2023
Copy link
Copy Markdown
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.

I can't yet tell what the impact of the negOnePow change is, but these module instance all look like a good idea anyway.

I think just the question about smul_comm instances is left to resolve.

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Nov 10, 2023
@joelriou joelriou added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Nov 13, 2023
@jcommelin
Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Nov 14, 2023
mathlib-bors bot pushed a commit that referenced this pull request Nov 14, 2023
Following #7866, `Int.negOnePow` is redefined as a map `ℤ → ℤˣ` rather than `ℤ → ℤ`.
simp [add_smul, sub_eq_add_neg]
#align sub_smul sub_smul

instance : SMulCommClass ℤˣ R M where
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm pretty sure we already have these instances more generally; I'll remove them in a follow up

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually,I had time to push a fix

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 14, 2023

Canceled.

instance {R : Type u} {M : Type v} [Ring R] [AddCommGroup M]
[Module R M] : SMulCommClass ℤˣ R M := inferInstance

instance {R : Type u} {M : Type v} [Ring R] [AddCommGroup M]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This can probably be deleted unless there's a performance issue

Copy link
Copy Markdown
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.

bors d+

I pushed a commit removing the new Units Int lemma entirey; the instances already existed further down in the same file, and the lemma was actually less direct than an existing lemma.

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 14, 2023

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

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Nov 14, 2023
@joelriou
Copy link
Copy Markdown
Contributor Author

Thanks!

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Nov 14, 2023
Following #7866, `Int.negOnePow` is redefined as a map `ℤ → ℤˣ` rather than `ℤ → ℤ`.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 14, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor: Int.negOnePow as a map to ℤˣ rather than ℤ [Merged by Bors] - refactor: Int.negOnePow as a map to ℤˣ rather than ℤ Nov 14, 2023
@mathlib-bors mathlib-bors bot closed this Nov 14, 2023
@mathlib-bors mathlib-bors bot deleted the negonepow-refactor branch November 14, 2023 15:34
alexkeizer pushed a commit that referenced this pull request Nov 17, 2023
Following #7866, `Int.negOnePow` is redefined as a map `ℤ → ℤˣ` rather than `ℤ → ℤ`.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
alexkeizer pushed a commit that referenced this pull request Nov 21, 2023
Following #7866, `Int.negOnePow` is redefined as a map `ℤ → ℤˣ` rather than `ℤ → ℤ`.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
grunweg pushed a commit that referenced this pull request Dec 15, 2023
Following #7866, `Int.negOnePow` is redefined as a map `ℤ → ℤˣ` rather than `ℤ → ℤ`.



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 This pull request has been delegated to the PR author (or occasionally another non-maintainer). ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants