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

Commit 3329ec4

Browse files
chore(topology/algebra/*): tendsto namespacing (#6528)
Correct a few lemmas which I noticed were namespaced as `tendsto.***` rather than `filter.tendsto.***`, and thus couldn't be used with projection notation. Also use the projection notation, where now permitted. [Zulip](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Search.20for.20all.20declarations.20in.20a.20namespace) Co-authored-by: Patrick Massot <patrickmassot@free.fr>
1 parent 76aee25 commit 3329ec4

File tree

7 files changed

+23
-20
lines changed

7 files changed

+23
-20
lines changed

src/analysis/special_functions/exp_log.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ lemma tendsto_div_pow_mul_exp_add_at_top (b c : ℝ) (n : ℕ) (hb : 0 ≠ b) (h
750750
begin
751751
have H : ∀ d e, 0 < d → tendsto (λ (x:ℝ), x^n / (d * (exp x) + e)) at_top (𝓝 0),
752752
{ intros b' c' h,
753-
convert tendsto.inv_tendsto_at_top (tendsto_mul_exp_add_div_pow_at_top b' c' n h hn),
753+
convert (tendsto_mul_exp_add_div_pow_at_top b' c' n h hn).inv_tendsto_at_top ,
754754
ext x,
755755
simpa only [pi.inv_apply] using inv_div.symm },
756756
cases lt_or_gt_of_ne hb,

src/analysis/special_functions/polynomials.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ begin
8383
rw ← nat_degree_lt_nat_degree_iff hP at hdeg,
8484
refine (is_equivalent_at_top_div P Q).symm.tendsto_nhds _,
8585
rw ← mul_zero,
86-
refine tendsto.const_mul _ _,
87-
apply tendsto_fpow_at_top_zero,
86+
refine (tendsto_fpow_at_top_zero _).const_mul _,
8887
linarith
8988
end
9089

src/analysis/special_functions/pow.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ begin
138138
rw [log_zero, mul_zero],
139139
refine (has_strict_deriv_at_const _ 0).congr_of_eventually_eq _,
140140
exact (is_open_ne.eventually_mem h).mono (λ y hy, (zero_cpow hy).symm) },
141-
{ simpa only [cpow_def_of_ne_zero hx, mul_one]
141+
{ simpa only [cpow_def_of_ne_zero hx, mul_one]
142142
using ((has_strict_deriv_at_id y).const_mul (log x)).cexp }
143143
end
144144

@@ -516,10 +516,10 @@ end
516516
lemma mul_rpow {x y z : ℝ} (h : 0 ≤ x) (h₁ : 0 ≤ y) : (x*y)^z = x^z * y^z :=
517517
begin
518518
iterate 3 { rw real.rpow_def_of_nonneg }, split_ifs; simp * at *,
519-
{ have hx : 0 < x,
519+
{ have hx : 0 < x,
520520
{ cases lt_or_eq_of_le h with h₂ h₂, { exact h₂ },
521521
exfalso, apply h_2, exact eq.symm h₂ },
522-
have hy : 0 < y,
522+
have hy : 0 < y,
523523
{ cases lt_or_eq_of_le h₁ with h₂ h₂, { exact h₂ },
524524
exfalso, apply h_3, exact eq.symm h₂ },
525525
rw [log_mul (ne_of_gt hx) (ne_of_gt hy), add_mul, exp_add]},
@@ -957,7 +957,7 @@ end
957957
/-- The function `x ^ (-y)` tends to `0` at `+∞` for any positive real `y`. -/
958958
lemma tendsto_rpow_neg_at_top {y : ℝ} (hy : 0 < y) : tendsto (λ x : ℝ, x ^ (-y)) at_top (𝓝 0) :=
959959
tendsto.congr' (eventually_eq_of_mem (Ioi_mem_at_top 0) (λ x hx, (rpow_neg (le_of_lt hx) y).symm))
960-
(tendsto.inv_tendsto_at_top (tendsto_rpow_at_top hy))
960+
(tendsto_rpow_at_top hy).inv_tendsto_at_top
961961

962962
/-- The function `x ^ (a / (b * x + c))` tends to `1` at `+∞`, for any real numbers `a`, `b`, and
963963
`c` such that `b` is nonzero. -/

src/analysis/special_functions/trigonometric.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2695,8 +2695,8 @@ begin
26952695
{ refine tendsto_inf.2 ⟨tendsto.mono_left _ inf_le_left, tendsto_principal.2 _⟩,
26962696
exacts [continuous_cos.tendsto' x 0 hx,
26972697
hx ▸ (has_deriv_at_cos _).eventually_ne (neg_ne_zero.2 A)] },
2698-
exact tendsto.mul_at_top (norm_pos_iff.2 A) continuous_sin.continuous_within_at.norm
2699-
(tendsto.inv_tendsto_zero $ tendsto_norm_nhds_within_zero.comp B),
2698+
exact continuous_sin.continuous_within_at.norm.mul_at_top (norm_pos_iff.2 A)
2699+
(tendsto_norm_nhds_within_zero.comp B).inv_tendsto_zero,
27002700
end
27012701

27022702
lemma tendsto_abs_tan_at_top (k : ℤ) :
@@ -3038,7 +3038,7 @@ end
30383038

30393039
lemma tendsto_tan_pi_div_two : tendsto tan (𝓝[Iio (π/2)] (π/2)) at_top :=
30403040
begin
3041-
convert (tendsto.inv_tendsto_zero tendsto_cos_pi_div_two).at_top_mul zero_lt_one
3041+
convert tendsto_cos_pi_div_two.inv_tendsto_zero.at_top_mul zero_lt_one
30423042
tendsto_sin_pi_div_two,
30433043
simp only [pi.inv_apply, ← div_eq_inv_mul, ← tan_eq_sin_div_cos]
30443044
end
@@ -3056,7 +3056,7 @@ end
30563056

30573057
lemma tendsto_tan_neg_pi_div_two : tendsto tan (𝓝[Ioi (-(π/2))] (-(π/2))) at_bot :=
30583058
begin
3059-
convert (tendsto.inv_tendsto_zero tendsto_cos_neg_pi_div_two).at_top_mul_neg (by norm_num)
3059+
convert tendsto_cos_neg_pi_div_two.inv_tendsto_zero.at_top_mul_neg (by norm_num)
30603060
tendsto_sin_neg_pi_div_two,
30613061
simp only [pi.inv_apply, ← div_eq_inv_mul, ← tan_eq_sin_div_cos]
30623062
end

src/data/real/pi.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ begin
189189
-- constructed from `u` tends to `0` at `+∞`
190190
let u := λ k : ℕ, (k:nnreal) ^ (-1 / (2 * (k:ℝ) + 1)),
191191
have H : tendsto (λ k : ℕ, (1:ℝ) - (u k) + (u k) ^ (2 * (k:ℝ) + 1)) at_top (𝓝 0),
192-
{ convert (tendsto.const_add (1:ℝ) (((tendsto_rpow_div_mul_add (-1) 2 1 (by norm_num)).neg).add
193-
tendsto_inv_at_top_zero)).comp tendsto_coe_nat_at_top_at_top,
192+
{ convert (((tendsto_rpow_div_mul_add (-1) 2 1 $ by norm_num).neg.const_add 1).add
193+
tendsto_inv_at_top_zero).comp tendsto_coe_nat_at_top_at_top,
194194
{ ext k,
195195
simp only [nnreal.coe_nat_cast, function.comp_app, nnreal.coe_rpow],
196196
rw [← rpow_mul (nat.cast_nonneg k) ((-1)/(2*(k:ℝ)+1)) (2*(k:ℝ)+1),

src/topology/algebra/monoid.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ lemma filter.tendsto.mul {f : α → M} {g : α → M} {x : filter α} {a b : M}
7676
tendsto_mul.comp (hf.prod_mk_nhds hg)
7777

7878
@[to_additive]
79-
lemma tendsto.const_mul (b : M) {c : M} {f : α → M} {l : filter α}
79+
lemma filter.tendsto.const_mul (b : M) {c : M} {f : α → M} {l : filter α}
8080
(h : tendsto (λ (k:α), f k) l (𝓝 c)) : tendsto (λ (k:α), b * f k) l (𝓝 (b * c)) :=
8181
tendsto_const_nhds.mul h
8282

8383
@[to_additive]
84-
lemma tendsto.mul_const (b : M) {c : M} {f : α → M} {l : filter α}
84+
lemma filter.tendsto.mul_const (b : M) {c : M} {f : α → M} {l : filter α}
8585
(h : tendsto (λ (k:α), f k) l (𝓝 c)) : tendsto (λ (k:α), f k * b) l (𝓝 (c * b)) :=
8686
h.mul tendsto_const_nhds
8787

src/topology/algebra/ordered.lean

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,13 @@ lemma continuous_min : continuous (λ p : α × α, min p.1 p.2) := continuous_f
568568

569569
lemma continuous_max : continuous (λ p : α × α, max p.1 p.2) := continuous_fst.max continuous_snd
570570

571-
lemma tendsto.max {b : filter β} {a₁ a₂ : α} (hf : tendsto f b (𝓝 a₁)) (hg : tendsto g b (𝓝 a₂)) :
571+
lemma filter.tendsto.max {b : filter β} {a₁ a₂ : α} (hf : tendsto f b (𝓝 a₁))
572+
(hg : tendsto g b (𝓝 a₂)) :
572573
tendsto (λb, max (f b) (g b)) b (𝓝 (max a₁ a₂)) :=
573574
(continuous_max.tendsto (a₁, a₂)).comp (hf.prod_mk_nhds hg)
574575

575-
lemma tendsto.min {b : filter β} {a₁ a₂ : α} (hf : tendsto f b (𝓝 a₁)) (hg : tendsto g b (𝓝 a₂)) :
576+
lemma filter.tendsto.min {b : filter β} {a₁ a₂ : α} (hf : tendsto f b (𝓝 a₁))
577+
(hg : tendsto g b (𝓝 a₂)) :
576578
tendsto (λb, min (f b) (g b)) b (𝓝 (min a₁ a₂)) :=
577579
(continuous_min.tendsto (a₁, a₂)).comp (hf.prod_mk_nhds hg)
578580

@@ -1599,16 +1601,18 @@ lemma filter.tendsto.div_at_top [has_continuous_mul α] {f g : β → α} {l : f
15991601
(h : tendsto f l (𝓝 a)) (hg : tendsto g l at_top) : tendsto (λ x, f x / g x) l (𝓝 0) :=
16001602
by { simp only [div_eq_mul_inv], exact mul_zero a ▸ h.mul (tendsto_inv_at_top_zero.comp hg) }
16011603

1602-
lemma tendsto.inv_tendsto_at_top (h : tendsto f l at_top) : tendsto (f⁻¹) l (𝓝 0) :=
1604+
lemma filter.tendsto.inv_tendsto_at_top (h : tendsto f l at_top) : tendsto (f⁻¹) l (𝓝 0) :=
16031605
tendsto_inv_at_top_zero.comp h
16041606

1605-
lemma tendsto.inv_tendsto_zero (h : tendsto f l (𝓝[set.Ioi 0] 0)) : tendsto (f⁻¹) l at_top :=
1607+
lemma filter.tendsto.inv_tendsto_zero (h : tendsto f l (𝓝[set.Ioi 0] 0)) :
1608+
tendsto (f⁻¹) l at_top :=
16061609
tendsto_inv_zero_at_top.comp h
16071610

16081611
/-- The function `x^(-n)` tends to `0` at `+∞` for any positive natural `n`.
16091612
A version for positive real powers exists as `tendsto_rpow_neg_at_top`. -/
16101613
lemma tendsto_pow_neg_at_top {n : ℕ} (hn : 1 ≤ n) : tendsto (λ x : α, x ^ (-(n:ℤ))) at_top (𝓝 0) :=
1611-
tendsto.congr (λ x, (fpow_neg x n).symm) (tendsto.inv_tendsto_at_top (tendsto_pow_at_top hn))
1614+
tendsto.congr (λ x, (fpow_neg x n).symm)
1615+
(filter.tendsto.inv_tendsto_at_top (tendsto_pow_at_top hn))
16121616

16131617
lemma tendsto_fpow_at_top_zero {n : ℤ} (hn : n < 0) :
16141618
tendsto (λ x : α, x^n) at_top (𝓝 0) :=

0 commit comments

Comments
 (0)