@@ -15,43 +15,6 @@ open classical function lattice filter finset metric
15
15
16
16
variables {α : Type *} {β : Type *} {ι : Type *}
17
17
18
- lemma has_sum_iff_cauchy [normed_group α] [complete_space α] {f : ι → α} :
19
- has_sum f ↔ ∀ε>0 , (∃s:finset ι, ∀t, disjoint t s → ∥ t.sum f ∥ < ε) :=
20
- begin
21
- refine iff.trans (cauchy_map_iff_exists_tendsto at_top_ne_bot).symm _,
22
- simp only [cauchy_map_iff, and_iff_right at_top_ne_bot, prod_at_top_at_top_eq, uniformity_dist,
23
- tendsto_infi, tendsto_at_top_principal, set.mem_set_of_eq],
24
- split,
25
- { assume h ε hε,
26
- rcases h ε hε with ⟨⟨s₁, s₂⟩, h⟩,
27
- use [s₁ ∪ s₂],
28
- assume t ht,
29
- have : (s₁ ∪ s₂) ∩ t = ∅ := finset.disjoint_iff_inter_eq_empty.1 ht.symm,
30
- specialize h (s₁ ∪ s₂, (s₁ ∪ s₂) ∪ t) ⟨le_sup_left, le_sup_left_of_le le_sup_right⟩,
31
- simpa only [finset.sum_union this , dist_eq_norm,
32
- sub_add_eq_sub_sub, sub_self, zero_sub, norm_neg] using h },
33
- { assume h' ε hε,
34
- rcases h' (ε / 2 ) (half_pos hε) with ⟨s, h⟩,
35
- use [(s, s)],
36
- rintros ⟨t₁, t₂⟩ ⟨ht₁, ht₂⟩,
37
- dsimp at ht₁ ht₂,
38
- calc dist (t₁.sum f) (t₂.sum f) = ∥sum (t₁ \ s) f - sum (t₂ \ s) f∥ :
39
- by simp only [(finset.sum_sdiff ht₁).symm, (finset.sum_sdiff ht₂).symm,
40
- dist_eq_norm, add_sub_add_right_eq_sub]
41
- ... ≤ ∥sum (t₁ \ s) f∥ + ∥ sum (t₂ \ s) f∥ : norm_triangle_sub
42
- ... < ε / 2 + ε / 2 : add_lt_add (h _ finset.disjoint_sdiff) (h _ finset.disjoint_sdiff)
43
- ... = ε : add_halves _ }
44
- end
45
-
46
- lemma has_sum_of_has_sum_norm [normed_group α] [complete_space α] {f : ι → α}
47
- (hf : has_sum (λa, norm (f a))) : has_sum f :=
48
- has_sum_iff_cauchy.2 $ assume ε hε,
49
- let ⟨s, hs⟩ := has_sum_iff_cauchy.1 hf ε hε in
50
- ⟨s, assume t ht,
51
- have ∥t.sum (λa, ∥f a∥)∥ < ε := hs t ht,
52
- have nn : 0 ≤ t.sum (λa, ∥f a∥) := finset.zero_le_sum (assume a _, norm_nonneg _),
53
- lt_of_le_of_lt (norm_triangle_sum t f) $ by rwa [real.norm_eq_abs, abs_of_nonneg nn] at this ⟩
54
-
55
18
lemma has_sum_of_absolute_convergence_real {f : ℕ → ℝ} (hf : ∀n, 0 ≤ f n) :
56
19
(∃r, tendsto (λn, (range n).sum (λi, abs (f i))) at_top (nhds r)) → has_sum f
57
20
| ⟨r, hr⟩ :=
@@ -142,28 +105,11 @@ begin
142
105
have hf : is_sum f ε := is_sum_geometric_two _,
143
106
have f0 : ∀ n, 0 < f n := λ n, div_pos (half_pos hε) (pow_pos two_pos _),
144
107
refine ⟨f ∘ encodable.encode, λ i, f0 _, _⟩,
145
- let g : ℕ → ℝ := λ n, option.cases_on (encodable.decode2 ι n) 0 (f ∘ encodable.encode),
146
- have : ∀ n, g n = 0 ∨ g n = f n,
147
- { intro n, dsimp [g], cases e : encodable.decode2 ι n with a,
148
- { exact or.inl rfl },
149
- { simp [encodable.mem_decode2.1 e] } },
150
- cases has_sum_of_has_sum_of_sub ⟨_, hf⟩ this with c hg,
151
- have cε : c ≤ ε,
152
- { refine is_sum_le (λ n, _) hg hf,
153
- cases this n; rw h, exact le_of_lt (f0 _) },
154
- have hs : ∀ n, g n ≠ 0 → (encodable.decode2 ι n).is_some,
155
- { intros n h, dsimp [g] at h,
156
- cases encodable.decode2 ι n,
157
- exact (h rfl).elim, exact rfl },
158
- refine ⟨c, _, cε⟩,
159
- refine is_sum_of_is_sum_ne_zero
160
- (λ n h, option.get (hs n h)) (λ n _, ne_of_gt (f0 _))
161
- (λ i _, encodable.encode i) (λ n h, ne_of_gt _)
162
- (λ n h, _) (λ i _, _) (λ i _, _) hg,
163
- { dsimp [g], rw encodable.encodek2, exact f0 _ },
164
- { exact encodable.mem_decode2.1 (option.get_mem _) },
165
- { exact option.get_of_mem _ (encodable.encodek2 _) },
166
- { dsimp [g], rw encodable.encodek2 }
108
+ rcases has_sum_comp_of_has_sum_of_injective f (has_sum_spec hf) (@encodable.encode_injective ι _)
109
+ with ⟨c, hg⟩,
110
+ refine ⟨c, hg, is_sum_le_inj _ (@encodable.encode_injective ι _) _ _ hg hf⟩,
111
+ { assume i _, exact le_of_lt (f0 _) },
112
+ { assume n, exact le_refl _ }
167
113
end
168
114
169
115
namespace nnreal
0 commit comments