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

Commit 6aefa38

Browse files
committed
chore(topology/algebra/*,analysis/specific_limits): continuity of fpow (#8665)
* add more API lemmas about continuity of `x ^ n` for natural and integer `n`; * prove that `x⁻¹` and `x ^ n`, `n < 0`, are discontinuous at zero.
1 parent fddc1f4 commit 6aefa38

File tree

5 files changed

+77
-32
lines changed

5 files changed

+77
-32
lines changed

src/algebra/group/basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ inv_inv
190190
@[simp, to_additive]
191191
lemma inv_involutive : function.involutive (has_inv.inv : G → G) := inv_inv
192192

193+
@[simp, to_additive]
194+
lemma inv_surjective : function.surjective (has_inv.inv : G → G) :=
195+
inv_involutive.surjective
196+
193197
@[to_additive]
194198
lemma inv_injective : function.injective (has_inv.inv : G → G) :=
195199
inv_involutive.injective

src/analysis/fourier.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ section fourier
8787
continuous maps from `circle` to `ℂ`. -/
8888
@[simps] def fourier (n : ℤ) : C(circle, ℂ) :=
8989
{ to_fun := λ z, z ^ n,
90-
continuous_to_fun := continuous_subtype_coe.fpow nonzero_of_mem_circle n }
90+
continuous_to_fun := continuous_subtype_coe.fpow n $ λ z, or.inl (nonzero_of_mem_circle z) }
9191

9292
@[simp] lemma fourier_zero {z : circle} : fourier 0 z = 1 := rfl
9393

src/analysis/specific_limits.lean

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,40 @@ nat.sub_add_cancel (le_of_lt h) ▸
6969
tendsto_add_one_pow_at_top_at_top_of_pos (nat.sub_pos_of_lt h)
7070

7171
lemma tendsto_norm_zero' {𝕜 : Type*} [normed_group 𝕜] :
72-
tendsto (norm : 𝕜 → ℝ) (𝓝[{x | x ≠ 0}] 0) (𝓝[set.Ioi 0] 0) :=
72+
tendsto (norm : 𝕜 → ℝ) (𝓝[{0}ᶜ] 0) (𝓝[set.Ioi 0] 0) :=
7373
tendsto_norm_zero.inf $ tendsto_principal_principal.2 $ λ x hx, norm_pos_iff.2 hx
7474

75-
lemma normed_field.tendsto_norm_inverse_nhds_within_0_at_top {𝕜 : Type*} [normed_field 𝕜] :
76-
tendsto (λ x:𝕜, ∥x⁻¹∥) (𝓝[{x | x ≠ 0}] 0) at_top :=
75+
namespace normed_field
76+
77+
lemma tendsto_norm_inverse_nhds_within_0_at_top {𝕜 : Type*} [normed_field 𝕜] :
78+
tendsto (λ x:𝕜, ∥x⁻¹∥) (𝓝[{0}ᶜ] 0) at_top :=
7779
(tendsto_inv_zero_at_top.comp tendsto_norm_zero').congr $ λ x, (normed_field.norm_inv x).symm
7880

81+
lemma tendsto_norm_fpow_nhds_within_0_at_top {𝕜 : Type*} [normed_field 𝕜] {m : ℤ}
82+
(hm : m < 0) :
83+
tendsto (λ x : 𝕜, ∥x ^ m∥) (𝓝[{0}ᶜ] 0) at_top :=
84+
begin
85+
rcases neg_surjective m with ⟨m, rfl⟩,
86+
rw neg_lt_zero at hm, lift m to ℕ using hm.le, rw int.coe_nat_pos at hm,
87+
simp only [normed_field.norm_pow, fpow_neg, gpow_coe_nat, ← inv_pow'],
88+
exact (tendsto_pow_at_top hm).comp normed_field.tendsto_norm_inverse_nhds_within_0_at_top
89+
end
90+
91+
@[simp] lemma continuous_at_fpow {𝕜 : Type*} [nondiscrete_normed_field 𝕜] {m : ℤ} {x : 𝕜} :
92+
continuous_at (λ x, x ^ m) x ↔ x ≠ 00 ≤ m :=
93+
begin
94+
refine ⟨_, continuous_at_fpow _ _⟩,
95+
contrapose!, rintro ⟨rfl, hm⟩ hc,
96+
exact not_tendsto_at_top_of_tendsto_nhds (hc.tendsto.mono_left nhds_within_le_nhds).norm
97+
(tendsto_norm_fpow_nhds_within_0_at_top hm)
98+
end
99+
100+
@[simp] lemma continuous_at_inv {𝕜 : Type*} [nondiscrete_normed_field 𝕜] {x : 𝕜} :
101+
continuous_at has_inv.inv x ↔ x ≠ 0 :=
102+
by simpa [(@zero_lt_one ℤ _ _).not_le] using @continuous_at_fpow _ _ (-1) x
103+
104+
end normed_field
105+
79106
lemma tendsto_pow_at_top_nhds_0_of_lt_1 {𝕜 : Type*} [linear_ordered_field 𝕜] [archimedean 𝕜]
80107
[topological_space 𝕜] [order_topology 𝕜] {r : 𝕜} (h₁ : 0 ≤ r) (h₂ : r < 1) :
81108
tendsto (λn:ℕ, r^n) at_top (𝓝 0) :=

src/topology/algebra/group_with_zero.lean

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -206,44 +206,39 @@ section fpow
206206
variables [group_with_zero G₀] [topological_space G₀] [has_continuous_inv' G₀]
207207
[has_continuous_mul G₀]
208208

209-
lemma tendsto_fpow {x : G₀} (hx : x ≠ 0) (m : ℤ) : tendsto (λ x, x ^ m) (𝓝 x) (𝓝 (x ^ m)) :=
209+
lemma continuous_at_fpow (x : G₀) (m : ℤ) (h : x ≠ 00 ≤ m) : continuous_at (λ x, x ^ m) x :=
210210
begin
211-
have : ∀ y : G₀, ∀ m : ℤ, 0 < m → tendsto (λ x, x ^ m) (𝓝 y) (𝓝 (y ^ m)),
212-
{ assume y m hm,
213-
lift m to ℕ using (le_of_lt hm) with k,
214-
simp only [gpow_coe_nat],
215-
exact (continuous_pow k).continuous_at.tendsto },
216-
rcases lt_trichotomy m 0 with hm | hm | hm,
217-
{ have hm' : 0 < - m := by rwa neg_pos,
218-
convert (this _ (-m) hm').comp (tendsto_inv' hx) using 1,
219-
{ ext y,
220-
simp },
221-
{ congr' 1,
222-
simp } },
223-
{ simpa [hm] using tendsto_const_nhds },
224-
{ exact this _ m hm }
211+
cases m,
212+
{ simpa only [gpow_of_nat] using continuous_at_pow x m },
213+
{ simp only [gpow_neg_succ_of_nat],
214+
have hx : x ≠ 0, from h.resolve_right (int.neg_succ_of_nat_lt_zero m).not_le,
215+
exact (continuous_at_pow x (m + 1)).inv' (pow_ne_zero _ hx) }
225216
end
226217

227-
lemma continuous_at_fpow {x : G₀} (hx : x ≠ 0) (m : ℤ) : continuous_at (λ x, x ^ m) x :=
228-
tendsto_fpow hx m
229-
230218
lemma continuous_on_fpow (m : ℤ) : continuous_on (λ x : G₀, x ^ m) {0}ᶜ :=
231-
λ x hx, (continuous_at_fpow hx m).continuous_within_at
232-
233-
variables {f : α → G₀}
219+
λ x hx, (continuous_at_fpow _ _ (or.inl hx)).continuous_within_at
234220

235-
lemma filter.tendsto.fpow {l : filter α} {a : G₀} (hf : tendsto f l (𝓝 a)) (ha : a ≠ 0) (m : ℤ) :
221+
lemma filter.tendsto.fpow {f : α → G₀} {l : filter α} {a : G₀} (hf : tendsto f l (𝓝 a)) (m : ℤ)
222+
(h : a ≠ 00 ≤ m) :
236223
tendsto (λ x, (f x) ^ m) l (𝓝 (a ^ m)) :=
237-
(tendsto_fpow ha m).comp hf
224+
(continuous_at_fpow _ m h).tendsto.comp hf
238225

239-
variables [topological_space α] {a : α}
226+
variables {X : Type*} [topological_space X] {a : X} {s : set X} {f : X → G₀}
240227

241-
lemma continuous_at.fpow (hf : continuous_at f a) (ha : f a ≠ 0) (m : ℤ) :
228+
lemma continuous_at.fpow (hf : continuous_at f a) (m : ℤ) (h : f a ≠ 00 ≤ m) :
242229
continuous_at (λ x, (f x) ^ m) a :=
243-
(continuous_at_fpow ha m).comp hf
230+
hf.fpow m h
231+
232+
lemma continuous_within_at.fpow (hf : continuous_within_at f s a) (m : ℤ) (h : f a ≠ 00 ≤ m) :
233+
continuous_within_at (λ x, f x ^ m) s a :=
234+
hf.fpow m h
235+
236+
lemma continuous_on.fpow (hf : continuous_on f s) (m : ℤ) (h : ∀ a ∈ s, f a ≠ 00 ≤ m) :
237+
continuous_on (λ x, f x ^ m) s :=
238+
λ a ha, (hf a ha).fpow m (h a ha)
244239

245-
@[continuity] lemma continuous.fpow (hf : continuous f) (h0 : ∀ a, f a ≠ 0) (m : ℤ) :
240+
@[continuity] lemma continuous.fpow (hf : continuous f) (m : ℤ) (h0 : ∀ a, f a ≠ 00 ≤ m) :
246241
continuous (λ x, (f x) ^ m) :=
247-
continuous_iff_continuous_at.2 $ λ x, (hf.tendsto x).fpow (h0 x) m
242+
continuous_iff_continuous_at.2 $ λ x, (hf.tendsto x).fpow m (h0 x)
248243

249244
end fpow

src/topology/algebra/monoid.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,25 @@ lemma continuous.pow {f : X → M} (h : continuous f) (n : ℕ) :
278278
lemma continuous_on_pow {s : set M} (n : ℕ) : continuous_on (λ x, x ^ n) s :=
279279
(continuous_pow n).continuous_on
280280

281+
lemma continuous_at_pow (x : M) (n : ℕ) : continuous_at (λ x, x ^ n) x :=
282+
(continuous_pow n).continuous_at
283+
284+
lemma filter.tendsto.pow {l : filter α} {f : α → M} {x : M} (hf : tendsto f l (𝓝 x)) (n : ℕ) :
285+
tendsto (λ x, f x ^ n) l (𝓝 (x ^ n)) :=
286+
(continuous_at_pow _ _).tendsto.comp hf
287+
288+
lemma continuous_within_at.pow {f : X → M} {x : X} {s : set X} (hf : continuous_within_at f s x)
289+
(n : ℕ) : continuous_within_at (λ x, f x ^ n) s x :=
290+
hf.pow n
291+
292+
lemma continuous_at.pow {f : X → M} {x : X} (hf : continuous_at f x) (n : ℕ) :
293+
continuous_at (λ x, f x ^ n) x :=
294+
hf.pow n
295+
296+
lemma continuous_on.pow {f : X → M} {s : set X} (hf : continuous_on f s) (n : ℕ) :
297+
continuous_on (λ x, f x ^ n) s :=
298+
λ x hx, (hf x hx).pow n
299+
281300
end has_continuous_mul
282301

283302
section op

0 commit comments

Comments
 (0)