This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
feat(order/well_founded): well_founded_lt.has_min
, etc.
#18751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We add some boilerplate code for porting
well_founded.has_min
to the typeclassesis_well_founded
,well_founded_lt
, andwell_founded_gt
.Besides the usual convenience from using instances, there's two advantages of doing this:
well_founded_gt
no longer have their names backwards (min
instead ofmax
)well_founded_lt.min_le
andwell_founded_gt.le_max
in linear ordersSpeaking of boilerplate, I'm not even sure we should keep
well_founded.min
and the like. In a proof, it's always better to useobtain ⟨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