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(order/rel_iso): well_founded (quotient.lift₂ r H) ↔ well_founded r #15890

Closed
wants to merge 9 commits into from

Conversation

vihdzp
Copy link
Collaborator

@vihdzp vihdzp commented Aug 6, 2022

@vihdzp vihdzp added easy < 20s of review time. See the lifecycle page for guidelines. awaiting-review The author would like community review of the PR labels Aug 6, 2022
@vihdzp vihdzp changed the title feat(order/well_founded): well_founded (quotient.lift₂ r H)well_founded r feat(order/well_founded): well_founded (quotient.lift₂ r H) → well_founded r Aug 6, 2022
@vihdzp vihdzp changed the title feat(order/well_founded): well_founded (quotient.lift₂ r H) → well_founded r feat(order/rel_iso): well_founded (quotient.lift₂ r H) ↔ well_founded r Aug 6, 2022
@vihdzp vihdzp added the t-order Order hierarchy label Aug 6, 2022
src/order/rel_iso.lean Outdated Show resolved Hide resolved
src/order/rel_iso.lean Outdated Show resolved Hide resolved
src/order/rel_iso.lean Outdated Show resolved Hide resolved
/-- A relation is well founded iff its lift to a quotient is. -/
@[simp] theorem _root_.well_founded_lift₂_iff [s : setoid α] {r : α → α → Prop}
(H : ∀ a₁ a₂ b₁ b₂ : α, a₁ ≈ b₁ → a₂ ≈ b₂ → r a₁ a₂ = r b₁ b₂) :
well_founded (quotient.lift₂ r H) ↔ well_founded r :=
Copy link
Member

Choose a reason for hiding this comment

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

You might want one for quotient.lift_on₂' r H too, which is trivial to prove.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

quotient.lift_on₂' is reducible and def-eq to quotient.lift_on₂, which itself is reducible and def-eq to quotient.lift₂. So I think just having this last version should be enough.

Copy link
Member

Choose a reason for hiding this comment

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

Can you verify that simp can prove the primed version by itself?

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 can. And now that I think about it, λ x y, quotient.lift_on₂' x y r H is a very awkward spelling for quotient.lift₂ r H, so I doubt this will come up in practice.

Copy link
Member

Choose a reason for hiding this comment

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

quotient.lift_on₂' is useful for when the setoid is not an instance, which is quite common. But if simp doesn't need the lemma about it here, then there's probably no issue.

src/order/rel_iso.lean Outdated Show resolved Hide resolved
@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 7, 2022
@vihdzp vihdzp added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 7, 2022
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 d+

src/logic/embedding.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Aug 7, 2022

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

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Aug 7, 2022
@vihdzp vihdzp added the awaiting-CI The author would like to see what CI has to say before doing more work. label Aug 7, 2022
bors bot pushed a commit that referenced this pull request Aug 8, 2022
@eric-wieser
Copy link
Member

Did you mean to mark this as depending on itself?

@vihdzp
Copy link
Collaborator Author

vihdzp commented Aug 8, 2022

That was a mistake, fixed.

@mathlib-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Aug 8, 2022
@vihdzp
Copy link
Collaborator Author

vihdzp commented Aug 8, 2022

bors r+

@bors
Copy link

bors bot commented Aug 8, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(order/rel_iso): well_founded (quotient.lift₂ r H) ↔ well_founded r [Merged by Bors] - feat(order/rel_iso): well_founded (quotient.lift₂ r H) ↔ well_founded r Aug 8, 2022
@bors bors bot closed this Aug 8, 2022
@bors bors bot deleted the wf_of_quot branch August 8, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. easy < 20s of review time. See the lifecycle page for guidelines. t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants