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

Commit 28a360a

Browse files
committed
feat(analysis/calculus/deriv): prove deriv_inv at x = 0 as well (#8748)
* turn `differentiable_at_inv` and `differentiable_at_fpow` into `iff` lemmas; * slightly weaker assumptions for `differentiable_within_at_fpow` etc; * prove `deriv_inv` and `fderiv_inv` for all `x`; * prove formulas for iterated derivs of `x⁻¹` and `x ^ m`, `m : int`; * push `coe` in these formulas;
1 parent 1c60e61 commit 28a360a

File tree

3 files changed

+127
-89
lines changed

3 files changed

+127
-89
lines changed

src/algebra/big_operators/ring.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,22 @@ lemma prod_nat_cast (s : finset α) (f : α → ℕ) :
191191

192192
end comm_semiring
193193

194+
section comm_ring
195+
196+
variables {R : Type*} [comm_ring R]
197+
198+
lemma prod_range_cast_nat_sub (n k : ℕ) :
199+
∏ i in range k, (n - i : R) = (∏ i in range k, (n - i) : ℕ) :=
200+
begin
201+
rw prod_nat_cast,
202+
cases le_or_lt k n with hkn hnk,
203+
{ exact prod_congr rfl (λ i hi, (nat.cast_sub $ (mem_range.1 hi).le.trans hkn).symm) },
204+
{ rw ← mem_range at hnk,
205+
rw [prod_eq_zero hnk, prod_eq_zero hnk]; simp }
206+
end
207+
208+
end comm_ring
209+
194210
/-- A product over all subsets of `s ∪ {x}` is obtained by multiplying the product over all subsets
195211
of `s`, and over all subsets of `s` to which one adds `x`. -/
196212
@[to_additive]

src/analysis/calculus/deriv.lean

Lines changed: 84 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,26 +1365,32 @@ theorem has_deriv_within_at_inv (x_ne_zero : x ≠ 0) (s : set 𝕜) :
13651365
has_deriv_within_at (λx, x⁻¹) (-(x^2)⁻¹) s x :=
13661366
(has_deriv_at_inv x_ne_zero).has_deriv_within_at
13671367

1368-
lemma differentiable_at_inv (x_ne_zero : x ≠ 0) :
1369-
differentiable_at 𝕜 (λx, x⁻¹) x :=
1370-
(has_deriv_at_inv x_ne_zero).differentiable_at
1368+
lemma differentiable_at_inv :
1369+
differentiable_at 𝕜 (λx, x⁻¹) x ↔ x ≠ 0:=
1370+
⟨λ H, normed_field.continuous_at_inv.1 H.continuous_at,
1371+
λ H, (has_deriv_at_inv H).differentiable_at⟩
13711372

13721373
lemma differentiable_within_at_inv (x_ne_zero : x ≠ 0) :
13731374
differentiable_within_at 𝕜 (λx, x⁻¹) s x :=
1374-
(differentiable_at_inv x_ne_zero).differentiable_within_at
1375+
(differentiable_at_inv.2 x_ne_zero).differentiable_within_at
13751376

13761377
lemma differentiable_on_inv : differentiable_on 𝕜 (λx:𝕜, x⁻¹) {x | x ≠ 0} :=
13771378
λx hx, differentiable_within_at_inv hx
13781379

1379-
lemma deriv_inv (x_ne_zero : x ≠ 0) :
1380-
deriv (λx, x⁻¹) x = -(x^2)⁻¹ :=
1381-
(has_deriv_at_inv x_ne_zero).deriv
1380+
lemma deriv_inv : deriv (λx, x⁻¹) x = -(x^2)⁻¹ :=
1381+
begin
1382+
rcases eq_or_ne x 0 with rfl|hne,
1383+
{ simp [deriv_zero_of_not_differentiable_at (mt differentiable_at_inv.1 (not_not.2 rfl))] },
1384+
{ exact (has_deriv_at_inv hne).deriv }
1385+
end
1386+
1387+
@[simp] lemma deriv_inv' : deriv (λ x : 𝕜, x⁻¹) = λ x, -(x ^ 2)⁻¹ := funext (λ x, deriv_inv)
13821388

13831389
lemma deriv_within_inv (x_ne_zero : x ≠ 0) (hxs : unique_diff_within_at 𝕜 s x) :
13841390
deriv_within (λx, x⁻¹) s x = -(x^2)⁻¹ :=
13851391
begin
1386-
rw differentiable_at.deriv_within (differentiable_at_inv x_ne_zero) hxs,
1387-
exact deriv_inv x_ne_zero
1392+
rw differentiable_at.deriv_within (differentiable_at_inv.2 x_ne_zero) hxs,
1393+
exact deriv_inv
13881394
end
13891395

13901396
lemma has_fderiv_at_inv (x_ne_zero : x ≠ 0) :
@@ -1395,15 +1401,15 @@ lemma has_fderiv_within_at_inv (x_ne_zero : x ≠ 0) :
13951401
has_fderiv_within_at (λx, x⁻¹) (smul_right (1 : 𝕜 →L[𝕜] 𝕜) (-(x^2)⁻¹) : 𝕜 →L[𝕜] 𝕜) s x :=
13961402
(has_fderiv_at_inv x_ne_zero).has_fderiv_within_at
13971403

1398-
lemma fderiv_inv (x_ne_zero : x ≠ 0) :
1404+
lemma fderiv_inv :
13991405
fderiv 𝕜 (λx, x⁻¹) x = smul_right (1 : 𝕜 →L[𝕜] 𝕜) (-(x^2)⁻¹) :=
1400-
(has_fderiv_at_inv x_ne_zero).fderiv
1406+
by rw [← deriv_fderiv, deriv_inv]
14011407

14021408
lemma fderiv_within_inv (x_ne_zero : x ≠ 0) (hxs : unique_diff_within_at 𝕜 s x) :
14031409
fderiv_within 𝕜 (λx, x⁻¹) s x = smul_right (1 : 𝕜 →L[𝕜] 𝕜) (-(x^2)⁻¹) :=
14041410
begin
1405-
rw differentiable_at.fderiv_within (differentiable_at_inv x_ne_zero) hxs,
1406-
exact fderiv_inv x_ne_zero
1411+
rw differentiable_at.fderiv_within (differentiable_at_inv.2 x_ne_zero) hxs,
1412+
exact fderiv_inv
14071413
end
14081414

14091415
variables {c : 𝕜 → 𝕜} {c' : 𝕜}
@@ -1444,7 +1450,7 @@ lemma deriv_within_inv' (hc : differentiable_within_at 𝕜 c s x) (hx : c x ≠
14441450
deriv_within (λx, (c x)⁻¹) s x = - (deriv_within c s x) / (c x)^2 :=
14451451
(hc.has_deriv_within_at.inv hx).deriv_within hxs
14461452

1447-
@[simp] lemma deriv_inv' (hc : differentiable_at 𝕜 c x) (hx : c x ≠ 0) :
1453+
@[simp] lemma deriv_inv'' (hc : differentiable_at 𝕜 c x) (hx : c x ≠ 0) :
14481454
deriv (λx, (c x)⁻¹) x = - (deriv c x) / (c x)^2 :=
14491455
(hc.has_deriv_at.inv hx).deriv
14501456

@@ -1732,21 +1738,6 @@ lemma deriv_within_pow (hxs : unique_diff_within_at 𝕜 s x) :
17321738
deriv_within (λx, x^n) s x = (n : 𝕜) * x^(n-1) :=
17331739
(has_deriv_within_at_pow n x s).deriv_within hxs
17341740

1735-
lemma iter_deriv_pow' {k : ℕ} :
1736-
deriv^[k] (λx:𝕜, x^n) = λ x, (∏ i in finset.range k, (n - i) : ℕ) * x^(n-k) :=
1737-
begin
1738-
induction k with k ihk,
1739-
{ simp only [one_mul, finset.prod_range_zero, function.iterate_zero_apply, nat.sub_zero,
1740-
nat.cast_one] },
1741-
{ simp only [function.iterate_succ_apply', ihk, finset.prod_range_succ],
1742-
ext x,
1743-
rw [((has_deriv_at_pow (n - k) x).const_mul _).deriv, nat.cast_mul, mul_assoc, nat.sub_sub] }
1744-
end
1745-
1746-
lemma iter_deriv_pow {k : ℕ} :
1747-
deriv^[k] (λx:𝕜, x^n) x = (∏ i in finset.range k, (n - i) : ℕ) * x^(n-k) :=
1748-
congr_fun iter_deriv_pow' x
1749-
17501741
lemma has_deriv_within_at.pow (hc : has_deriv_within_at c c' s x) :
17511742
has_deriv_within_at (λ y, (c y)^n) ((n : 𝕜) * (c x)^(n-1) * c') s x :=
17521743
(has_deriv_at_pow n (c x)).comp_has_deriv_within_at x hc
@@ -1784,10 +1775,9 @@ end pow
17841775

17851776
section fpow
17861777
/-! ### Derivative of `x ↦ x^m` for `m : ℤ` -/
1787-
variables {x : 𝕜} {s : set 𝕜}
1788-
variable {m : ℤ}
1778+
variables {x : 𝕜} {s : set 𝕜} {m : ℤ}
17891779

1790-
lemma has_strict_deriv_at_fpow (m : ℤ) (hx : x ≠ 0) :
1780+
lemma has_strict_deriv_at_fpow (m : ℤ) (x : 𝕜) (h : x ≠ 00 ≤ m) :
17911781
has_strict_deriv_at (λx, x^m) ((m : 𝕜) * x^(m-1)) x :=
17921782
begin
17931783
have : ∀ m : ℤ, 0 < m → has_strict_deriv_at (λx, x^m) ((m:𝕜) * x^(m-1)) x,
@@ -1799,7 +1789,8 @@ begin
17991789
norm_cast at hm,
18001790
exact nat.succ_le_of_lt hm },
18011791
rcases lt_trichotomy m 0 with hm|hm|hm,
1802-
{ have := (has_strict_deriv_at_inv _).scomp _ (this (-m) (neg_pos.2 hm));
1792+
{ have hx : x ≠ 0, from h.resolve_right hm.not_le,
1793+
have := (has_strict_deriv_at_inv _).scomp _ (this (-m) (neg_pos.2 hm));
18031794
[skip, exact fpow_ne_zero_of_ne_zero hx _],
18041795
simp only [(∘), fpow_neg, one_div, inv_inv', smul_eq_mul] at this,
18051796
convert this using 1,
@@ -1809,43 +1800,80 @@ begin
18091800
{ exact this m hm }
18101801
end
18111802

1812-
lemma has_deriv_at_fpow (m : ℤ) (hx : x ≠ 0) :
1803+
lemma has_deriv_at_fpow (m : ℤ) (x : 𝕜) (h : x ≠ 00 ≤ m) :
18131804
has_deriv_at (λx, x^m) ((m : 𝕜) * x^(m-1)) x :=
1814-
(has_strict_deriv_at_fpow m hx).has_deriv_at
1805+
(has_strict_deriv_at_fpow m x h).has_deriv_at
18151806

1816-
theorem has_deriv_within_at_fpow (m : ℤ) (hx : x ≠ 0) (s : set 𝕜) :
1807+
theorem has_deriv_within_at_fpow (m : ℤ) (x : 𝕜) (h : x ≠ 00 ≤ m) (s : set 𝕜) :
18171808
has_deriv_within_at (λx, x^m) ((m : 𝕜) * x^(m-1)) s x :=
1818-
(has_deriv_at_fpow m hx).has_deriv_within_at
1809+
(has_deriv_at_fpow m x h).has_deriv_within_at
18191810

1820-
lemma differentiable_at_fpow (hx : x ≠ 0) : differentiable_at 𝕜 (λx, x^m) x :=
1821-
(has_deriv_at_fpow m hx).differentiable_at
1811+
lemma differentiable_at_fpow : differentiable_at 𝕜 (λx, x^m) x ↔ x ≠ 00 ≤ m :=
1812+
⟨λ H, normed_field.continuous_at_fpow.1 H.continuous_at,
1813+
λ H, (has_deriv_at_fpow m x H).differentiable_at⟩
18221814

1823-
lemma differentiable_within_at_fpow (hx : x 0) :
1815+
lemma differentiable_within_at_fpow (m : ℤ) (x : 𝕜) (h : x 00 ≤ m) :
18241816
differentiable_within_at 𝕜 (λx, x^m) s x :=
1825-
(differentiable_at_fpow hx).differentiable_within_at
1817+
(differentiable_at_fpow.mpr h).differentiable_within_at
1818+
1819+
lemma differentiable_on_fpow (m : ℤ) (s : set 𝕜) (h : (0 : 𝕜) ∉ s ∨ 0 ≤ m) :
1820+
differentiable_on 𝕜 (λx, x^m) s :=
1821+
λ x hxs, differentiable_within_at_fpow m x $ h.imp_left $ ne_of_mem_of_not_mem hxs
18261822

1827-
lemma differentiable_on_fpow (hs : (0:𝕜) ∉ s) : differentiable_on 𝕜 (λx, x^m) s :=
1828-
λ x hxs, differentiable_within_at_fpow (λ hx, hs $ hx ▸ hxs)
1823+
lemma deriv_fpow (m : ℤ) (x : 𝕜) : deriv (λ x, x ^ m) x = m * x ^ (m - 1) :=
1824+
begin
1825+
by_cases H : x ≠ 00 ≤ m,
1826+
{ exact (has_deriv_at_fpow m x H).deriv },
1827+
{ rw deriv_zero_of_not_differentiable_at (mt differentiable_at_fpow.1 H),
1828+
push_neg at H, rcases H with ⟨rfl, hm⟩,
1829+
rw [zero_fpow _ ((sub_one_lt _).trans hm).ne, mul_zero] }
1830+
end
18291831

1830-
-- TODO : this is true at `x=0` as well
1831-
lemma deriv_fpow (hx : x ≠ 0) : deriv (λx, x^m) x = (m : 𝕜) * x^(m-1) :=
1832-
(has_deriv_at_fpow m hx).deriv
1832+
@[simp] lemma deriv_fpow' (m : ℤ) : deriv (λ x : 𝕜, x ^ m) = λ x, m * x ^ (m - 1) :=
1833+
funext $ deriv_fpow m
18331834

1834-
lemma deriv_within_fpow (hxs : unique_diff_within_at 𝕜 s x) (hx : x ≠ 0) :
1835+
lemma deriv_within_fpow (hxs : unique_diff_within_at 𝕜 s x) (h : x ≠ 00 ≤ m) :
18351836
deriv_within (λx, x^m) s x = (m : 𝕜) * x^(m-1) :=
1836-
(has_deriv_within_at_fpow m hx s).deriv_within hxs
1837+
(has_deriv_within_at_fpow m x h s).deriv_within hxs
1838+
1839+
@[simp] lemma iter_deriv_fpow' (m : ℤ) (k : ℕ) :
1840+
deriv^[k] (λ x : 𝕜, x ^ m) = λ x, (∏ i in finset.range k, (m - i)) * x ^ (m - k) :=
1841+
begin
1842+
induction k with k ihk,
1843+
{ simp only [one_mul, int.coe_nat_zero, id, sub_zero, finset.prod_range_zero,
1844+
function.iterate_zero] },
1845+
{ simp only [function.iterate_succ_apply', ihk, deriv_const_mul', deriv_fpow',
1846+
finset.prod_range_succ, int.coe_nat_succ, ← sub_sub, int.cast_sub, int.cast_coe_nat,
1847+
mul_assoc], }
1848+
end
1849+
1850+
lemma iter_deriv_fpow (m : ℤ) (x : 𝕜) (k : ℕ) :
1851+
deriv^[k] (λ y, y ^ m) x = (∏ i in finset.range k, (m - i)) * x ^ (m - k) :=
1852+
congr_fun (iter_deriv_fpow' m k) x
18371853

1838-
lemma iter_deriv_fpow {k : ℕ} (hx : x ≠ 0) :
1839-
deriv^[k] (λx:𝕜, x^m) x = (∏ i in finset.range k, (m - i) : ℤ) * x^(m-k) :=
1854+
lemma iter_deriv_pow (n : ℕ) (x : 𝕜) (k : ℕ) :
1855+
deriv^[k] (λx:𝕜, x^n) x = (∏ i in finset.range k, (n - i)) * x^(n-k) :=
18401856
begin
1841-
induction k with k ihk generalizing x hx,
1842-
{ simp only [one_mul, finset.prod_range_zero, function.iterate_zero_apply, int.coe_nat_zero,
1843-
sub_zero, int.cast_one] },
1844-
{ rw [function.iterate_succ', finset.prod_range_succ, int.cast_mul, mul_assoc,
1845-
int.coe_nat_succ, ← sub_sub, ← ((has_deriv_at_fpow _ hx).const_mul _).deriv],
1846-
exact filter.eventually_eq.deriv_eq (eventually.mono (is_open.mem_nhds is_open_ne hx) @ihk) }
1857+
simp only [← gpow_coe_nat, iter_deriv_fpow, int.cast_coe_nat],
1858+
cases le_or_lt k n with hkn hnk,
1859+
{ rw int.coe_nat_sub hkn },
1860+
{ have : ∏ i in finset.range k, (n - i : 𝕜) = 0,
1861+
from finset.prod_eq_zero (finset.mem_range.2 hnk) (sub_self _),
1862+
simp only [this, zero_mul] }
18471863
end
18481864

1865+
@[simp] lemma iter_deriv_pow' (n k : ℕ) :
1866+
deriv^[k] (λ x : 𝕜, x ^ n) = λ x, (∏ i in finset.range k, (n - i)) * x ^ (n - k) :=
1867+
funext $ λ x, iter_deriv_pow n x k
1868+
1869+
lemma iter_deriv_inv (k : ℕ) (x : 𝕜) :
1870+
deriv^[k] has_inv.inv x = (∏ i in finset.range k, (-1 - i)) * x ^ (-1 - k : ℤ) :=
1871+
by simpa only [fpow_neg_one, int.cast_neg, int.cast_one] using iter_deriv_fpow (-1) x k
1872+
1873+
@[simp] lemma iter_deriv_inv' (k : ℕ) :
1874+
deriv^[k] has_inv.inv = λ x : 𝕜, (∏ i in finset.range k, (-1 - i)) * x ^ (-1 - k : ℤ) :=
1875+
funext (iter_deriv_inv k)
1876+
18491877
end fpow
18501878

18511879
/-! ### Upper estimates on liminf and limsup -/

src/analysis/convex/specific_functions.lean

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ begin
3535
{ simp only [deriv_pow', differentiable.mul, differentiable_const, differentiable_pow] },
3636
{ intro x,
3737
rcases nat.even.sub_even hn (nat.even_bit0 1) with ⟨k, hk⟩,
38-
simp only [iter_deriv_pow, finset.prod_range_succ, finset.prod_range_zero, nat.sub_zero,
39-
mul_one, hk, pow_mul', sq],
40-
exact mul_nonneg (nat.cast_nonneg _) (mul_self_nonneg _) }
38+
rw [iter_deriv_pow, finset.prod_range_cast_nat_sub, hk, pow_mul'],
39+
exact mul_nonneg (nat.cast_nonneg _) (pow_two_nonneg _) }
4140
end
4241

4342
/-- `x^n`, `n : ℕ` is convex on `[0, +∞)` for all `n` -/
4443
lemma convex_on_pow (n : ℕ) : convex_on (Ici 0) (λ x : ℝ, x^n) :=
4544
begin
46-
apply convex_on_of_deriv2_nonneg (convex_Ici _) (continuous_pow n).continuous_on;
47-
simp only [interior_Ici, differentiable_on_pow, deriv_pow',
48-
differentiable_on_const, differentiable_on.mul, iter_deriv_pow],
49-
intros x hx,
50-
exact mul_nonneg (nat.cast_nonneg _) (pow_nonneg (le_of_lt hx) _)
45+
apply convex_on_of_deriv2_nonneg (convex_Ici _) (continuous_pow n).continuous_on
46+
differentiable_on_pow,
47+
{ simp only [deriv_pow'], exact differentiable_on_pow.const_mul _ },
48+
{ intros x hx,
49+
rw [iter_deriv_pow, finset.prod_range_cast_nat_sub],
50+
exact mul_nonneg (nat.cast_nonneg _) (pow_nonneg (interior_subset hx) _) }
5151
end
5252

5353
lemma finset.prod_nonneg_of_card_nonpos_even
@@ -64,35 +64,29 @@ calc 0 ≤ (∏ x in s, ((if f x ≤ 0 then (-1:β) else 1) * f x)) :
6464
lemma int_prod_range_nonneg (m : ℤ) (n : ℕ) (hn : even n) :
6565
0 ≤ ∏ k in finset.range n, (m - k) :=
6666
begin
67-
cases (le_or_lt ↑n m) with hnm hmn,
68-
{ exact finset.prod_nonneg (λ k hk, sub_nonneg.2 (le_trans
69-
(int.coe_nat_le.2 $ le_of_lt $ finset.mem_range.1 hk) hnm)) },
70-
cases le_or_lt 0 m with hm hm,
71-
{ lift m to ℕ using hm,
72-
exact le_of_eq (eq.symm $ finset.prod_eq_zero
73-
(finset.mem_range.2 $ int.coe_nat_lt.1 hmn) (sub_self _)) },
74-
clear hmn,
75-
apply finset.prod_nonneg_of_card_nonpos_even,
76-
convert hn,
77-
convert finset.card_range n,
78-
ext k,
79-
simp only [finset.mem_filter, finset.mem_range],
80-
refine ⟨and.left, λ hk, ⟨hk, sub_nonpos.2 $ le_trans (le_of_lt hm) _⟩⟩,
81-
exact int.coe_nat_nonneg k
67+
rcases hn with ⟨n, rfl⟩,
68+
induction n with n ihn, { simp },
69+
rw [nat.succ_eq_add_one, mul_add, mul_one, bit0, ← add_assoc, finset.prod_range_succ,
70+
finset.prod_range_succ, mul_assoc],
71+
refine mul_nonneg ihn _, generalize : (1 + 1) * n = k,
72+
cases le_or_lt m k with hmk hmk,
73+
{ have : m ≤ k + 1, from hmk.trans (lt_add_one ↑k).le,
74+
exact mul_nonneg_of_nonpos_of_nonpos (sub_nonpos.2 hmk) (sub_nonpos.2 this) },
75+
{ exact mul_nonneg (sub_nonneg.2 hmk.le) (sub_nonneg.2 hmk) }
8276
end
8377

8478
/-- `x^m`, `m : ℤ` is convex on `(0, +∞)` for all `m` -/
8579
lemma convex_on_fpow (m : ℤ) : convex_on (Ioi 0) (λ x : ℝ, x^m) :=
8680
begin
87-
apply convex_on_of_deriv2_nonneg (convex_Ioi 0); try { rw [interior_Ioi] },
88-
{ exact (differentiable_on_fpow $ lt_irrefl _).continuous_on },
89-
{ exact differentiable_on_fpow (lt_irrefl _) },
90-
{ have : eq_on (deriv (λx:ℝ, x^m)) (λx, ↑m * x^(m-1)) (Ioi 0),
91-
from λ x hx, deriv_fpow (ne_of_gt hx),
92-
refine (differentiable_on_congr this).2 _,
93-
exact (differentiable_on_fpow (lt_irrefl _)).const_mul _ },
81+
have : ∀ n : ℤ, differentiable_on ℝ (λ x, x ^ n) (Ioi (0 : ℝ)),
82+
from λ n, differentiable_on_fpow _ _ (or.inl $ lt_irrefl _),
83+
apply convex_on_of_deriv2_nonneg (convex_Ioi 0);
84+
try { simp only [interior_Ioi, deriv_fpow'] },
85+
{ exact (this _).continuous_on },
86+
{ exact this _ },
87+
{ exact (this _).const_mul _ },
9488
{ intros x hx,
95-
simp only [iter_deriv_fpow (ne_of_gt hx)],
89+
simp only [iter_deriv_fpow, ← int.cast_coe_nat, ← int.cast_sub, ← int.cast_prod],
9690
refine mul_nonneg (int.cast_nonneg.2 _) (fpow_nonneg (le_of_lt hx) _),
9791
exact int_prod_range_nonneg _ _ (nat.even_bit0 1) }
9892
end
@@ -128,7 +122,7 @@ begin
128122
{ intros x hx,
129123
rw [function.iterate_succ, function.iterate_one],
130124
change (deriv (deriv log)) x ≤ 0,
131-
rw [deriv_log', deriv_inv (show x ≠ 0, by {rintro rfl, exact lt_irrefl 0 hx})],
125+
rw [deriv_log', deriv_inv],
132126
exact neg_nonpos.mpr (inv_nonneg.mpr (sq_nonneg x)) }
133127
end
134128

@@ -146,6 +140,6 @@ begin
146140
{ intros x hx,
147141
rw [function.iterate_succ, function.iterate_one],
148142
change (deriv (deriv log)) x ≤ 0,
149-
rw [deriv_log', deriv_inv (show x ≠ 0, by {rintro rfl, exact lt_irrefl 0 hx})],
143+
rw [deriv_log', deriv_inv],
150144
exact neg_nonpos.mpr (inv_nonneg.mpr (sq_nonneg x)) }
151145
end

0 commit comments

Comments
 (0)