-
Notifications
You must be signed in to change notification settings - Fork 343
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(NumberTheory): Rayleigh's theorem #7027
Conversation
We have Real.IsConjugateExponent. IMHO, should be used here. |
Done. I also added |
Would it be nicer to first prove the generalization here (https://en.wikipedia.org/wiki/Beatty_sequence#Generalizations) involving floor and ceiling - 1? That way you don't have to bother with positivity and irrationality until the end. |
Why not use
|
I made this change and the proof became shorter. I also slightly golfed your proof of I don't think |
Mathlib/NumberTheory/Rayleigh.lean
Outdated
/-- Generalization of Rayleigh's theorem on Beatty sequences. Let `r` be a real number greater | ||
than 1, and `1/r + 1/s = 1`. Then every positive integer is in exactly one of `B⁺_r` or `B⁺'_s`. -/ | ||
theorem rayleigh_pos {r s : ℝ} (hrs : r.IsConjugateExponent s) : | ||
∀ {j : ℤ}, j > 0 → |
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.
Is there not a version of this theorem for beattySet
/beattySet'
?
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.
Yes, rayleigh_compl
is a version for all integers. I included rayleigh_pos
because it wasn't that easy to restrict rayleigh_compl
to the positive integers.
Edit: rayleigh_compl
was renamed to compl_beattySeq
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.
Can you ensure that every statement is available both under name
for the "all of Int
" version and name_pos
for the > 0
version?
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 think there's still a few golfing opportunities, but I'm mostly happy with it now!
maintainer merge
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
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.
Thanks 🎉
bors merge
Pull request successfully merged into master. Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
This is a theorem from #6091