Skip to content

Commit 61d1f8f

Browse files
committed
refactor(Analysis,Geometry): assume n ≠ 0, not 1 ≤ n (#33131)
This way it's a `positivity` goal.
1 parent 925bff5 commit 61d1f8f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+237
-239
lines changed

Mathlib/Analysis/Calculus/AddTorsor/AffineMap.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ theorem contDiff {n : WithTop ℕ∞} (f : V →ᴬ[𝕜] W) : ContDiff 𝕜 n f
3434
exact contDiff_const
3535

3636
theorem differentiable (f : V →ᴬ[𝕜] W) : Differentiable 𝕜 f :=
37-
f.contDiff.differentiable le_rfl
37+
f.contDiff.differentiable one_ne_zero
3838

3939
theorem differentiableAt (f : V →ᴬ[𝕜] W) {x : V} : DifferentiableAt 𝕜 f x :=
4040
f.differentiable x

Mathlib/Analysis/Calculus/ContDiff/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ protected theorem Differentiable.fderiv_two {f : E → F → G} {g : E → F}
13381338
Differentiable 𝕜 fun x => fderiv 𝕜 (f x) (g x) :=
13391339
ContDiff.differentiable
13401340
(contDiff_iff_contDiffAt.mpr fun _ => hf.contDiffAt.fderiv hg.contDiffAt (le_refl 2))
1341-
(le_refl 1)
1341+
one_ne_zero
13421342

13431343
/-- `x ↦ fderiv 𝕜 (f x) (g x) (k x)` is smooth. -/
13441344
theorem ContDiff.fderiv_apply {f : E → F → G} {g k : E → F}

Mathlib/Analysis/Calculus/ContDiff/Bounds.lean

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ theorem ContinuousLinearMap.norm_iteratedFDerivWithin_le_of_bilinear_aux {Du Eu
101101
iteratedFDerivWithin 𝕜 n (fun y => B.precompR Du (f y)
102102
(fderivWithin 𝕜 g s y) + B.precompL Du (fderivWithin 𝕜 f s y) (g y)) s x := by
103103
apply iteratedFDerivWithin_congr (fun y hy => ?_) hx
104-
have L : (1 : WithTop ℕ∞) ≤ n.succ := by
105-
simpa only [ENat.coe_one, Nat.one_le_cast] using Nat.succ_pos n
106-
exact B.fderivWithin_of_bilinear (hf.differentiableOn L y hy) (hg.differentiableOn L y hy)
107-
(hs y hy)
104+
exact B.fderivWithin_of_bilinear (hf.differentiableOn (by positivity) y hy)
105+
(hg.differentiableOn (by positivity) y hy) (hs y hy)
108106
rw [← norm_iteratedFDerivWithin_fderivWithin hs hx, J]
109107
have A : ContDiffOn 𝕜 n (fun y => B.precompR Du (f y) (fderivWithin 𝕜 g s y)) s :=
110108
(B.precompR Du).isBoundedBilinearMap.contDiff.comp₂_contDiffOn
@@ -406,13 +404,11 @@ theorem norm_iteratedFDerivWithin_comp_le_aux {Fu Gu : Type u} [NormedAddCommGro
406404
LinearIsometryEquiv.norm_map]
407405
_ = ‖iteratedFDerivWithin 𝕜 n (fun y : E => ContinuousLinearMap.compL 𝕜 E Fu Gu
408406
(fderivWithin 𝕜 g t (f y)) (fderivWithin 𝕜 f s y)) s x‖ := by
409-
have L : (1 : WithTop ℕ∞) ≤ n.succ := by
410-
simpa only [ENat.coe_one, Nat.one_le_cast] using n.succ_pos
411407
congr 1
412408
refine iteratedFDerivWithin_congr (fun y hy => ?_) hx _
413409
apply fderivWithin_comp _ _ _ hst (hs y hy)
414-
· exact hg.differentiableOn L _ (hst hy)
415-
· exact hf.differentiableOn L _ hy
410+
· exact hg.differentiableOn (by positivity) _ (hst hy)
411+
· exact hf.differentiableOn (by positivity) _ hy
416412
-- bound it using the fact that the composition of linear maps is a bilinear operation,
417413
-- for which we have bounds for the`n`-th derivative.
418414
_ ≤ ∑ i ∈ Finset.range (n + 1),

Mathlib/Analysis/Calculus/ContDiff/Defs.lean

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -335,15 +335,16 @@ theorem contDiffWithinAt_diff_singleton {y : E} :
335335

336336
/-- If a function is `C^n` within a set at a point, with `n ≥ 1`, then it is differentiable
337337
within this set at this point. -/
338-
theorem ContDiffWithinAt.differentiableWithinAt' (h : ContDiffWithinAt 𝕜 n f s x) (hn : 1 ≤ n) :
338+
theorem ContDiffWithinAt.differentiableWithinAt' (h : ContDiffWithinAt 𝕜 n f s x) (hn : n ≠ 0) :
339339
DifferentiableWithinAt 𝕜 f (insert x s) x := by
340-
rcases contDiffWithinAt_nat.1 (h.of_le hn) with ⟨u, hu, p, H⟩
340+
rcases contDiffWithinAt_nat.1 (h.of_le <| ENat.one_le_iff_ne_zero_withTop.mpr hn)
341+
with ⟨u, hu, p, H⟩
341342
rcases mem_nhdsWithin.1 hu with ⟨t, t_open, xt, tu⟩
342343
rw [inter_comm] at tu
343344
exact (differentiableWithinAt_inter (IsOpen.mem_nhds t_open xt)).1 <|
344-
((H.mono tu).differentiableOn le_rfl) x ⟨mem_insert x s, xt⟩
345+
((H.mono tu).differentiableOn one_ne_zero) x ⟨mem_insert x s, xt⟩
345346

346-
theorem ContDiffWithinAt.differentiableWithinAt (h : ContDiffWithinAt 𝕜 n f s x) (hn : 1 ≤ n) :
347+
theorem ContDiffWithinAt.differentiableWithinAt (h : ContDiffWithinAt 𝕜 n f s x) (hn : n ≠ 0) :
347348
DifferentiableWithinAt 𝕜 f s x :=
348349
(h.differentiableWithinAt' hn).mono (subset_insert x s)
349350

@@ -358,7 +359,7 @@ theorem contDiffWithinAt_succ_iff_hasFDerivWithinAt (hn : n ≠ ∞) :
358359
· intro h
359360
rcases (contDiffWithinAt_iff_of_ne_infty h'n).1 h with ⟨u, hu, p, Hp, H'p⟩
360361
refine ⟨u, hu, ?_, fun y => (continuousMultilinearCurryFin1 𝕜 E F) (p y 1),
361-
fun y hy => Hp.hasFDerivWithinAt le_add_self hy, ?_⟩
362+
fun y hy => Hp.hasFDerivWithinAt (by simp) hy, ?_⟩
362363
· rintro rfl
363364
exact Hp.analyticOn (H'p rfl 0)
364365
apply (contDiffWithinAt_iff_of_ne_infty hn).2
@@ -558,12 +559,12 @@ theorem ContDiffOn.congr_mono (hf : ContDiffOn 𝕜 n f s) (h₁ : ∀ x ∈ s
558559
(hf.mono hs).congr h₁
559560

560561
/-- If a function is `C^n` on a set with `n ≥ 1`, then it is differentiable there. -/
561-
theorem ContDiffOn.differentiableOn (h : ContDiffOn 𝕜 n f s) (hn : 1 ≤ n) :
562+
theorem ContDiffOn.differentiableOn (h : ContDiffOn 𝕜 n f s) (hn : n ≠ 0) :
562563
DifferentiableOn 𝕜 f s := fun x hx => (h x hx).differentiableWithinAt hn
563564

564565
@[fun_prop]
565566
theorem ContDiffOn.differentiableOn_one (h : ContDiffOn 𝕜 1 f s) :
566-
DifferentiableOn 𝕜 f s := fun x hx => (h x hx).differentiableWithinAt (le_refl 1)
567+
DifferentiableOn 𝕜 f s := fun x hx => (h x hx).differentiableWithinAt one_ne_zero
567568

568569
/-- If a function is `C^n` around each point in a set, then it is `C^n` on the set. -/
569570
theorem contDiffOn_of_locally_contDiffOn
@@ -832,7 +833,7 @@ theorem contDiffOn_succ_iff_fderivWithin (hs : UniqueDiffOn 𝕜 s) :
832833
DifferentiableOn 𝕜 f s ∧ (n = ω → AnalyticOn 𝕜 f s) ∧
833834
ContDiffOn 𝕜 n (fderivWithin 𝕜 f s) s := by
834835
refine ⟨fun H => ?_, fun h => contDiffOn_succ_of_fderivWithin h.1 h.2.1 h.2.2
835-
refine ⟨H.differentiableOn le_add_self, ?_, fun x hx => ?_⟩
836+
refine ⟨H.differentiableOn (by simp), ?_, fun x hx => ?_⟩
836837
· rintro rfl
837838
exact H.analyticOn
838839
have A (m : ℕ) (hm : m ≤ n) : ContDiffWithinAt 𝕜 m (fun y => fderivWithin 𝕜 f s y) s x := by
@@ -969,7 +970,7 @@ theorem contDiffWithinAt_compl_self :
969970
rw [compl_eq_univ_diff, contDiffWithinAt_diff_singleton, contDiffWithinAt_univ]
970971

971972
/-- If a function is `C^n` with `n ≥ 1` at a point, then it is differentiable there. -/
972-
theorem ContDiffAt.differentiableAt (h : ContDiffAt 𝕜 n f x) (hn : 1 ≤ n) :
973+
theorem ContDiffAt.differentiableAt (h : ContDiffAt 𝕜 n f x) (hn : n ≠ 0) :
973974
DifferentiableAt 𝕜 f x := by
974975
simpa [hn, differentiableWithinAt_univ] using h.differentiableWithinAt
975976

@@ -1123,12 +1124,12 @@ theorem ContDiff.continuous_zero (h : ContDiff 𝕜 0 f) : Continuous f :=
11231124
contDiff_zero.1 (h.of_le bot_le)
11241125

11251126
/-- If a function is `C^n` with `n ≥ 1`, then it is differentiable. -/
1126-
theorem ContDiff.differentiable (h : ContDiff 𝕜 n f) (hn : 1 ≤ n) : Differentiable 𝕜 f :=
1127+
theorem ContDiff.differentiable (h : ContDiff 𝕜 n f) (hn : n ≠ 0) : Differentiable 𝕜 f :=
11271128
differentiableOn_univ.1 <| (contDiffOn_univ.2 h).differentiableOn hn
11281129

11291130
@[fun_prop]
11301131
theorem ContDiff.differentiable_one (h : ContDiff 𝕜 1 f) : Differentiable 𝕜 f :=
1131-
differentiableOn_univ.1 <| (contDiffOn_univ.2 h).differentiableOn (le_refl 1)
1132+
differentiableOn_univ.1 <| (contDiffOn_univ.2 h).differentiableOn one_ne_zero
11321133

11331134
theorem contDiff_iff_forall_nat_le {n : ℕ∞} :
11341135
ContDiff 𝕜 n f ↔ ∀ m : ℕ, ↑m ≤ n → ContDiff 𝕜 m f := by
@@ -1235,13 +1236,13 @@ theorem contDiff_infty_iff_fderiv :
12351236
rw [← ENat.coe_top_add_one, contDiff_succ_iff_fderiv]
12361237
simp
12371238

1238-
theorem ContDiff.continuous_fderiv (h : ContDiff 𝕜 n f) (hn : 1 ≤ n) :
1239+
theorem ContDiff.continuous_fderiv (h : ContDiff 𝕜 n f) (hn : n ≠ 0) :
12391240
Continuous (fderiv 𝕜 f) :=
1240-
(contDiff_one_iff_fderiv.1 (h.of_le hn)).2
1241+
(contDiff_one_iff_fderiv.1 (h.of_le <| ENat.one_le_iff_ne_zero_withTop.mpr hn)).2
12411242

12421243
/-- If a function is at least `C^1`, its bundled derivative (mapping `(x, v)` to `Df(x) v`) is
12431244
continuous. -/
1244-
theorem ContDiff.continuous_fderiv_apply (h : ContDiff 𝕜 n f) (hn : 1 ≤ n) :
1245+
theorem ContDiff.continuous_fderiv_apply (h : ContDiff 𝕜 n f) (hn : n ≠ 0) :
12451246
Continuous fun p : E × E => (fderiv 𝕜 f p.1 : E → F) p.2 :=
12461247
have A : Continuous fun q : (E →L[𝕜] F) × E => q.1 q.2 := isBoundedBilinearMap_apply.continuous
12471248
have B : Continuous fun p : E × E => (fderiv 𝕜 f p.1, p.2) :=

Mathlib/Analysis/Calculus/ContDiff/FTaylorSeries.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,40 +216,40 @@ theorem hasFTaylorSeriesUpToOn_top_iff' (hN : ∞ ≤ N) :
216216

217217
/-- If a function has a Taylor series at order at least `1`, then the term of order `1` of this
218218
series is a derivative of `f`. -/
219-
theorem HasFTaylorSeriesUpToOn.hasFDerivWithinAt (h : HasFTaylorSeriesUpToOn n f p s) (hn : 1 ≤ n)
219+
theorem HasFTaylorSeriesUpToOn.hasFDerivWithinAt (h : HasFTaylorSeriesUpToOn n f p s) (hn : n ≠ 0)
220220
(hx : x ∈ s) : HasFDerivWithinAt f (continuousMultilinearCurryFin1 𝕜 E F (p x 1)) s x := by
221221
have A : ∀ y ∈ s, f y = (continuousMultilinearCurryFin0 𝕜 E F) (p y 0) := fun y hy ↦
222222
(h.zero_eq y hy).symm
223223
suffices H : HasFDerivWithinAt (continuousMultilinearCurryFin0 𝕜 E F ∘ (p · 0))
224224
(continuousMultilinearCurryFin1 𝕜 E F (p x 1)) s x from H.congr A (A x hx)
225225
rw [LinearIsometryEquiv.comp_hasFDerivWithinAt_iff']
226-
have : ((0 : ℕ) : ℕ∞) < n := zero_lt_one.trans_le hn
226+
have : ((0 : ℕ) : ℕ∞) < n := pos_iff_ne_zero.mpr hn
227227
convert h.fderivWithin _ this x hx
228228
ext y v
229229
change (p x 1) (snoc 0 y) = (p x 1) (cons y v)
230230
congr with i
231231
rw [Unique.eq_default (α := Fin 1) i]
232232
rfl
233233

234-
theorem HasFTaylorSeriesUpToOn.differentiableOn (h : HasFTaylorSeriesUpToOn n f p s) (hn : 1 ≤ n) :
234+
theorem HasFTaylorSeriesUpToOn.differentiableOn (h : HasFTaylorSeriesUpToOn n f p s) (hn : n ≠ 0) :
235235
DifferentiableOn 𝕜 f s := fun _x hx => (h.hasFDerivWithinAt hn hx).differentiableWithinAt
236236

237237
/-- If a function has a Taylor series at order at least `1` on a neighborhood of `x`, then the term
238238
of order `1` of this series is a derivative of `f` at `x`. -/
239-
theorem HasFTaylorSeriesUpToOn.hasFDerivAt (h : HasFTaylorSeriesUpToOn n f p s) (hn : 1 ≤ n)
239+
theorem HasFTaylorSeriesUpToOn.hasFDerivAt (h : HasFTaylorSeriesUpToOn n f p s) (hn : n ≠ 0)
240240
(hx : s ∈ 𝓝 x) : HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p x 1)) x :=
241241
(h.hasFDerivWithinAt hn (mem_of_mem_nhds hx)).hasFDerivAt hx
242242

243243
/-- If a function has a Taylor series at order at least `1` on a neighborhood of `x`, then
244244
in a neighborhood of `x`, the term of order `1` of this series is a derivative of `f`. -/
245245
theorem HasFTaylorSeriesUpToOn.eventually_hasFDerivAt (h : HasFTaylorSeriesUpToOn n f p s)
246-
(hn : 1 ≤ n) (hx : s ∈ 𝓝 x) :
246+
(hn : n ≠ 0) (hx : s ∈ 𝓝 x) :
247247
∀ᶠ y in 𝓝 x, HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p y 1)) y :=
248248
(eventually_eventually_nhds.2 hx).mono fun _y hy => h.hasFDerivAt hn hy
249249

250250
/-- If a function has a Taylor series at order at least `1` on a neighborhood of `x`, then
251251
it is differentiable at `x`. -/
252-
theorem HasFTaylorSeriesUpToOn.differentiableAt (h : HasFTaylorSeriesUpToOn n f p s) (hn : 1 ≤ n)
252+
theorem HasFTaylorSeriesUpToOn.differentiableAt (h : HasFTaylorSeriesUpToOn n f p s) (hn : n ≠ 0)
253253
(hx : s ∈ 𝓝 x) : DifferentiableAt 𝕜 f x :=
254254
(h.hasFDerivAt hn hx).differentiableAt
255255

@@ -750,12 +750,12 @@ theorem hasFTaylorSeriesUpTo_top_iff' (hN : ∞ ≤ N) :
750750

751751
/-- If a function has a Taylor series at order at least `1`, then the term of order `1` of this
752752
series is a derivative of `f`. -/
753-
theorem HasFTaylorSeriesUpTo.hasFDerivAt (h : HasFTaylorSeriesUpTo n f p) (hn : 1 ≤ n) (x : E) :
753+
theorem HasFTaylorSeriesUpTo.hasFDerivAt (h : HasFTaylorSeriesUpTo n f p) (hn : n ≠ 0) (x : E) :
754754
HasFDerivAt f (continuousMultilinearCurryFin1 𝕜 E F (p x 1)) x := by
755755
rw [← hasFDerivWithinAt_univ]
756756
exact (hasFTaylorSeriesUpToOn_univ_iff.2 h).hasFDerivWithinAt hn (mem_univ _)
757757

758-
theorem HasFTaylorSeriesUpTo.differentiable (h : HasFTaylorSeriesUpTo n f p) (hn : 1 ≤ n) :
758+
theorem HasFTaylorSeriesUpTo.differentiable (h : HasFTaylorSeriesUpTo n f p) (hn : n ≠ 0) :
759759
Differentiable 𝕜 f := fun x => (h.hasFDerivAt hn x).differentiableAt
760760

761761
/-- `p` is a Taylor series of `f` up to `n+1` if and only if `p.shift` is a Taylor series up to `n`

Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,7 @@ theorem HasFTaylorSeriesUpToOn.comp {n : WithTop ℕ∞} {g : F → G} {f : E
10791079
have J : HasFDerivWithinAt (fun x ↦ q x c.length) (q (f x) c.length.succ).curryLeft
10801080
t (f x) := hg.fderivWithin c.length (cm.trans_lt hm) (f x) (h hx)
10811081
have K : HasFDerivWithinAt f ((continuousMultilinearCurryFin1 𝕜 E F) (p x 1)) s x :=
1082-
hf.hasFDerivWithinAt (le_trans (mod_cast Nat.le_add_left 1 m)
1083-
(ENat.add_one_natCast_le_withTop_of_lt hm)) hx
1082+
hf.hasFDerivWithinAt hm.ne_bot hx
10841083
convert HasFDerivWithinAt.linear_multilinear_comp (J.comp x K h) I B
10851084
simp only [B, Nat.succ_eq_add_one, Fintype.sum_option, comp_apply, faaDiBruno_aux1,
10861085
faaDiBruno_aux2]

Mathlib/Analysis/Calculus/ContDiff/RCLike.lean

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,46 +35,47 @@ variable {n : WithTop ℕ∞} {𝕂 : Type*} [RCLike 𝕂] {E' : Type*} [NormedA
3535
domain of definition, the term of order 1 of this series is a strict derivative of `f`. -/
3636
theorem HasFTaylorSeriesUpToOn.hasStrictFDerivAt {n : WithTop ℕ∞}
3737
{s : Set E'} {f : E' → F'} {x : E'}
38-
{p : E' → FormalMultilinearSeries 𝕂 E' F'} (hf : HasFTaylorSeriesUpToOn n f p s) (hn : 1 ≤ n)
38+
{p : E' → FormalMultilinearSeries 𝕂 E' F'} (hf : HasFTaylorSeriesUpToOn n f p s) (hn : n ≠ 0)
3939
(hs : s ∈ 𝓝 x) : HasStrictFDerivAt f ((continuousMultilinearCurryFin1 𝕂 E' F') (p x 1)) x :=
4040
hasStrictFDerivAt_of_hasFDerivAt_of_continuousAt (hf.eventually_hasFDerivAt hn hs) <|
41-
(continuousMultilinearCurryFin1 𝕂 E' F').continuousAt.comp <| (hf.cont 1 hn).continuousAt hs
41+
(continuousMultilinearCurryFin1 𝕂 E' F').continuousAt.comp <|
42+
(hf.cont 1 <| ENat.one_le_iff_ne_zero_withTop.mpr hn).continuousAt hs
4243

43-
/-- If a function is `C^n` with `1 ≤ n` around a point, and its derivative at that point is given to
44+
/-- If a function is `C^n` with `n ≠ 0` around a point, and its derivative at that point is given to
4445
us as `f'`, then `f'` is also a strict derivative. -/
4546
theorem ContDiffAt.hasStrictFDerivAt' {f : E' → F'} {f' : E' →L[𝕂] F'} {x : E'}
46-
(hf : ContDiffAt 𝕂 n f x) (hf' : HasFDerivAt f f' x) (hn : 1 ≤ n) :
47+
(hf : ContDiffAt 𝕂 n f x) (hf' : HasFDerivAt f f' x) (hn : n ≠ 0) :
4748
HasStrictFDerivAt f f' x := by
48-
rcases hf.of_le hn 1 le_rfl with ⟨u, H, p, hp⟩
49+
rcases hf.of_le (ENat.one_le_iff_ne_zero_withTop.mpr hn) 1 le_rfl with ⟨u, H, p, hp⟩
4950
simp only [nhdsWithin_univ, mem_univ, insert_eq_of_mem] at H
50-
have := hp.hasStrictFDerivAt le_rfl H
51+
have := hp.hasStrictFDerivAt one_ne_zero H
5152
rwa [hf'.unique this.hasFDerivAt]
5253

5354
/-- If a function is `C^n` with `1 ≤ n` around a point, and its derivative at that point is given to
5455
us as `f'`, then `f'` is also a strict derivative. -/
5556
theorem ContDiffAt.hasStrictDerivAt' {f : 𝕂 → F'} {f' : F'} {x : 𝕂} (hf : ContDiffAt 𝕂 n f x)
56-
(hf' : HasDerivAt f f' x) (hn : 1 ≤ n) : HasStrictDerivAt f f' x :=
57+
(hf' : HasDerivAt f f' x) (hn : n ≠ 0) : HasStrictDerivAt f f' x :=
5758
hf.hasStrictFDerivAt' hf' hn
5859

5960
/-- If a function is `C^n` with `1 ≤ n` around a point, then the derivative of `f` at this point
6061
is also a strict derivative. -/
61-
theorem ContDiffAt.hasStrictFDerivAt {f : E' → F'} {x : E'} (hf : ContDiffAt 𝕂 n f x) (hn : 1 ≤ n) :
62+
theorem ContDiffAt.hasStrictFDerivAt {f : E' → F'} {x : E'} (hf : ContDiffAt 𝕂 n f x) (hn : n ≠ 0) :
6263
HasStrictFDerivAt f (fderiv 𝕂 f x) x :=
6364
hf.hasStrictFDerivAt' (hf.differentiableAt hn).hasFDerivAt hn
6465

6566
/-- If a function is `C^n` with `1 ≤ n` around a point, then the derivative of `f` at this point
6667
is also a strict derivative. -/
67-
theorem ContDiffAt.hasStrictDerivAt {f : 𝕂 → F'} {x : 𝕂} (hf : ContDiffAt 𝕂 n f x) (hn : 1 ≤ n) :
68+
theorem ContDiffAt.hasStrictDerivAt {f : 𝕂 → F'} {x : 𝕂} (hf : ContDiffAt 𝕂 n f x) (hn : n ≠ 0) :
6869
HasStrictDerivAt f (deriv f x) x :=
6970
(hf.hasStrictFDerivAt hn).hasStrictDerivAt
7071

7172
/-- If a function is `C^n` with `1 ≤ n`, then the derivative of `f` is also a strict derivative. -/
72-
theorem ContDiff.hasStrictFDerivAt {f : E' → F'} {x : E'} (hf : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
73+
theorem ContDiff.hasStrictFDerivAt {f : E' → F'} {x : E'} (hf : ContDiff 𝕂 n f) (hn : n ≠ 0) :
7374
HasStrictFDerivAt f (fderiv 𝕂 f x) x :=
7475
hf.contDiffAt.hasStrictFDerivAt hn
7576

7677
/-- If a function is `C^n` with `1 ≤ n`, then the derivative of `f` is also a strict derivative. -/
77-
theorem ContDiff.hasStrictDerivAt {f : 𝕂 → F'} {x : 𝕂} (hf : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
78+
theorem ContDiff.hasStrictDerivAt {f : 𝕂 → F'} {x : 𝕂} (hf : ContDiff 𝕂 n f) (hn : n ≠ 0) :
7879
HasStrictDerivAt f (deriv f x) x :=
7980
hf.contDiffAt.hasStrictDerivAt hn
8081

@@ -87,7 +88,7 @@ theorem HasFTaylorSeriesUpToOn.exists_lipschitzOnWith_of_nnnorm_lt {E F : Type*}
8788
(hK : ‖p x 1‖₊ < K) : ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t := by
8889
set f' := fun y => continuousMultilinearCurryFin1 ℝ E F (p y 1)
8990
have hder : ∀ y ∈ s, HasFDerivWithinAt f (f' y) s y := fun y hy =>
90-
(hf.hasFDerivWithinAt le_rfl (subset_insert x s hy)).mono (subset_insert x s)
91+
(hf.hasFDerivWithinAt one_ne_zero (subset_insert x s hy)).mono (subset_insert x s)
9192
have hcont : ContinuousWithinAt f' s x :=
9293
(continuousMultilinearCurryFin1 ℝ E F).continuousAt.comp_continuousWithinAt
9394
((hf.cont _ le_rfl _ (mem_insert _ _)).mono (subset_insert x s))
@@ -125,12 +126,12 @@ theorem ContDiffWithinAt.exists_lipschitzOnWith {E F : Type*} [NormedAddCommGrou
125126
theorem ContDiffAt.exists_lipschitzOnWith_of_nnnorm_lt {f : E' → F'} {x : E'}
126127
(hf : ContDiffAt 𝕂 1 f x) (K : ℝ≥0) (hK : ‖fderiv 𝕂 f x‖₊ < K) :
127128
∃ t ∈ 𝓝 x, LipschitzOnWith K f t :=
128-
(hf.hasStrictFDerivAt le_rfl).exists_lipschitzOnWith_of_nnnorm_lt K hK
129+
(hf.hasStrictFDerivAt one_ne_zero).exists_lipschitzOnWith_of_nnnorm_lt K hK
129130

130131
/-- If `f` is `C^1` at `x`, then `f` is Lipschitz in a neighborhood of `x`. -/
131132
theorem ContDiffAt.exists_lipschitzOnWith {f : E' → F'} {x : E'} (hf : ContDiffAt 𝕂 1 f x) :
132133
∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t :=
133-
(hf.hasStrictFDerivAt le_rfl).exists_lipschitzOnWith
134+
(hf.hasStrictFDerivAt one_ne_zero).exists_lipschitzOnWith
134135

135136
/-- If `f` is `C^1`, it is locally Lipschitz. -/
136137
lemma ContDiff.locallyLipschitz {f : E' → F'} (hf : ContDiff 𝕂 1 f) : LocallyLipschitz f := by
@@ -140,7 +141,7 @@ lemma ContDiff.locallyLipschitz {f : E' → F'} (hf : ContDiff 𝕂 1 f) : Local
140141

141142
/-- A `C^1` function with compact support is Lipschitz. -/
142143
theorem ContDiff.lipschitzWith_of_hasCompactSupport {f : E' → F'}
143-
(hf : HasCompactSupport f) (h'f : ContDiff 𝕂 n f) (hn : 1 ≤ n) :
144+
(hf : HasCompactSupport f) (h'f : ContDiff 𝕂 n f) (hn : n ≠ 0) :
144145
∃ C, LipschitzWith C f := by
145146
obtain ⟨C, hC⟩ := (hf.fderiv 𝕂).exists_bound_of_continuous (h'f.continuous_fderiv hn)
146147
refine ⟨⟨max C 0, le_max_right _ _⟩, ?_⟩

0 commit comments

Comments
 (0)