Skip to content

Commit 38b244b

Browse files
committed
chore(*): rename lemmas about 𝓝[β‰₯] a etc (#20188)
See [Zulip poll](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/naming.20convention.3A.20.60.F0.9D.93.9D.5B.E2.89.A5.5D.20a.60.20etc) Also slightly golf some proofs that were broken by the renames and drop unneeded typeclass assumptions in lemmas `Set.OrdConnected.mem_nhds*`.
1 parent e820917 commit 38b244b

File tree

77 files changed

+960
-618
lines changed

Some content is hidden

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

77 files changed

+960
-618
lines changed

β€ŽCounterexamples/SorgenfreyLine.leanβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ theorem exists_Ico_disjoint_closed {a : ℝₗ} {s : Set ℝₗ} (hs : IsClosed
126126
@[simp]
127127
theorem map_toReal_nhds (a : ℝₗ) : map toReal (𝓝 a) = 𝓝[β‰₯] toReal a := by
128128
refine ((nhds_basis_Ico a).map _).eq_of_same_basis ?_
129-
simpa only [toReal.image_eq_preimage] using nhdsWithin_Ici_basis_Ico (toReal a)
129+
simpa only [toReal.image_eq_preimage] using nhdsGE_basis_Ico (toReal a)
130130

131131
theorem nhds_eq_map (a : ℝₗ) : 𝓝 a = map toReal.symm (𝓝[β‰₯] (toReal a)) := by
132132
simp_rw [← map_toReal_nhds, map_map, Function.comp_def, toReal.symm_apply_apply, map_id']

β€ŽMathlib/Analysis/Analytic/Basic.leanβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,14 +583,12 @@ theorem HasFPowerSeriesOnBall.unique (hf : HasFPowerSeriesOnBall f p x r)
583583
protected theorem HasFPowerSeriesWithinAt.eventually (hf : HasFPowerSeriesWithinAt f p s x) :
584584
βˆ€αΆ  r : ℝβ‰₯0∞ in 𝓝[>] 0, HasFPowerSeriesWithinOnBall f p s x r :=
585585
let ⟨_, hr⟩ := hf
586-
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
587-
hr.of_le hr'.1 hr'.2.le
586+
mem_of_superset (Ioo_mem_nhdsGT hr.r_pos) fun _ hr' => hr.of_le hr'.1 hr'.2.le
588587

589588
protected theorem HasFPowerSeriesAt.eventually (hf : HasFPowerSeriesAt f p x) :
590589
βˆ€αΆ  r : ℝβ‰₯0∞ in 𝓝[>] 0, HasFPowerSeriesOnBall f p x r :=
591590
let ⟨_, hr⟩ := hf
592-
mem_of_superset (Ioo_mem_nhdsWithin_Ioi (left_mem_Ico.2 hr.r_pos)) fun _ hr' =>
593-
hr.mono hr'.1 hr'.2.le
591+
mem_of_superset (Ioo_mem_nhdsGT hr.r_pos) fun _ hr' => hr.mono hr'.1 hr'.2.le
594592

595593
theorem HasFPowerSeriesOnBall.eventually_hasSum (hf : HasFPowerSeriesOnBall f p x r) :
596594
βˆ€αΆ  y in 𝓝 0, HasSum (fun n : β„• => p n fun _ : Fin n => y) (f (x + y)) := by

β€ŽMathlib/Analysis/Asymptotics/SpecificAsymptotics.leanβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ theorem Filter.IsBoundedUnder.isLittleO_sub_self_inv {π•œ E : Type*} [NormedFie
2828
f =o[𝓝[β‰ ] a] fun x => (x - a)⁻¹ := by
2929
refine (h.isBigO_const (one_ne_zero' ℝ)).trans_isLittleO (isLittleO_const_left.2 <| Or.inr ?_)
3030
simp only [Function.comp_def, norm_inv]
31-
exact (tendsto_norm_sub_self_punctured_nhds a).inv_tendsto_zero
31+
exact (tendsto_norm_sub_self_nhdsNE a).inv_tendsto_nhdsGT_zero
3232

3333
end NormedField
3434

β€ŽMathlib/Analysis/BoxIntegral/DivergenceTheorem.leanβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@ theorem hasIntegral_GP_pderiv (f : (Fin (n + 1) β†’ ℝ) β†’ E)
176176
have : βˆ€αΆ  Ξ΄ in 𝓝[>] (0 : ℝ), Ξ΄ ∈ Ioc (0 : ℝ) (1 / 2) ∧
177177
(βˆ€α΅‰ (y₁ ∈ closedBall x Ξ΄ ∩ (Box.Icc I)) (yβ‚‚ ∈ closedBall x Ξ΄ ∩ (Box.Icc I)),
178178
β€–f y₁ - f yβ‚‚β€– ≀ Ξ΅ / 2) ∧ (2 * Ξ΄) ^ (n + 1) * β€–f' x (Pi.single i 1)β€– ≀ Ξ΅ / 2 := by
179-
refine .and ?_ (.and ?_ ?_)
180-
· exact Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, one_half_pos⟩
179+
refine .and (Ioc_mem_nhdsGT one_half_pos) (.and ?_ ?_)
181180
Β· rcases ((nhdsWithin_hasBasis nhds_basis_closedBall _).tendsto_iff nhds_basis_closedBall).1
182181
(Hs x hx.2) _ (half_pos <| half_pos Ξ΅0) with βŸ¨Ξ΄β‚, δ₁0, hΞ΄β‚βŸ©
183-
filter_upwards [Ioc_mem_nhdsWithin_Ioi ⟨le_rfl, δ₁0⟩] with Ξ΄ hΞ΄ y₁ hy₁ yβ‚‚ hyβ‚‚
182+
filter_upwards [Ioc_mem_nhdsGT δ₁0] with Ξ΄ hΞ΄ y₁ hy₁ yβ‚‚ hyβ‚‚
184183
have : closedBall x Ξ΄ ∩ (Box.Icc I) βŠ† closedBall x δ₁ ∩ (Box.Icc I) := by gcongr; exact hΞ΄.2
185184
rw [← dist_eq_norm]
186185
calc

β€ŽMathlib/Analysis/Calculus/Deriv/Slope.leanβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ alias ⟨HasDerivAt.tendsto_slope_zero, _⟩ := hasDerivAt_iff_tendsto_slope_zer
7979

8080
theorem HasDerivAt.tendsto_slope_zero_right [PartialOrder π•œ] (h : HasDerivAt f f' x) :
8181
Tendsto (fun t ↦ t⁻¹ β€’ (f (x + t) - f x)) (𝓝[>] 0) (𝓝 f') :=
82-
h.tendsto_slope_zero.mono_left (nhds_right'_le_nhds_ne 0)
82+
h.tendsto_slope_zero.mono_left (nhdsGT_le_nhdsNE 0)
8383

8484
theorem HasDerivAt.tendsto_slope_zero_left [PartialOrder π•œ] (h : HasDerivAt f f' x) :
8585
Tendsto (fun t ↦ t⁻¹ β€’ (f (x + t) - f x)) (𝓝[<] 0) (𝓝 f') :=
86-
h.tendsto_slope_zero.mono_left (nhds_left'_le_nhds_ne 0)
86+
h.tendsto_slope_zero.mono_left (nhdsLT_le_nhdsNE 0)
8787

8888
/-- Given a set `t` such that `s ∩ t` is dense in `s`, then the range of `derivWithin f s` is
8989
contained in the closure of the submodule spanned by the image of `t`. -/

β€ŽMathlib/Analysis/Calculus/FDeriv/Extend.leanβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ theorem hasDerivWithinAt_Ici_of_tendsto_deriv {s : Set ℝ} {e : E} {a : ℝ} {f
112112
setting of this theorem, we need to work on an open interval with closure contained in
113113
`s βˆͺ {a}`, that we call `t = (a, b)`. Then, we check all the assumptions of this theorem and
114114
we apply it. -/
115-
obtain ⟨b, ab : a < b, sab : Ioc a b βŠ† s⟩ := mem_nhdsWithin_Ioi_iff_exists_Ioc_subset.1 hs
115+
obtain ⟨b, ab : a < b, sab : Ioc a b βŠ† s⟩ := mem_nhdsGT_iff_exists_Ioc_subset.1 hs
116116
let t := Ioo a b
117117
have ts : t βŠ† s := Subset.trans Ioo_subset_Ioc_self sab
118118
have t_diff : DifferentiableOn ℝ f t := f_diff.mono ts
@@ -135,7 +135,7 @@ theorem hasDerivWithinAt_Ici_of_tendsto_deriv {s : Set ℝ} {e : E} {a : ℝ} {f
135135
have : HasDerivWithinAt f e (Icc a b) a := by
136136
rw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]
137137
exact hasFDerivWithinAt_closure_of_tendsto_fderiv t_diff t_conv t_open t_cont t_diff'
138-
exact this.mono_of_mem_nhdsWithin (Icc_mem_nhdsWithin_Ici <| left_mem_Ico.2 ab)
138+
exact this.mono_of_mem_nhdsWithin (Icc_mem_nhdsGE ab)
139139

140140
@[deprecated (since := "2024-07-10")] alias has_deriv_at_interval_left_endpoint_of_tendsto_deriv :=
141141
hasDerivWithinAt_Ici_of_tendsto_deriv
@@ -150,7 +150,7 @@ theorem hasDerivWithinAt_Iic_of_tendsto_deriv {s : Set ℝ} {e : E} {a : ℝ}
150150
setting of this theorem, we need to work on an open interval with closure contained in
151151
`s βˆͺ {a}`, that we call `t = (b, a)`. Then, we check all the assumptions of this theorem and we
152152
apply it. -/
153-
obtain ⟨b, ba, sab⟩ : βˆƒ b ∈ Iio a, Ico b a βŠ† s := mem_nhdsWithin_Iio_iff_exists_Ico_subset.1 hs
153+
obtain ⟨b, ba, sab⟩ : βˆƒ b ∈ Iio a, Ico b a βŠ† s := mem_nhdsLT_iff_exists_Ico_subset.1 hs
154154
let t := Ioo b a
155155
have ts : t βŠ† s := Subset.trans Ioo_subset_Ico_self sab
156156
have t_diff : DifferentiableOn ℝ f t := f_diff.mono ts
@@ -173,7 +173,7 @@ theorem hasDerivWithinAt_Iic_of_tendsto_deriv {s : Set ℝ} {e : E} {a : ℝ}
173173
have : HasDerivWithinAt f e (Icc b a) a := by
174174
rw [hasDerivWithinAt_iff_hasFDerivWithinAt, ← t_closure]
175175
exact hasFDerivWithinAt_closure_of_tendsto_fderiv t_diff t_conv t_open t_cont t_diff'
176-
exact this.mono_of_mem_nhdsWithin (Icc_mem_nhdsWithin_Iic <| right_mem_Ioc.2 ba)
176+
exact this.mono_of_mem_nhdsWithin (Icc_mem_nhdsLE ba)
177177

178178
@[deprecated (since := "2024-07-10")] alias has_deriv_at_interval_right_endpoint_of_tendsto_deriv :=
179179
hasDerivWithinAt_Iic_of_tendsto_deriv

β€ŽMathlib/Analysis/Calculus/FDeriv/Measurable.leanβ€Ž

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,28 +444,28 @@ with a derivative in `K`. -/
444444
def D (f : ℝ β†’ F) (K : Set F) : Set ℝ :=
445445
β‹‚ e : β„•, ⋃ n : β„•, β‹‚ (p β‰₯ n) (q β‰₯ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
446446

447-
theorem A_mem_nhdsWithin_Ioi {L : F} {r Ξ΅ x : ℝ} (hx : x ∈ A f L r Ξ΅) : A f L r Ξ΅ ∈ 𝓝[>] x := by
447+
theorem A_mem_nhdsGT {L : F} {r Ξ΅ x : ℝ} (hx : x ∈ A f L r Ξ΅) : A f L r Ξ΅ ∈ 𝓝[>] x := by
448448
rcases hx with ⟨r', rr', hr'⟩
449-
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset]
450449
obtain ⟨s, s_gt, s_lt⟩ : βˆƒ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1
451450
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩
452-
refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
451+
filter_upwards [Ioo_mem_nhdsGT <| show x < x + r' - s by linarith] with x' hx'
452+
use s, this
453453
have A : Icc x' (x' + s) βŠ† Icc x (x + r') := by
454454
apply Icc_subset_Icc hx'.1.le
455455
linarith [hx'.2]
456456
intro y hy z hz
457457
exact hr' y (A hy) z (A hz)
458458

459-
theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s Ξ΅ x : ℝ} (hx : x ∈ B f K r s Ξ΅) :
459+
theorem B_mem_nhdsGT {K : Set F} {r s Ξ΅ x : ℝ} (hx : x ∈ B f K r s Ξ΅) :
460460
B f K r s Ξ΅ ∈ 𝓝[>] x := by
461461
obtain ⟨L, LK, hL₁, hLβ‚‚βŸ© : βˆƒ L : F, L ∈ K ∧ x ∈ A f L r Ξ΅ ∧ x ∈ A f L s Ξ΅ := by
462462
simpa only [B, mem_iUnion, mem_inter_iff, exists_prop] using hx
463-
filter_upwards [A_mem_nhdsWithin_Ioi hL₁, A_mem_nhdsWithin_Ioi hLβ‚‚] with y hy₁ hyβ‚‚
463+
filter_upwards [A_mem_nhdsGT hL₁, A_mem_nhdsGT hLβ‚‚] with y hy₁ hyβ‚‚
464464
simp only [B, mem_iUnion, mem_inter_iff, exists_prop]
465465
exact ⟨L, LK, hy₁, hyβ‚‚βŸ©
466466

467467
theorem measurableSet_B {K : Set F} {r s Ξ΅ : ℝ} : MeasurableSet (B f K r s Ξ΅) :=
468-
measurableSet_of_mem_nhdsWithin_Ioi fun _ hx => B_mem_nhdsWithin_Ioi hx
468+
.of_mem_nhdsGT fun _ hx => B_mem_nhdsGT hx
469469

470470
theorem A_mono (L : F) (r : ℝ) {Ξ΅ Ξ΄ : ℝ} (h : Ξ΅ ≀ Ξ΄) : A f L r Ξ΅ βŠ† A f L r Ξ΄ := by
471471
rintro x ⟨r', r'r, hr'⟩
@@ -484,7 +484,7 @@ theorem mem_A_of_differentiable {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) {x : ℝ}
484484
βˆƒ R > 0, βˆ€ r ∈ Ioo (0 : ℝ) R, x ∈ A f (derivWithin f (Ici x) x) r Ξ΅ := by
485485
have := hx.hasDerivWithinAt
486486
simp_rw [hasDerivWithinAt_iff_isLittleO, isLittleO_iff] at this
487-
rcases mem_nhdsWithin_Ici_iff_exists_Ico_subset.1 (this (half_pos hΡ)) with ⟨m, xm, hm⟩
487+
rcases mem_nhdsGE_iff_exists_Ico_subset.1 (this (half_pos hΡ)) with ⟨m, xm, hm⟩
488488
refine ⟨m - x, by linarith [show x < m from xm], fun r hr => ?_⟩
489489
have : r ∈ Ioc (r / 2) r := ⟨half_lt_self hr.1, le_rfl⟩
490490
refine ⟨r, this, fun y hy z hz => ?_⟩
@@ -627,10 +627,7 @@ theorem D_subset_differentiable_set {K : Set F} (hK : IsComplete K) :
627627
intro Ξ΅ Ξ΅pos
628628
obtain ⟨e, he⟩ : βˆƒ e : β„•, (1 / 2) ^ e < Ξ΅ / 16 :=
629629
exists_pow_lt_of_lt_one (div_pos Ξ΅pos (by norm_num)) (by norm_num)
630-
have xmem : x ∈ Ico x (x + (1 / 2) ^ (n e + 1)) := by
631-
simp only [one_div, left_mem_Ico, lt_add_iff_pos_right, inv_pos, pow_pos, zero_lt_two,
632-
zero_lt_one]
633-
filter_upwards [Icc_mem_nhdsWithin_Ici xmem] with y hy
630+
filter_upwards [Icc_mem_nhdsGE <| show x < x + (1 / 2) ^ (n e + 1) by simp] with y hy
634631
-- We need to show that `f y - f x - f' (y - x)` is small. For this, we will work at scale
635632
-- `k` where `k` is chosen with `β€–y - xβ€– ∼ 2 ^ (-k)`.
636633
rcases eq_or_lt_of_le hy.1 with (rfl | xy)

β€ŽMathlib/Analysis/Calculus/FDeriv/Symmetric.leanβ€Ž

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ theorem Convex.taylor_approx_two_segment {v w : E} (hv : x + v ∈ interior s)
210210
apply (tendsto_order.1 this).2 Ξ΄
211211
simpa only [zero_mul] using Ξ΄pos
212212
have E2 : βˆ€αΆ  h in 𝓝[>] (0 : ℝ), (h : ℝ) < 1 :=
213-
mem_nhdsWithin_Ioi_iff_exists_Ioo_subset.2
214-
⟨(1 : ℝ), by simp only [mem_Ioi, zero_lt_one], fun x hx => hx.2⟩
213+
mem_nhdsWithin_of_mem_nhds <| Iio_mem_nhds zero_lt_one
215214
filter_upwards [E1, E2, self_mem_nhdsWithin] with h hΞ΄ h_lt_1 hpos
216215
-- we consider `h` small enough that all points under consideration belong to this ball,
217216
-- and also with `0 < h < 1`.

β€ŽMathlib/Analysis/Calculus/FirstDerivativeTest.leanβ€Ž

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ lemma isLocalMax_of_deriv' {f : ℝ β†’ ℝ} {b : ℝ} (h : ContinuousAt f b)
7777
(hdβ‚€ : βˆ€αΆ  x in 𝓝[<] b, DifferentiableAt ℝ f x) (hd₁ : βˆ€αΆ  x in 𝓝[>] b, DifferentiableAt ℝ f x)
7878
(hβ‚€ : βˆ€αΆ  x in 𝓝[<] b, 0 ≀ deriv f x) (h₁ : βˆ€αΆ  x in 𝓝[>] b, deriv f x ≀ 0) :
7979
IsLocalMax f b := by
80-
obtain ⟨a, ha⟩ := (nhdsWithin_Iio_basis' ⟨b - 1, sub_one_lt b⟩).eventually_iff.mp <| hdβ‚€.and hβ‚€
81-
obtain ⟨c, hc⟩ := (nhdsWithin_Ioi_basis' ⟨b + 1, lt_add_one b⟩).eventually_iff.mp <| hd₁.and h₁
80+
obtain ⟨a, ha⟩ := (nhdsLT_basis b).eventually_iff.mp <| hdβ‚€.and hβ‚€
81+
obtain ⟨c, hc⟩ := (nhdsGT_basis b).eventually_iff.mp <| hd₁.and h₁
8282
exact isLocalMax_of_deriv_Ioo ha.1 hc.1 h
8383
(fun _ hx => (ha.2 hx).1.differentiableWithinAt)
8484
(fun _ hx => (hc.2 hx).1.differentiableWithinAt)
@@ -90,8 +90,8 @@ lemma isLocalMin_of_deriv' {f : ℝ β†’ ℝ} {b : ℝ} (h : ContinuousAt f b)
9090
(hdβ‚€ : βˆ€αΆ  x in 𝓝[<] b, DifferentiableAt ℝ f x) (hd₁ : βˆ€αΆ  x in 𝓝[>] b, DifferentiableAt ℝ f x)
9191
(hβ‚€ : βˆ€αΆ  x in 𝓝[<] b, deriv f x ≀ 0) (h₁ : βˆ€αΆ  x in 𝓝[>] b, deriv f x β‰₯ 0) :
9292
IsLocalMin f b := by
93-
obtain ⟨a, ha⟩ := (nhdsWithin_Iio_basis' ⟨b - 1, sub_one_lt b⟩).eventually_iff.mp <| hdβ‚€.and hβ‚€
94-
obtain ⟨c, hc⟩ := (nhdsWithin_Ioi_basis' ⟨b + 1, lt_add_one b⟩).eventually_iff.mp <| hd₁.and h₁
93+
obtain ⟨a, ha⟩ := (nhdsLT_basis b).eventually_iff.mp <| hdβ‚€.and hβ‚€
94+
obtain ⟨c, hc⟩ := (nhdsGT_basis b).eventually_iff.mp <| hd₁.and h₁
9595
exact isLocalMin_of_deriv_Ioo ha.1 hc.1 h
9696
(fun _ hx => (ha.2 hx).1.differentiableWithinAt)
9797
(fun _ hx => (hc.2 hx).1.differentiableWithinAt)
@@ -102,13 +102,11 @@ theorem isLocalMax_of_deriv {f : ℝ β†’ ℝ} {b : ℝ} (h : ContinuousAt f b)
102102
(hd : βˆ€αΆ  x in 𝓝[β‰ ] b, DifferentiableAt ℝ f x)
103103
(hβ‚€ : βˆ€αΆ  x in 𝓝[<] b, 0 ≀ deriv f x) (h₁ : βˆ€αΆ  x in 𝓝[>] b, deriv f x ≀ 0) :
104104
IsLocalMax f b :=
105-
isLocalMax_of_deriv' h
106-
(nhds_left'_le_nhds_ne _ (by tauto)) (nhds_right'_le_nhds_ne _ (by tauto)) hβ‚€ h₁
105+
isLocalMax_of_deriv' h (nhdsLT_le_nhdsNE _ (by tauto)) (nhdsGT_le_nhdsNE _ (by tauto)) hβ‚€ h₁
107106

108107
/-- The First Derivative test, minimum version. -/
109108
theorem isLocalMin_of_deriv {f : ℝ β†’ ℝ} {b : ℝ} (h : ContinuousAt f b)
110109
(hd : βˆ€αΆ  x in 𝓝[β‰ ] b, DifferentiableAt ℝ f x)
111110
(hβ‚€ : βˆ€αΆ  x in 𝓝[<] b, deriv f x ≀ 0) (h₁ : βˆ€αΆ  x in 𝓝[>] b, 0 ≀ deriv f x) :
112111
IsLocalMin f b :=
113-
isLocalMin_of_deriv' h
114-
(nhds_left'_le_nhds_ne _ (by tauto)) (nhds_right'_le_nhds_ne _ (by tauto)) hβ‚€ h₁
112+
isLocalMin_of_deriv' h (nhdsLT_le_nhdsNE _ (by tauto)) (nhdsGT_le_nhdsNE _ (by tauto)) hβ‚€ h₁

β€ŽMathlib/Analysis/Calculus/LHopital.leanβ€Ž

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ theorem lhopital_zero_right_on_Ioo (hab : a < b) (hff' : βˆ€ x ∈ Ioo a b, HasD
5656
have hg : βˆ€ x ∈ Ioo a b, g x β‰  0 := by
5757
intro x hx h
5858
have : Tendsto g (𝓝[<] x) (𝓝 0) := by
59-
rw [← h, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hx.1]
59+
rw [← h, ← nhdsWithin_Ioo_eq_nhdsLT hx.1]
6060
exact ((hgg' x hx).continuousAt.continuousWithinAt.mono <| sub x hx).tendsto
6161
obtain ⟨y, hyx, hy⟩ : βˆƒ c ∈ Ioo a x, g' c = 0 :=
6262
exists_hasDerivAt_eq_zero' hx.1 hga this fun y hy => hgg' y <| sub x hx hy
@@ -76,7 +76,7 @@ theorem lhopital_zero_right_on_Ioo (hab : a < b) (hff' : βˆ€ x ∈ Ioo a b, HasD
7676
simp only [hβ‚‚]
7777
rw [mul_comm]
7878
have cmp : βˆ€ x ∈ Ioo a b, a < c x ∧ c x < x := fun x hx => (hc x hx).1
79-
rw [← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
79+
rw [← nhdsWithin_Ioo_eq_nhdsGT hab]
8080
apply tendsto_nhdsWithin_congr this
8181
apply hdiv.comp
8282
refine tendsto_nhdsWithin_of_tendsto_nhds_of_eventually_within _
@@ -95,9 +95,9 @@ theorem lhopital_zero_right_on_Ico (hab : a < b) (hff' : βˆ€ x ∈ Ioo a b, HasD
9595
(hdiv : Tendsto (fun x => f' x / g' x) (𝓝[>] a) l) :
9696
Tendsto (fun x => f x / g x) (𝓝[>] a) l := by
9797
refine lhopital_zero_right_on_Ioo hab hff' hgg' hg' ?_ ?_ hdiv
98-
Β· rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
98+
Β· rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsGT hab]
9999
exact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
100-
Β· rw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
100+
Β· rw [← hga, ← nhdsWithin_Ioo_eq_nhdsGT hab]
101101
exact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
102102

103103
theorem lhopital_zero_left_on_Ioo (hab : a < b) (hff' : βˆ€ x ∈ Ioo a b, HasDerivAt f (f' x) x)
@@ -116,11 +116,11 @@ theorem lhopital_zero_left_on_Ioo (hab : a < b) (hff' : βˆ€ x ∈ Ioo a b, HasDe
116116
intro x hx h
117117
apply hg' _ (by rw [← neg_Ioo] at hx; exact hx)
118118
rwa [mul_comm, ← neg_eq_neg_one_mul, neg_eq_zero] at h)
119-
(hfb.comp tendsto_neg_nhdsWithin_Ioi_neg) (hgb.comp tendsto_neg_nhdsWithin_Ioi_neg)
119+
(hfb.comp tendsto_neg_nhdsGT_neg) (hgb.comp tendsto_neg_nhdsGT_neg)
120120
(by
121121
simp only [neg_div_neg_eq, mul_one, mul_neg]
122-
exact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_nhdsWithin_Ioi_neg))
123-
have := this.comp tendsto_neg_nhdsWithin_Iio
122+
exact (tendsto_congr fun x => rfl).mp (hdiv.comp tendsto_neg_nhdsGT_neg))
123+
have := this.comp tendsto_neg_nhdsLT
124124
unfold Function.comp at this
125125
simpa only [neg_neg]
126126

@@ -130,9 +130,9 @@ theorem lhopital_zero_left_on_Ioc (hab : a < b) (hff' : βˆ€ x ∈ Ioo a b, HasDe
130130
(hdiv : Tendsto (fun x => f' x / g' x) (𝓝[<] b) l) :
131131
Tendsto (fun x => f x / g x) (𝓝[<] b) l := by
132132
refine lhopital_zero_left_on_Ioo hab hff' hgg' hg' ?_ ?_ hdiv
133-
Β· rw [← hfb, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hab]
133+
Β· rw [← hfb, ← nhdsWithin_Ioo_eq_nhdsLT hab]
134134
exact ((hcf b <| right_mem_Ioc.mpr hab).mono Ioo_subset_Ioc_self).tendsto
135-
Β· rw [← hgb, ← nhdsWithin_Ioo_eq_nhdsWithin_Iio hab]
135+
Β· rw [← hgb, ← nhdsWithin_Ioo_eq_nhdsLT hab]
136136
exact ((hcg b <| right_mem_Ioc.mpr hab).mono Ioo_subset_Ioc_self).tendsto
137137

138138
theorem lhopital_zero_atTop_on_Ioi (hff' : βˆ€ x ∈ Ioi a, HasDerivAt f (f' x) x)
@@ -153,17 +153,17 @@ theorem lhopital_zero_atTop_on_Ioi (hff' : βˆ€ x ∈ Ioi a, HasDerivAt f (f' x)
153153
intro x hx
154154
refine mul_ne_zero ?_ (neg_ne_zero.mpr <| inv_ne_zero <| pow_ne_zero _ <| fact1 x hx)
155155
exact hg' _ (fact2 x hx))
156-
(hftop.comp tendsto_inv_zero_atTop) (hgtop.comp tendsto_inv_zero_atTop)
156+
(hftop.comp tendsto_inv_nhdsGT_zero) (hgtop.comp tendsto_inv_nhdsGT_zero)
157157
(by
158-
refine (tendsto_congr' ?_).mp (hdiv.comp tendsto_inv_zero_atTop)
158+
refine (tendsto_congr' ?_).mp (hdiv.comp tendsto_inv_nhdsGT_zero)
159159
rw [eventuallyEq_iff_exists_mem]
160160
use Ioi 0, self_mem_nhdsWithin
161161
intro x hx
162162
unfold Function.comp
163163
simp only
164164
rw [mul_div_mul_right]
165165
exact neg_ne_zero.mpr (inv_ne_zero <| pow_ne_zero _ <| ne_of_gt hx))
166-
have := this.comp tendsto_inv_atTop_zero'
166+
have := this.comp tendsto_inv_atTop_nhdsGT_zero
167167
unfold Function.comp at this
168168
simpa only [inv_inv]
169169

@@ -213,9 +213,9 @@ theorem lhopital_zero_right_on_Ico (hab : a < b) (hdf : DifferentiableOn ℝ f (
213213
(hdiv : Tendsto (fun x => (deriv f) x / (deriv g) x) (𝓝[>] a) l) :
214214
Tendsto (fun x => f x / g x) (𝓝[>] a) l := by
215215
refine lhopital_zero_right_on_Ioo hab hdf hg' ?_ ?_ hdiv
216-
Β· rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
216+
Β· rw [← hfa, ← nhdsWithin_Ioo_eq_nhdsGT hab]
217217
exact ((hcf a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
218-
Β· rw [← hga, ← nhdsWithin_Ioo_eq_nhdsWithin_Ioi hab]
218+
Β· rw [← hga, ← nhdsWithin_Ioo_eq_nhdsGT hab]
219219
exact ((hcg a <| left_mem_Ico.mpr hab).mono Ioo_subset_Ico_self).tendsto
220220

221221
theorem lhopital_zero_left_on_Ioo (hab : a < b) (hdf : DifferentiableOn ℝ f (Ioo a b))
@@ -276,7 +276,7 @@ theorem lhopital_zero_nhds_right (hff' : βˆ€αΆ  x in 𝓝[>] a, HasDerivAt f (f'
276276
rcases hg' with ⟨s₃, hs₃, hg'⟩
277277
let s := s₁ ∩ sβ‚‚ ∩ s₃
278278
have hs : s ∈ 𝓝[>] a := inter_mem (inter_mem hs₁ hsβ‚‚) hs₃
279-
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset] at hs
279+
rw [mem_nhdsGT_iff_exists_Ioo_subset] at hs
280280
rcases hs with ⟨u, hau, hu⟩
281281
refine lhopital_zero_right_on_Ioo hau ?_ ?_ ?_ hfa hga hdiv <;>
282282
intro x hx <;> apply_assumption <;>
@@ -294,7 +294,7 @@ theorem lhopital_zero_nhds_left (hff' : βˆ€αΆ  x in 𝓝[<] a, HasDerivAt f (f'
294294
rcases hg' with ⟨s₃, hs₃, hg'⟩
295295
let s := s₁ ∩ sβ‚‚ ∩ s₃
296296
have hs : s ∈ 𝓝[<] a := inter_mem (inter_mem hs₁ hsβ‚‚) hs₃
297-
rw [mem_nhdsWithin_Iio_iff_exists_Ioo_subset] at hs
297+
rw [mem_nhdsLT_iff_exists_Ioo_subset] at hs
298298
rcases hs with ⟨l, hal, hl⟩
299299
refine lhopital_zero_left_on_Ioo hal ?_ ?_ ?_ hfa hga hdiv <;> intro x hx <;> apply_assumption <;>
300300
first | exact (hl hx).1.1| exact (hl hx).1.2| exact (hl hx).2

0 commit comments

Comments
Β (0)