-
Notifications
You must be signed in to change notification settings - Fork 298
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(analysis/special_functions/trigonometric): Added lemmas for deriv of tan #3746
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.
LGTM
I don't understand at all why you have this assumption of non-vanishing cosine everywhere. Why not lemma has_deriv_at_tan {x:ℝ} (h : ∀ k : ℤ, x ≠ (2 * k + 1) * pi / 2) : has_deriv_at tan (1 / (cos x)^2) x :=
begin
rw [← cos_ne_zero_iff, ← complex.of_real_ne_zero, complex.of_real_cos] at h,
convert has_deriv_at_real_of_complex (complex.has_deriv_at_tan h),
rw ← complex.of_real_re (1/((cos x)^2)),
simp,
end Even better would be to take the time to do |
I made the changes that Patrick requested regarding the assumption in my lemmas, both in |
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.
Could you please make sure all lines are at most 100+epsilon columns long?
lemma differentiable_at_tan_of_mem_Ioo {x:ℝ} (h : x ∈ set.Ioo (-(π/2):ℝ) (π/2)) : differentiable_at ℝ tan x := | ||
(has_deriv_at_tan_of_mem_Ioo h).differentiable_at | ||
|
||
lemma deriv_tan_of_mem_Ioo {x:ℝ} (h : x ∈ set.Ioo (-(π/2):ℝ) (π/2)) : deriv tan x = 1 / (cos 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.
This lemma doesn't need assumption h
.
lemma differentiable_at_tan {x:ℂ} (h : ∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) : differentiable_at ℂ tan x := | ||
(has_deriv_at_tan h).differentiable_at | ||
|
||
lemma deriv_tan {x:ℂ} (h : ∀ k : ℤ, x ≠ (2 * k + 1) * π / 2): deriv tan x = 1 / (cos 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.
This lemma doesn't need assumption h
(both sides of the equality vanish when x = (2 * k + 1) * π / 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.
I tried to accomplish this and I managed to do it in part, but I think that there is not yet the infrastructure in mathlib supporting ¬differentiable_at
for me to be able to complete the proof.
I think this is substantiated by the fact that the lemma deriv_inv
uses the assumption x≠0
, presumably for this very reason.
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.
Ok, I'll fix this later. Thanks for your work on this PR!
bors merge
👎 Rejected by label |
bors merge |
…v of tan (#3746) I added lemmas for the derivative of the tangent function in both the complex and real namespaces. I also corrected two typos in comment lines. <!-- put comments you want to keep out of the PR commit here -->
Pull request successfully merged into master. Build succeeded: |
I added lemmas for the derivative of the tangent function in both the complex and real namespaces. I also corrected two typos in comment lines.