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.
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(data/nat/digits): add
last_digit_ne_zero
#3544[Merged by Bors] - feat(data/nat/digits): add
last_digit_ne_zero
#3544Changes from 2 commits
7f133cb
f165b50
0ce68fa
b33fb87
4358016
f1588ee
3a3269a
93789fc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This lemma would be more convenient if you remove the argument
p
and explicitly prove it usingdigits_ne_nil_iff_ne_zero.mpr hm
.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.
To be honest that was my first approach to use
digits_ne_nil_iff_ne_zero.mpr hm
. I really struggled to getnat.strong_induction_on
to work with it, hence I've generalized over the proof. (see the use ofrevert p
in the proof). There might be a better approach but this is the best I could come up with.I can mark this as
private
and add in a lemma with the proof provided, would that be ok? So change this toprivate lemma last_digit_ne_zero_aux
and addThere 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.
I've done the above. So marked this one as
private lemma last_digit_ne_zero_aux
and then added another lemma that fills in the proof.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.
That works. Another option was to use as first tactic
generalize : digits_ne_nil_iff_ne_zero.mpr hm = p,