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] - chore(analysis/special_functions/trigonometric): review, golf #5392
Conversation
urkud
commented
Dec 16, 2020
@@ -1068,15 +1067,16 @@ lemma cos_eq_one_iff (x : ℝ) : cos x = 1 ↔ ∃ n : ℤ, (n : ℝ) * (2 * π) | |||
exact absurd h (by norm_num))⟩, | |||
λ ⟨n, hn⟩, hn ▸ cos_int_mul_two_pi _⟩ | |||
|
|||
lemma cos_eq_one_iff_of_lt_of_lt {x : ℝ} (hx₁ : -(2 * π) < x) (hx₂ : x < 2 * π) : cos x = 1 ↔ x = 0 := | |||
⟨λ h, let ⟨n, hn⟩ := (cos_eq_one_iff x).1 h in | |||
lemma cos_eq_one_iff_of_lt_of_lt {x : ℝ} (hx₁ : -(2 * π) < x) (hx₂ : x < 2 * π) : |
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 this one worth stating in terms of Ioo
too?
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.
Do we often have x ∈ Ioo (-(2 * π)) (2 * π)
as an assumption?
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.
No, but presumably if there's an assumption about a smaller range then there is api to expand it to this larger one?
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.
There is set.Ioo_subset_Ioo
, but I'm not sure it's so useful, because checking that an interval is contained in another interval itself reduces to checking inequalities. We can leave it for now, and add variants for specific numeric intervals if anyone ever uses this fact there.
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 looks good to me, @eric-wieser are you happy to leave out the variant lemma?
I don't really care, just curious if someone else did |
bors r+ |
Pull request successfully merged into master. Build succeeded: |