-
Notifications
You must be signed in to change notification settings - Fork 297
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/mul_ind): multiplicative induction principles #8514
Conversation
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.
Interestingly, I just proved induction_on_coprime
for unique factorization domains. But you can't in good faith return data from that one, since factorization in UFDs is only unique up to units, so I think these recursion principles on ℕ are useful.
Although you might want to generalize to UFD + normalization_domain
if you have some time left over... :P
src/data/nat/mul_ind.lean
Outdated
instance fact.min_fac_prime (n : ℕ) : fact (prime (n + 2).min_fac) := | ||
⟨min_fac_prime $ succ_succ_ne_one n⟩ | ||
|
||
-- also not sure where these two should be |
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.
Would the div
section of data.nat.basic
work for this one, or is that too early?
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.
woo! I found both sides of the implication there so less code ^^
Thanks Anne! As soon as I get a spare bit I'll try see if I can generalize this, I didn't know about |
Well, you can try, but if it turns out to be a huge pile of work, please don't spend too much time!
My approach was to first show the result for a |
I tried a little with |
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.
I still can't think of a good alternative name for rec_on_coprime'
, so I made a Zulip thread.
LGTM otherwise.
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
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.
I agree with @eric-wieser's suggestions in the Zulip thread. LGTM otherwise, so:
bors d+
✌️ ericrbg can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r+ |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Eric <37984851+ericrbg@users.noreply.github.com>
Pull request successfully merged into master. Build succeeded: |
Co-authored-by: Eric Wieser wieser.eric@gmail.com
whilst writing up the docstring, I realised that the question of uniqueness never really came to mind, which is probably important as these are
Sort*
valued, instead of justProp
.