Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8f7ffec

Browse files
committed
chore(analysis/special_functions/trigonometric/inverse): move results about derivatives to a new file (#10110)
This is part of a refactor of the `analysis/special_functions` folder, in which I will isolate all lemmas about derivatives. The result will be a definition of Lp spaces that does not import derivatives. Co-authored-by: RemyDegenne <remydegenne@gmail.com>
1 parent 00a1022 commit 8f7ffec

File tree

5 files changed

+193
-158
lines changed

5 files changed

+193
-158
lines changed

src/analysis/special_functions/complex/log.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin
55
-/
66
import analysis.special_functions.complex.arg
77
import analysis.special_functions.log
8+
import analysis.special_functions.trigonometric.inverse_deriv
89

910
/-!
1011
# The complex `log` function

src/analysis/special_functions/trigonometric/inverse.lean

Lines changed: 4 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ Copyright (c) 2018 Chris Hughes. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson
55
-/
6-
import analysis.special_functions.trigonometric.deriv
6+
import analysis.special_functions.trigonometric.basic
7+
import topology.algebra.ordered.proj_Icc
8+
79

810
/-!
911
# Inverse trigonometric functions.
1012
1113
See also `analysis.special_functions.trigonometric.arctan` for the inverse tan function.
1214
(This is delayed as it is easier to set up after developing complex trigonometric functions.)
1315
14-
Basic inequalities and derivatives.
16+
Basic inequalities on trigonometric functions.
1517
-/
1618

1719
noncomputable theory
@@ -227,112 +229,6 @@ begin
227229
rw [this, sin_arcsin hx₁ hx₂],
228230
end
229231

230-
lemma deriv_arcsin_aux {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
231-
has_strict_deriv_at arcsin (1 / sqrt (1 - x ^ 2)) x ∧ times_cont_diff_at ℝ ⊤ arcsin x :=
232-
begin
233-
cases h₁.lt_or_lt with h₁ h₁,
234-
{ have : 1 - x ^ 2 < 0, by nlinarith [h₁],
235-
rw [sqrt_eq_zero'.2 this.le, div_zero],
236-
have : arcsin =ᶠ[𝓝 x] λ _, -(π / 2) :=
237-
(gt_mem_nhds h₁).mono (λ y hy, arcsin_of_le_neg_one hy.le),
238-
exact ⟨(has_strict_deriv_at_const _ _).congr_of_eventually_eq this.symm,
239-
times_cont_diff_at_const.congr_of_eventually_eq this⟩ },
240-
cases h₂.lt_or_lt with h₂ h₂,
241-
{ have : 0 < sqrt (1 - x ^ 2) := sqrt_pos.2 (by nlinarith [h₁, h₂]),
242-
simp only [← cos_arcsin h₁.le h₂.le, one_div] at this ⊢,
243-
exact ⟨sin_local_homeomorph.has_strict_deriv_at_symm ⟨h₁, h₂⟩ this.ne'
244-
(has_strict_deriv_at_sin _),
245-
sin_local_homeomorph.times_cont_diff_at_symm_deriv this.ne' ⟨h₁, h₂⟩
246-
(has_deriv_at_sin _) times_cont_diff_sin.times_cont_diff_at⟩ },
247-
{ have : 1 - x ^ 2 < 0, by nlinarith [h₂],
248-
rw [sqrt_eq_zero'.2 this.le, div_zero],
249-
have : arcsin =ᶠ[𝓝 x] λ _, π / 2 := (lt_mem_nhds h₂).mono (λ y hy, arcsin_of_one_le hy.le),
250-
exact ⟨(has_strict_deriv_at_const _ _).congr_of_eventually_eq this.symm,
251-
times_cont_diff_at_const.congr_of_eventually_eq this⟩ }
252-
end
253-
254-
lemma has_strict_deriv_at_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
255-
has_strict_deriv_at arcsin (1 / sqrt (1 - x ^ 2)) x :=
256-
(deriv_arcsin_aux h₁ h₂).1
257-
258-
lemma has_deriv_at_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
259-
has_deriv_at arcsin (1 / sqrt (1 - x ^ 2)) x :=
260-
(has_strict_deriv_at_arcsin h₁ h₂).has_deriv_at
261-
262-
lemma times_cont_diff_at_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) {n : with_top ℕ} :
263-
times_cont_diff_at ℝ n arcsin x :=
264-
(deriv_arcsin_aux h₁ h₂).2.of_le le_top
265-
266-
lemma has_deriv_within_at_arcsin_Ici {x : ℝ} (h : x ≠ -1) :
267-
has_deriv_within_at arcsin (1 / sqrt (1 - x ^ 2)) (Ici x) x :=
268-
begin
269-
rcases em (x = 1) with (rfl|h'),
270-
{ convert (has_deriv_within_at_const _ _ (π / 2)).congr _ _;
271-
simp [arcsin_of_one_le] { contextual := tt } },
272-
{ exact (has_deriv_at_arcsin h h').has_deriv_within_at }
273-
end
274-
275-
lemma has_deriv_within_at_arcsin_Iic {x : ℝ} (h : x ≠ 1) :
276-
has_deriv_within_at arcsin (1 / sqrt (1 - x ^ 2)) (Iic x) x :=
277-
begin
278-
rcases em (x = -1) with (rfl|h'),
279-
{ convert (has_deriv_within_at_const _ _ (-(π / 2))).congr _ _;
280-
simp [arcsin_of_le_neg_one] { contextual := tt } },
281-
{ exact (has_deriv_at_arcsin h' h).has_deriv_within_at }
282-
end
283-
284-
lemma differentiable_within_at_arcsin_Ici {x : ℝ} :
285-
differentiable_within_at ℝ arcsin (Ici x) x ↔ x ≠ -1 :=
286-
begin
287-
refine ⟨_, λ h, (has_deriv_within_at_arcsin_Ici h).differentiable_within_at⟩,
288-
rintro h rfl,
289-
have : sin ∘ arcsin =ᶠ[𝓝[Ici (-1:ℝ)] (-1)] id,
290-
{ filter_upwards [Icc_mem_nhds_within_Ici ⟨le_rfl, neg_lt_self (@zero_lt_one ℝ _ _)⟩],
291-
exact λ x, sin_arcsin' },
292-
have := h.has_deriv_within_at.sin.congr_of_eventually_eq this.symm (by simp),
293-
simpa using (unique_diff_on_Ici _ _ left_mem_Ici).eq_deriv _ this (has_deriv_within_at_id _ _)
294-
end
295-
296-
lemma differentiable_within_at_arcsin_Iic {x : ℝ} :
297-
differentiable_within_at ℝ arcsin (Iic x) x ↔ x ≠ 1 :=
298-
begin
299-
refine ⟨λ h, _, λ h, (has_deriv_within_at_arcsin_Iic h).differentiable_within_at⟩,
300-
rw [← neg_neg x, ← image_neg_Ici] at h,
301-
have := (h.comp (-x) differentiable_within_at_id.neg (maps_to_image _ _)).neg,
302-
simpa [(∘), differentiable_within_at_arcsin_Ici] using this
303-
end
304-
305-
lemma differentiable_at_arcsin {x : ℝ} :
306-
differentiable_at ℝ arcsin x ↔ x ≠ -1 ∧ x ≠ 1 :=
307-
⟨λ h, ⟨differentiable_within_at_arcsin_Ici.1 h.differentiable_within_at,
308-
differentiable_within_at_arcsin_Iic.1 h.differentiable_within_at⟩,
309-
λ h, (has_deriv_at_arcsin h.1 h.2).differentiable_at⟩
310-
311-
@[simp] lemma deriv_arcsin : deriv arcsin = λ x, 1 / sqrt (1 - x ^ 2) :=
312-
begin
313-
funext x,
314-
by_cases h : x ≠ -1 ∧ x ≠ 1,
315-
{ exact (has_deriv_at_arcsin h.1 h.2).deriv },
316-
{ rw [deriv_zero_of_not_differentiable_at (mt differentiable_at_arcsin.1 h)],
317-
simp only [not_and_distrib, ne.def, not_not] at h,
318-
rcases h with (rfl|rfl); simp }
319-
end
320-
321-
lemma differentiable_on_arcsin : differentiable_on ℝ arcsin {-1, 1}ᶜ :=
322-
λ x hx, (differentiable_at_arcsin.2
323-
⟨λ h, hx (or.inl h), λ h, hx (or.inr h)⟩).differentiable_within_at
324-
325-
lemma times_cont_diff_on_arcsin {n : with_top ℕ} :
326-
times_cont_diff_on ℝ n arcsin {-1, 1}ᶜ :=
327-
λ x hx, (times_cont_diff_at_arcsin (mt or.inl hx) (mt or.inr hx)).times_cont_diff_within_at
328-
329-
lemma times_cont_diff_at_arcsin_iff {x : ℝ} {n : with_top ℕ} :
330-
times_cont_diff_at ℝ n arcsin x ↔ n = 0 ∨ (x ≠ -1 ∧ x ≠ 1) :=
331-
⟨λ h, or_iff_not_imp_left.2 $ λ hn, differentiable_at_arcsin.1 $ h.differentiable_at $
332-
with_top.one_le_iff_pos.2 (pos_iff_ne_zero.2 hn),
333-
λ h, h.elim (λ hn, hn.symm ▸ (times_cont_diff_zero.2 continuous_arcsin).times_cont_diff_at) $
334-
λ hx, times_cont_diff_at_arcsin hx.1 hx.2
335-
336232
/-- Inverse of the `cos` function, returns values in the range `0 ≤ arccos x` and `arccos x ≤ π`.
337233
If the argument is not between `-1` and `1` it defaults to `π / 2` -/
338234
@[pp_nodot] noncomputable def arccos (x : ℝ) : ℝ :=
@@ -388,51 +284,4 @@ by rw [arccos_eq_pi_div_two_sub_arcsin, sin_pi_div_two_sub, cos_arcsin hx₁ hx
388284
@[continuity]
389285
lemma continuous_arccos : continuous arccos := continuous_const.sub continuous_arcsin
390286

391-
lemma has_strict_deriv_at_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
392-
has_strict_deriv_at arccos (-(1 / sqrt (1 - x ^ 2))) x :=
393-
(has_strict_deriv_at_arcsin h₁ h₂).const_sub (π / 2)
394-
395-
lemma has_deriv_at_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
396-
has_deriv_at arccos (-(1 / sqrt (1 - x ^ 2))) x :=
397-
(has_deriv_at_arcsin h₁ h₂).const_sub (π / 2)
398-
399-
lemma times_cont_diff_at_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) {n : with_top ℕ} :
400-
times_cont_diff_at ℝ n arccos x :=
401-
times_cont_diff_at_const.sub (times_cont_diff_at_arcsin h₁ h₂)
402-
403-
lemma has_deriv_within_at_arccos_Ici {x : ℝ} (h : x ≠ -1) :
404-
has_deriv_within_at arccos (-(1 / sqrt (1 - x ^ 2))) (Ici x) x :=
405-
(has_deriv_within_at_arcsin_Ici h).const_sub _
406-
407-
lemma has_deriv_within_at_arccos_Iic {x : ℝ} (h : x ≠ 1) :
408-
has_deriv_within_at arccos (-(1 / sqrt (1 - x ^ 2))) (Iic x) x :=
409-
(has_deriv_within_at_arcsin_Iic h).const_sub _
410-
411-
lemma differentiable_within_at_arccos_Ici {x : ℝ} :
412-
differentiable_within_at ℝ arccos (Ici x) x ↔ x ≠ -1 :=
413-
(differentiable_within_at_const_sub_iff _).trans differentiable_within_at_arcsin_Ici
414-
415-
lemma differentiable_within_at_arccos_Iic {x : ℝ} :
416-
differentiable_within_at ℝ arccos (Iic x) x ↔ x ≠ 1 :=
417-
(differentiable_within_at_const_sub_iff _).trans differentiable_within_at_arcsin_Iic
418-
419-
lemma differentiable_at_arccos {x : ℝ} :
420-
differentiable_at ℝ arccos x ↔ x ≠ -1 ∧ x ≠ 1 :=
421-
(differentiable_at_const_sub_iff _).trans differentiable_at_arcsin
422-
423-
@[simp] lemma deriv_arccos : deriv arccos = λ x, -(1 / sqrt (1 - x ^ 2)) :=
424-
funext $ λ x, (deriv_const_sub _).trans $ by simp only [deriv_arcsin]
425-
426-
lemma differentiable_on_arccos : differentiable_on ℝ arccos {-1, 1}ᶜ :=
427-
differentiable_on_arcsin.const_sub _
428-
429-
lemma times_cont_diff_on_arccos {n : with_top ℕ} :
430-
times_cont_diff_on ℝ n arccos {-1, 1}ᶜ :=
431-
times_cont_diff_on_const.sub times_cont_diff_on_arcsin
432-
433-
lemma times_cont_diff_at_arccos_iff {x : ℝ} {n : with_top ℕ} :
434-
times_cont_diff_at ℝ n arccos x ↔ n = 0 ∨ (x ≠ -1 ∧ x ≠ 1) :=
435-
by refine iff.trans ⟨λ h, _, λ h, _⟩ times_cont_diff_at_arcsin_iff;
436-
simpa [arccos] using (@times_cont_diff_at_const _ _ _ _ _ _ _ _ _ _ (π / 2)).sub h
437-
438287
end real
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
/-
2+
Copyright (c) 2018 Chris Hughes. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson
5+
-/
6+
import analysis.special_functions.trigonometric.inverse
7+
import analysis.special_functions.trigonometric.deriv
8+
9+
/-!
10+
# derivatives of the inverse trigonometric functions
11+
12+
Derivatives of `arcsin` and `arccos`.
13+
-/
14+
15+
noncomputable theory
16+
open_locale classical topological_space filter
17+
open set filter
18+
19+
open_locale real
20+
21+
namespace real
22+
23+
section arcsin
24+
25+
lemma deriv_arcsin_aux {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
26+
has_strict_deriv_at arcsin (1 / sqrt (1 - x ^ 2)) x ∧ times_cont_diff_at ℝ ⊤ arcsin x :=
27+
begin
28+
cases h₁.lt_or_lt with h₁ h₁,
29+
{ have : 1 - x ^ 2 < 0, by nlinarith [h₁],
30+
rw [sqrt_eq_zero'.2 this.le, div_zero],
31+
have : arcsin =ᶠ[𝓝 x] λ _, -(π / 2) :=
32+
(gt_mem_nhds h₁).mono (λ y hy, arcsin_of_le_neg_one hy.le),
33+
exact ⟨(has_strict_deriv_at_const _ _).congr_of_eventually_eq this.symm,
34+
times_cont_diff_at_const.congr_of_eventually_eq this⟩ },
35+
cases h₂.lt_or_lt with h₂ h₂,
36+
{ have : 0 < sqrt (1 - x ^ 2) := sqrt_pos.2 (by nlinarith [h₁, h₂]),
37+
simp only [← cos_arcsin h₁.le h₂.le, one_div] at this ⊢,
38+
exact ⟨sin_local_homeomorph.has_strict_deriv_at_symm ⟨h₁, h₂⟩ this.ne'
39+
(has_strict_deriv_at_sin _),
40+
sin_local_homeomorph.times_cont_diff_at_symm_deriv this.ne' ⟨h₁, h₂⟩
41+
(has_deriv_at_sin _) times_cont_diff_sin.times_cont_diff_at⟩ },
42+
{ have : 1 - x ^ 2 < 0, by nlinarith [h₂],
43+
rw [sqrt_eq_zero'.2 this.le, div_zero],
44+
have : arcsin =ᶠ[𝓝 x] λ _, π / 2 := (lt_mem_nhds h₂).mono (λ y hy, arcsin_of_one_le hy.le),
45+
exact ⟨(has_strict_deriv_at_const _ _).congr_of_eventually_eq this.symm,
46+
times_cont_diff_at_const.congr_of_eventually_eq this⟩ }
47+
end
48+
49+
lemma has_strict_deriv_at_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
50+
has_strict_deriv_at arcsin (1 / sqrt (1 - x ^ 2)) x :=
51+
(deriv_arcsin_aux h₁ h₂).1
52+
53+
lemma has_deriv_at_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
54+
has_deriv_at arcsin (1 / sqrt (1 - x ^ 2)) x :=
55+
(has_strict_deriv_at_arcsin h₁ h₂).has_deriv_at
56+
57+
lemma times_cont_diff_at_arcsin {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) {n : with_top ℕ} :
58+
times_cont_diff_at ℝ n arcsin x :=
59+
(deriv_arcsin_aux h₁ h₂).2.of_le le_top
60+
61+
lemma has_deriv_within_at_arcsin_Ici {x : ℝ} (h : x ≠ -1) :
62+
has_deriv_within_at arcsin (1 / sqrt (1 - x ^ 2)) (Ici x) x :=
63+
begin
64+
rcases em (x = 1) with (rfl|h'),
65+
{ convert (has_deriv_within_at_const _ _ (π / 2)).congr _ _;
66+
simp [arcsin_of_one_le] { contextual := tt } },
67+
{ exact (has_deriv_at_arcsin h h').has_deriv_within_at }
68+
end
69+
70+
lemma has_deriv_within_at_arcsin_Iic {x : ℝ} (h : x ≠ 1) :
71+
has_deriv_within_at arcsin (1 / sqrt (1 - x ^ 2)) (Iic x) x :=
72+
begin
73+
rcases em (x = -1) with (rfl|h'),
74+
{ convert (has_deriv_within_at_const _ _ (-(π / 2))).congr _ _;
75+
simp [arcsin_of_le_neg_one] { contextual := tt } },
76+
{ exact (has_deriv_at_arcsin h' h).has_deriv_within_at }
77+
end
78+
79+
lemma differentiable_within_at_arcsin_Ici {x : ℝ} :
80+
differentiable_within_at ℝ arcsin (Ici x) x ↔ x ≠ -1 :=
81+
begin
82+
refine ⟨_, λ h, (has_deriv_within_at_arcsin_Ici h).differentiable_within_at⟩,
83+
rintro h rfl,
84+
have : sin ∘ arcsin =ᶠ[𝓝[Ici (-1:ℝ)] (-1)] id,
85+
{ filter_upwards [Icc_mem_nhds_within_Ici ⟨le_rfl, neg_lt_self (@zero_lt_one ℝ _ _)⟩],
86+
exact λ x, sin_arcsin' },
87+
have := h.has_deriv_within_at.sin.congr_of_eventually_eq this.symm (by simp),
88+
simpa using (unique_diff_on_Ici _ _ left_mem_Ici).eq_deriv _ this (has_deriv_within_at_id _ _)
89+
end
90+
91+
lemma differentiable_within_at_arcsin_Iic {x : ℝ} :
92+
differentiable_within_at ℝ arcsin (Iic x) x ↔ x ≠ 1 :=
93+
begin
94+
refine ⟨λ h, _, λ h, (has_deriv_within_at_arcsin_Iic h).differentiable_within_at⟩,
95+
rw [← neg_neg x, ← image_neg_Ici] at h,
96+
have := (h.comp (-x) differentiable_within_at_id.neg (maps_to_image _ _)).neg,
97+
simpa [(∘), differentiable_within_at_arcsin_Ici] using this
98+
end
99+
100+
lemma differentiable_at_arcsin {x : ℝ} :
101+
differentiable_at ℝ arcsin x ↔ x ≠ -1 ∧ x ≠ 1 :=
102+
⟨λ h, ⟨differentiable_within_at_arcsin_Ici.1 h.differentiable_within_at,
103+
differentiable_within_at_arcsin_Iic.1 h.differentiable_within_at⟩,
104+
λ h, (has_deriv_at_arcsin h.1 h.2).differentiable_at⟩
105+
106+
@[simp] lemma deriv_arcsin : deriv arcsin = λ x, 1 / sqrt (1 - x ^ 2) :=
107+
begin
108+
funext x,
109+
by_cases h : x ≠ -1 ∧ x ≠ 1,
110+
{ exact (has_deriv_at_arcsin h.1 h.2).deriv },
111+
{ rw [deriv_zero_of_not_differentiable_at (mt differentiable_at_arcsin.1 h)],
112+
simp only [not_and_distrib, ne.def, not_not] at h,
113+
rcases h with (rfl|rfl); simp }
114+
end
115+
116+
lemma differentiable_on_arcsin : differentiable_on ℝ arcsin {-1, 1}ᶜ :=
117+
λ x hx, (differentiable_at_arcsin.2
118+
⟨λ h, hx (or.inl h), λ h, hx (or.inr h)⟩).differentiable_within_at
119+
120+
lemma times_cont_diff_on_arcsin {n : with_top ℕ} :
121+
times_cont_diff_on ℝ n arcsin {-1, 1}ᶜ :=
122+
λ x hx, (times_cont_diff_at_arcsin (mt or.inl hx) (mt or.inr hx)).times_cont_diff_within_at
123+
124+
lemma times_cont_diff_at_arcsin_iff {x : ℝ} {n : with_top ℕ} :
125+
times_cont_diff_at ℝ n arcsin x ↔ n = 0 ∨ (x ≠ -1 ∧ x ≠ 1) :=
126+
⟨λ h, or_iff_not_imp_left.2 $ λ hn, differentiable_at_arcsin.1 $ h.differentiable_at $
127+
with_top.one_le_iff_pos.2 (pos_iff_ne_zero.2 hn),
128+
λ h, h.elim (λ hn, hn.symm ▸ (times_cont_diff_zero.2 continuous_arcsin).times_cont_diff_at) $
129+
λ hx, times_cont_diff_at_arcsin hx.1 hx.2
130+
131+
end arcsin
132+
133+
section arccos
134+
135+
lemma has_strict_deriv_at_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
136+
has_strict_deriv_at arccos (-(1 / sqrt (1 - x ^ 2))) x :=
137+
(has_strict_deriv_at_arcsin h₁ h₂).const_sub (π / 2)
138+
139+
lemma has_deriv_at_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) :
140+
has_deriv_at arccos (-(1 / sqrt (1 - x ^ 2))) x :=
141+
(has_deriv_at_arcsin h₁ h₂).const_sub (π / 2)
142+
143+
lemma times_cont_diff_at_arccos {x : ℝ} (h₁ : x ≠ -1) (h₂ : x ≠ 1) {n : with_top ℕ} :
144+
times_cont_diff_at ℝ n arccos x :=
145+
times_cont_diff_at_const.sub (times_cont_diff_at_arcsin h₁ h₂)
146+
147+
lemma has_deriv_within_at_arccos_Ici {x : ℝ} (h : x ≠ -1) :
148+
has_deriv_within_at arccos (-(1 / sqrt (1 - x ^ 2))) (Ici x) x :=
149+
(has_deriv_within_at_arcsin_Ici h).const_sub _
150+
151+
lemma has_deriv_within_at_arccos_Iic {x : ℝ} (h : x ≠ 1) :
152+
has_deriv_within_at arccos (-(1 / sqrt (1 - x ^ 2))) (Iic x) x :=
153+
(has_deriv_within_at_arcsin_Iic h).const_sub _
154+
155+
lemma differentiable_within_at_arccos_Ici {x : ℝ} :
156+
differentiable_within_at ℝ arccos (Ici x) x ↔ x ≠ -1 :=
157+
(differentiable_within_at_const_sub_iff _).trans differentiable_within_at_arcsin_Ici
158+
159+
lemma differentiable_within_at_arccos_Iic {x : ℝ} :
160+
differentiable_within_at ℝ arccos (Iic x) x ↔ x ≠ 1 :=
161+
(differentiable_within_at_const_sub_iff _).trans differentiable_within_at_arcsin_Iic
162+
163+
lemma differentiable_at_arccos {x : ℝ} :
164+
differentiable_at ℝ arccos x ↔ x ≠ -1 ∧ x ≠ 1 :=
165+
(differentiable_at_const_sub_iff _).trans differentiable_at_arcsin
166+
167+
@[simp] lemma deriv_arccos : deriv arccos = λ x, -(1 / sqrt (1 - x ^ 2)) :=
168+
funext $ λ x, (deriv_const_sub _).trans $ by simp only [deriv_arcsin]
169+
170+
lemma differentiable_on_arccos : differentiable_on ℝ arccos {-1, 1}ᶜ :=
171+
differentiable_on_arcsin.const_sub _
172+
173+
lemma times_cont_diff_on_arccos {n : with_top ℕ} :
174+
times_cont_diff_on ℝ n arccos {-1, 1}ᶜ :=
175+
times_cont_diff_on_const.sub times_cont_diff_on_arcsin
176+
177+
lemma times_cont_diff_at_arccos_iff {x : ℝ} {n : with_top ℕ} :
178+
times_cont_diff_at ℝ n arccos x ↔ n = 0 ∨ (x ≠ -1 ∧ x ≠ 1) :=
179+
by refine iff.trans ⟨λ h, _, λ h, _⟩ times_cont_diff_at_arcsin_iff;
180+
simpa [arccos] using (@times_cont_diff_at_const _ _ _ _ _ _ _ _ _ _ (π / 2)).sub h
181+
182+
end arccos
183+
184+
end real

src/data/complex/basic.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ instance : star_ring ℂ :=
198198
@[simp] lemma conj_re (z : ℂ) : (conj z).re = z.re := rfl
199199
@[simp] lemma conj_im (z : ℂ) : (conj z).im = -z.im := rfl
200200

201-
@[simp] lemma conj_of_real (r : ℝ) : conj (r : ℂ) = r := ext_iff.2 $ by simp [conj]
201+
lemma conj_of_real (r : ℝ) : conj (r : ℂ) = r := ext_iff.2 $ by simp [conj]
202202

203203
@[simp] lemma conj_I : conj I = -I := ext_iff.2 $ by simp
204204

205-
@[simp] lemma conj_bit0 (z : ℂ) : conj (bit0 z) = bit0 (conj z) := ext_iff.2 $ by simp [bit0]
206-
@[simp] lemma conj_bit1 (z : ℂ) : conj (bit1 z) = bit1 (conj z) := ext_iff.2 $ by simp [bit0]
205+
lemma conj_bit0 (z : ℂ) : conj (bit0 z) = bit0 (conj z) := ext_iff.2 $ by simp [bit0]
206+
lemma conj_bit1 (z : ℂ) : conj (bit1 z) = bit1 (conj z) := ext_iff.2 $ by simp [bit0]
207207

208208
@[simp] lemma conj_neg_I : conj (-I) = I := ext_iff.2 $ by simp
209209

0 commit comments

Comments
 (0)