-
Notifications
You must be signed in to change notification settings - Fork 892
[Merged by Bors] - feat: Missing opposite instances #2940
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
Conversation
|
I thought leanprover-community/mathlib3#18596 was already forward-ported. Did you edit the wrong PR description? |
|
Indeed that's what happened! |
|
This forward-port (when complete, which it currently isn't) will represent a substantial number of files in https://leanprover-community.github.io/mathlib-port-status/out-of-sync, it would be great to make progress on it. |
eric-wieser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
forward-port looks accurate, thanks!
|
bors r- bors d+ |
|
Oh, I guess it doesn't build yet. |
|
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
|
Canceled. |
497d474 to
e830b38
Compare
|
If we're going to add explicit instance names for everything, lets do that separately in #3032 |
|
This PR/issue depends on:
|
Mathlib/Algebra/Field/Opposite.lean
Outdated
| { AddOpposite.groupWithZero α, AddOpposite.ring α, AddOpposite.ratCast α with | ||
| ratCast_mk := fun a b hb h => unop_injective $ by | ||
| rw [unop_ratCast, Rat.cast_def, unop_mul, unop_inv, unop_natCast, unop_intCast, | ||
| div_eq_mul_inv] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change wasn't present in the Lean 3 PR; can you backport it?
| instance nonAssocRing [NonAssocRing α] : NonAssocRing αᵃᵒᵖ := | ||
| { AddOpposite.addCommGroup α, AddOpposite.mulZeroOneClass α, AddOpposite.distrib α with } | ||
| { AddOpposite.addCommGroupWithOne α, AddOpposite.mulZeroOneClass α, AddOpposite.distrib α with } | ||
|
|
||
| instance ring [Ring α] : Ring αᵃᵒᵖ := | ||
| { AddOpposite.addCommGroup α, AddOpposite.monoid α, AddOpposite.semiring α with } | ||
| { AddOpposite.addCommGroupWithOne α, AddOpposite.monoid α, AddOpposite.semiring α with } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes didn't exist in the Lean 3 version either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is all stuff that broke because of the way Lean 4 finds the instances. It's already wrong in mathlib but somehow we didn't hit the problem.
eric-wieser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add these porting notes to indicate this is not quite in sync
|
bors merge |
Match leanprover-community/mathlib3#18602 Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
Pull request successfully merged into master. Build succeeded: |
Match leanprover-community/mathlib3#18602