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

feat(order/well_founded): well_founded_lt.has_min, etc. #18751

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

vihdzp
Copy link
Collaborator

@vihdzp vihdzp commented Apr 6, 2023

We add some boilerplate code for porting well_founded.has_min to the typeclasses is_well_founded, well_founded_lt, and well_founded_gt.

Besides the usual convenience from using instances, there's two advantages of doing this:

  • the lemmas for well_founded_gt no longer have their names backwards (min instead of max)
  • we're able to directly state well_founded_lt.min_le and well_founded_gt.le_max in linear orders

Speaking of boilerplate, I'm not even sure we should keep well_founded.min and the like. In a proof, it's always better to use

obtain ⟨s, hs, hlt⟩ := well_founded.has_min s hns

and outside of it, I can't see much use for having a generic minimal element, unless you're already working in a linear order, in which case you can use Inf instead.

Zulip discussion: https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/well_founded.2Emin/near/347492784

Open in Gitpod

@vihdzp vihdzp added the awaiting-review The author would like community review of the PR label Apr 6, 2023
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Apr 6, 2023
@mathlib-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@vihdzp vihdzp marked this pull request as draft April 9, 2023 15:58
@semorrison semorrison added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review The author would like community review of the PR blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants