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
adding two lemmas about division #385
adding two lemmas about division #385
Conversation
The idea is that this is a simplification of the second hypothesis. In fact you could make it a biconditional with the other hypothesis instead, resulting in the slightly peculiar |
I'm fine with adding a biconditional in the opposite direction. |
Which do you mean? I think that it is better for |
I mean theorem dvd_add_iff_left {a b c : α} (h : a ∣ c) : a ∣ b ↔ a ∣ b + c
theorem dvd_add_iff_right {a b c : α} (h : a ∣ b) : a ∣ c ↔ a ∣ b + c And I also think the |
Oh yes, I agree with you there. |
Okay, I think this is saying we want lemmas
Unfortunately I don't understand the naming scheme well enough to name these. If someone wants to tell me one of the names, I can revise this PR. |
They should be |
But -- that's what they are already called in core. I thought we would need new names?! |
I don't think the core theorems require modification, the remark above is about the |
No, nothing is in mathlib. We have
in
in This leaves me pretty confused about what you and Johannes are suggesting! I guess my best guess is we should have
for both I'm not particularly confident I have my left and right correct here, nor that we really ought to change anything... |
These are very minor lemmas, and I don't know how they should be named, but I think they should be in.
These came up when I was trying to record a video demonstrating proving the infinitude of primes in Lean. (Essentially following the mathlib proof.)
It comes to the step where you know
p | fact N
andp | fact N + 1
, and you're trying to deducep | 1
. Without magically knowing that the relevant lemma isnat.dvd_add_iff_right
in core, I challenge you to explain to somehow to find that lemma!If we add these two lemmas, at least one can do the obvious thing:
#find _ ∣ _ → _ ∣ _ → _ ∣ _