Skip to content

Conversation

@YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Mar 16, 2023

@YaelDillies YaelDillies added the mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged label Mar 16, 2023
@eric-wieser
Copy link
Member

I thought leanprover-community/mathlib3#18596 was already forward-ported. Did you edit the wrong PR description?

@YaelDillies
Copy link
Collaborator Author

Indeed that's what happened!

@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes. WIP Work in progress needs-mathlib-SHA labels Mar 17, 2023
@eric-wieser
Copy link
Member

eric-wieser commented Mar 20, 2023

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.

@YaelDillies YaelDillies added awaiting-review awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. and removed awaiting-author A reviewer has asked the author a question or requested changes. needs-mathlib-SHA labels Mar 21, 2023
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.

bors merge

forward-port looks accurate, thanks!

@kim-em kim-em added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Mar 21, 2023
@eric-wieser eric-wieser removed WIP Work in progress awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. labels Mar 21, 2023
@eric-wieser
Copy link
Member

bors r-

bors d+

@eric-wieser
Copy link
Member

Oh, I guess it doesn't build yet.

@github-actions github-actions bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Mar 21, 2023
@bors
Copy link

bors bot commented Mar 21, 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.

@bors
Copy link

bors bot commented Mar 21, 2023

Canceled.

@eric-wieser
Copy link
Member

If we're going to add explicit instance names for everything, lets do that separately in #3032

@eric-wieser eric-wieser added blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed ready-to-merge This PR has been sent to bors. labels Mar 22, 2023
@kim-em kim-em removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Mar 24, 2023
@kim-em
Copy link
Contributor

kim-em commented Mar 24, 2023

This PR/issue depends on:

Comment on lines 66 to 69
{ 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] }
Copy link
Member

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?

Comment on lines 152 to 156
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 }
Copy link
Member

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.

Copy link
Collaborator Author

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.

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.

Let's add these porting notes to indicate this is not quite in sync

@eric-wieser
Copy link
Member

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Mar 24, 2023
bors bot pushed a commit that referenced this pull request Mar 24, 2023
Match leanprover-community/mathlib3#18602



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

bors bot commented Mar 24, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: Missing opposite instances [Merged by Bors] - feat: Missing opposite instances Mar 24, 2023
@bors bors bot closed this Mar 24, 2023
@bors bors bot deleted the cast_opposite branch March 24, 2023 18:50
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). mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged ready-to-merge This PR has been sent to bors.

Projects

No open projects
Status: SHA added

Development

Successfully merging this pull request may close these issues.

4 participants