This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
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.
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.
The instance is good but I don't see why you'd like to remove the theorem.
It's also tempting to add a
has_well_founded
instance but when I look into the surreal multiplication proof I see we're using(trans_gen $ cut_expand is_option)
as the well-founded relation ...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.
The
has_well_founded
instance is not needed, as there already exists an instanceis_well_founded α (has_well_founded α).r
.As for removing the theorem, I guess this is a matter of code style. It seems like the pattern throughout Mathlib is to prefer bundled predicates like these, e.g. using
is_irrefl
instead ofirreflexive
, etc. We get many convenient instances this way - for instance,is_well_founded _ (trans_gen $ cut_expand is_option)
could be inferred entirely automatically. So I don't see the need for having both the theorem and the instance.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.
It's telling that we're using
well_founded.is_irrefl
, which turns the non-instancewell_founded
into an instanceis_well_founded
.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.
Should we change well_founded.trans_gen to instance at the same time? Anyway it looks like you can't have any PRs merged before you port all your PRs ...