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] - chore: redefine DivInvMonoid.zpow_succ' field #17573

Closed
wants to merge 1 commit into from

Conversation

Vierkantor
Copy link
Contributor

This field of the class refers to Int.ofNat, but this is not (reducibly) defeq to the coercion, and not simp-normal. By using the coercion instead, we get access to all the lemmas on the coercion. This means we should be able to get rid of a few erws and simps.

We do the same for SubNegMonoid.zsmul_succ'.

An argument against this change is that the original version mirrors the definition of Int as an inductive type somewhat better. However, note that we already have a plain 0 in zpow_zero' instead of Int.ofNat 0.


Open in Gitpod

Copy link

github-actions bot commented Oct 9, 2024

PR summary f82ab413ba

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

@jcommelin
Copy link
Member

Thanks 🎉

If CI passes, please remove the label awaiting-CI and merge this yourself, by adding a comment bors r+.

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 9, 2024

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

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Oct 9, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 9, 2024
Almost all of the `erw`s work just fine as `rw`s. Only two places need additional rewriting: this is because the `pow_succ'` field of `DivInvMonoid`s mentions `Int.ofNat`, which is not reducibly defeq to the actual cast we use in our lemmas.

This suggests we should redefine `pow_succ'` to use the actual cast instead: #17573.
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Oct 9, 2024
@mathlib4-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 9, 2024
This field of the class refers to `Int.ofNat`, but this is not (reducibly) defeq to the coercion, and not `simp`-normal. By using the coercion instead, we get access to all the lemmas on the coercion. This means we should be able to get rid of a few `erw`s and `simp`s.

An argument against this change is that the original version mirrors the definition of `Int` as an inductive type somewhat better. However, note that we already have a plain `0` in `zpow_zero'` instead of `Int.ofNat 0`.
@Vierkantor
Copy link
Contributor Author

bors r+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 9, 2024

👎 Rejected by label

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Oct 9, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 9, 2024
@Vierkantor
Copy link
Contributor Author

Come on, bors!

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Oct 9, 2024
This field of the class refers to `Int.ofNat`, but this is not (reducibly) defeq to the coercion, and not `simp`-normal. By using the coercion instead, we get access to all the lemmas on the coercion. This means we should be able to get rid of a few `erw`s and `simp`s.

We do the same for `SubNegMonoid.zsmul_succ'`.

An argument against this change is that the original version mirrors the definition of `Int` as an inductive type somewhat better. However, note that we already have a plain `0` in `zpow_zero'` instead of `Int.ofNat 0`.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 9, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: redefine DivInvMonoid.zpow_succ' field [Merged by Bors] - chore: redefine DivInvMonoid.zpow_succ' field Oct 9, 2024
@mathlib-bors mathlib-bors bot closed this Oct 9, 2024
@mathlib-bors mathlib-bors bot deleted the redefine-zpow_succ branch October 9, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants