l3lab/ntp-mathlib huggingface dataset:
theorem sum_add_tsum_subtype_compl [T2Space α] {f : β → α} (hf : Summable f) (s : Finset β) :
    ∑ x in s, f x + ∑' x : { x // x ∉ s }, f x = ∑' x, f x := by
  rw [← tsum_subtype_add_tsum_subtype_compl hf s]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : AddCommGroup α
inst✝³ : UniformSpace α
inst✝² : UniformAddGroup α
f✝ g : β → α
a a₁ a₂ : α
inst✝¹ : CompleteSpace α
inst✝ : T2Space α
f : β → α
hf : Summable f
s : Finset β
⊢ ∑ x in s, f x + ∑' (x : { x // x ∉ s }), f ↑x = ∑' (x : ↑↑s), f ↑x + ∑' (x : ↑(↑s)ᶜ), f ↑x

Next tactic:
simp only [Finset.tsum_subtype', add_right_inj]
theorem sum_add_tsum_subtype_compl [T2Space α] {f : β → α} (hf : Summable f) (s : Finset β) :
    ∑ x in s, f x + ∑' x : { x // x ∉ s }, f x = ∑' x, f x := by
  rw [← tsum_subtype_add_tsum_subtype_compl hf s]
  simp only [Finset.tsum_subtype', add_right_inj]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : AddCommGroup α
inst✝³ : UniformSpace α
inst✝² : UniformAddGroup α
f✝ g : β → α
a a₁ a₂ : α
inst✝¹ : CompleteSpace α
inst✝ : T2Space α
f : β → α
hf : Summable f
s : Finset β
⊢ ∑' (x : { x // x ∉ s }), f ↑x = ∑' (x : ↑(↑s)ᶜ), f ↑x

Next tactic:
rfl
theorem Summable.vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 (0 : G)) :
    ∃ s : Finset α, ∀ t, Disjoint t s → (∑ k in t, f k) ∈ e := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ ∃ s, ∀ (t : Finset α), Disjoint t s → ∑ k in t, f k ∈ e

Next tactic:
classical
  letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
  have : UniformAddGroup G := comm_topologicalAddGroup_is_uniform
  exact cauchySeq_finset_iff_vanishing.1 hf.hasSum.cauchySeq e he
theorem Summable.vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 (0 : G)) :
    ∃ s : Finset α, ∀ t, Disjoint t s → (∑ k in t, f k) ∈ e := by
  classical
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ ∃ s, ∀ (t : Finset α), Disjoint t s → ∑ k in t, f k ∈ e

Next tactic:
letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
theorem Summable.vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 (0 : G)) :
    ∃ s : Finset α, ∀ t, Disjoint t s → (∑ k in t, f k) ∈ e := by
  classical
  letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
this : UniformSpace G := TopologicalAddGroup.toUniformSpace G
⊢ ∃ s, ∀ (t : Finset α), Disjoint t s → ∑ k in t, f k ∈ e

Next tactic:
have : UniformAddGroup G := comm_topologicalAddGroup_is_uniform
theorem Summable.vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 (0 : G)) :
    ∃ s : Finset α, ∀ t, Disjoint t s → (∑ k in t, f k) ∈ e := by
  classical
  letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
  have : UniformAddGroup G := comm_topologicalAddGroup_is_uniform
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
this✝ : UniformSpace G := TopologicalAddGroup.toUniformSpace G
this : UniformAddGroup G
⊢ ∃ s, ∀ (t : Finset α), Disjoint t s → ∑ k in t, f k ∈ e

Next tactic:
exact cauchySeq_finset_iff_vanishing.1 hf.hasSum.cauchySeq e he
theorem Summable.tsum_vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 0) :
    ∃ s : Finset α, ∀ t : Set α, Disjoint t s → (∑' b : t, f b) ∈ e := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ ∃ s, ∀ (t : Set α), Disjoint t ↑s → ∑' (b : ↑t), f ↑b ∈ e

Next tactic:
classical
  letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
  have : UniformAddGroup G := comm_topologicalAddGroup_is_uniform
  exact cauchySeq_finset_iff_tsum_vanishing.1 hf.hasSum.cauchySeq e he
theorem Summable.tsum_vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 0) :
    ∃ s : Finset α, ∀ t : Set α, Disjoint t s → (∑' b : t, f b) ∈ e := by
  classical
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ ∃ s, ∀ (t : Set α), Disjoint t ↑s → ∑' (b : ↑t), f ↑b ∈ e

Next tactic:
letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
theorem Summable.tsum_vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 0) :
    ∃ s : Finset α, ∀ t : Set α, Disjoint t s → (∑' b : t, f b) ∈ e := by
  classical
  letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
this : UniformSpace G := TopologicalAddGroup.toUniformSpace G
⊢ ∃ s, ∀ (t : Set α), Disjoint t ↑s → ∑' (b : ↑t), f ↑b ∈ e

Next tactic:
have : UniformAddGroup G := comm_topologicalAddGroup_is_uniform
theorem Summable.tsum_vanishing (hf : Summable f) ⦃e : Set G⦄ (he : e ∈ 𝓝 0) :
    ∃ s : Finset α, ∀ t : Set α, Disjoint t s → (∑' b : t, f b) ∈ e := by
  classical
  letI : UniformSpace G := TopologicalAddGroup.toUniformSpace G
  have : UniformAddGroup G := comm_topologicalAddGroup_is_uniform
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
this✝ : UniformSpace G := TopologicalAddGroup.toUniformSpace G
this : UniformAddGroup G
⊢ ∃ s, ∀ (t : Set α), Disjoint t ↑s → ∑' (b : ↑t), f ↑b ∈ e

Next tactic:
exact cauchySeq_finset_iff_tsum_vanishing.1 hf.hasSum.cauchySeq e he
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
⊢ Tendsto (fun s => ∑' (a : { x // x ∉ s }), f ↑a) atTop (𝓝 0)

Next tactic:
classical
  by_cases H : Summable f
  · intro e he
    obtain ⟨s, hs⟩ := H.tsum_vanishing he
    rw [Filter.mem_map, mem_atTop_sets]
    exact ⟨s, fun t hts ↦ hs _ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
  · convert tendsto_const_nhds (α := G) (β := Finset α) (f := atTop) (a := 0)
    apply tsum_eq_zero_of_not_summable
    rwa [Finset.summable_compl_iff]
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
⊢ Tendsto (fun s => ∑' (a : { x // x ∉ s }), f ↑a) atTop (𝓝 0)

Next tactic:
by_cases H : Summable f
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : Summable f
⊢ Tendsto (fun s => ∑' (a : { x // x ∉ s }), f ↑a) atTop (𝓝 0)

Next tactic:
intro e he
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · intro e he
    

Proof state:
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ e ∈ Filter.map (fun s => ∑' (a : { x // x ∉ s }), f ↑a) atTop

Next tactic:
obtain ⟨s, hs⟩ := H.tsum_vanishing he
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · intro e he
    obtain ⟨s, hs⟩ := H.tsum_vanishing he
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : Summable f
e : Set G
he : e ∈ 𝓝 0
s : Finset α
hs : ∀ (t : Set α), Disjoint t ↑s → ∑' (b : ↑t), f ↑b ∈ e
⊢ e ∈ Filter.map (fun s => ∑' (a : { x // x ∉ s }), f ↑a) atTop

Next tactic:
rw [Filter.mem_map, mem_atTop_sets]
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · intro e he
    obtain ⟨s, hs⟩ := H.tsum_vanishing he
    rw [Filter.mem_map, mem_atTop_sets]
    

Proof state:
case pos.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : Summable f
e : Set G
he : e ∈ 𝓝 0
s : Finset α
hs : ∀ (t : Set α), Disjoint t ↑s → ∑' (b : ↑t), f ↑b ∈ e
⊢ ∃ a, ∀ b ≥ a, b ∈ (fun s => ∑' (a : { x // x ∉ s }), f ↑a) ⁻¹' e

Next tactic:
exact ⟨s, fun t hts ↦ hs _ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · intro e he
    obtain ⟨s, hs⟩ := H.tsum_vanishing he
    rw [Filter.mem_map, mem_atTop_sets]
    exact ⟨s, fun t hts ↦ hs _ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
  · 

Proof state:
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : ¬Summable f
⊢ Tendsto (fun s => ∑' (a : { x // x ∉ s }), f ↑a) atTop (𝓝 0)

Next tactic:
convert tendsto_const_nhds (α := G) (β := Finset α) (f := atTop) (a := 0)
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · intro e he
    obtain ⟨s, hs⟩ := H.tsum_vanishing he
    rw [Filter.mem_map, mem_atTop_sets]
    exact ⟨s, fun t hts ↦ hs _ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
  · convert tendsto_const_nhds (α := G) (β := Finset α) (f := atTop) (a := 0)
    

Proof state:
case h.e'_3.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : ¬Summable f
x✝ : Finset α
⊢ ∑' (a : { x // x ∉ x✝ }), f ↑a = 0

Next tactic:
apply tsum_eq_zero_of_not_summable
/-- The sum over the complement of a finset tends to `0` when the finset grows to cover the whole
space. This does not need a summability assumption, as otherwise all sums are zero. -/
theorem tendsto_tsum_compl_atTop_zero (f : α → G) :
    Tendsto (fun s : Finset α ↦ ∑' a : { x // x ∉ s }, f a) atTop (𝓝 0) := by
  classical
  by_cases H : Summable f
  · intro e he
    obtain ⟨s, hs⟩ := H.tsum_vanishing he
    rw [Filter.mem_map, mem_atTop_sets]
    exact ⟨s, fun t hts ↦ hs _ <| Set.disjoint_left.mpr fun a ha has ↦ ha (hts has)⟩
  · convert tendsto_const_nhds (α := G) (β := Finset α) (f := atTop) (a := 0)
    apply tsum_eq_zero_of_not_summable
    

Proof state:
case h.e'_3.h.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ f : α → G
H : ¬Summable f
x✝ : Finset α
⊢ ¬Summable fun b => f ↑b

Next tactic:
rwa [Finset.summable_compl_iff]
/-- Series divergence test: if `f` is a convergent series, then `f x` tends to zero along
`cofinite`. -/
theorem Summable.tendsto_cofinite_zero (hf : Summable f) : Tendsto f cofinite (𝓝 0) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
⊢ Tendsto f cofinite (𝓝 0)

Next tactic:
intro e he
/-- Series divergence test: if `f` is a convergent series, then `f x` tends to zero along
`cofinite`. -/
theorem Summable.tendsto_cofinite_zero (hf : Summable f) : Tendsto f cofinite (𝓝 0) := by
  intro e he
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ e ∈ Filter.map f cofinite

Next tactic:
rw [Filter.mem_map]
/-- Series divergence test: if `f` is a convergent series, then `f x` tends to zero along
`cofinite`. -/
theorem Summable.tendsto_cofinite_zero (hf : Summable f) : Tendsto f cofinite (𝓝 0) := by
  intro e he
  rw [Filter.mem_map]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
⊢ f ⁻¹' e ∈ cofinite

Next tactic:
rcases hf.vanishing he with ⟨s, hs⟩
/-- Series divergence test: if `f` is a convergent series, then `f x` tends to zero along
`cofinite`. -/
theorem Summable.tendsto_cofinite_zero (hf : Summable f) : Tendsto f cofinite (𝓝 0) := by
  intro e he
  rw [Filter.mem_map]
  rcases hf.vanishing he with ⟨s, hs⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
s : Finset α
hs : ∀ (t : Finset α), Disjoint t s → ∑ k in t, f k ∈ e
⊢ f ⁻¹' e ∈ cofinite

Next tactic:
refine' s.eventually_cofinite_nmem.mono fun x hx => _
/-- Series divergence test: if `f` is a convergent series, then `f x` tends to zero along
`cofinite`. -/
theorem Summable.tendsto_cofinite_zero (hf : Summable f) : Tendsto f cofinite (𝓝 0) := by
  intro e he
  rw [Filter.mem_map]
  rcases hf.vanishing he with ⟨s, hs⟩
  refine' s.eventually_cofinite_nmem.mono fun x hx => _
  · 

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f : α → G
hf : Summable f
e : Set G
he : e ∈ 𝓝 0
s : Finset α
hs : ∀ (t : Finset α), Disjoint t s → ∑ k in t, f k ∈ e
x : α
hx : x ∉ s
⊢ f x ∈ e

Next tactic:
simpa using hs {x} (disjoint_singleton_left.2 hx)
theorem Summable.tendsto_atTop_zero {f : ℕ → G} (hf : Summable f) : Tendsto f atTop (𝓝 0) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ : α → G
f : ℕ → G
hf : Summable f
⊢ Tendsto f atTop (𝓝 0)

Next tactic:
rw [← Nat.cofinite_eq_atTop]
theorem Summable.tendsto_atTop_zero {f : ℕ → G} (hf : Summable f) : Tendsto f atTop (𝓝 0) := by
  rw [← Nat.cofinite_eq_atTop]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝² : TopologicalSpace G
inst✝¹ : AddCommGroup G
inst✝ : TopologicalAddGroup G
f✝ : α → G
f : ℕ → G
hf : Summable f
⊢ Tendsto f cofinite (𝓝 0)

Next tactic:
exact hf.tendsto_cofinite_zero
theorem Summable.countable_support [FirstCountableTopology G] [T1Space G]
    (hf : Summable f) : f.support.Countable := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : FirstCountableTopology G
inst✝ : T1Space G
hf : Summable f
⊢ Set.Countable (support f)

Next tactic:
simpa only [ker_nhds] using hf.tendsto_cofinite_zero.countable_compl_preimage_ker
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
⊢ (Summable fun x => a) ↔ a = 0

Next tactic:
refine ⟨fun h ↦ ?_, ?_⟩
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · 

Proof state:
case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
h : Summable fun x => a
⊢ a = 0

Next tactic:
by_contra ha
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · by_contra ha
    

Proof state:
case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
h : Summable fun x => a
ha : ¬a = 0
⊢ False

Next tactic:
have : {a}ᶜ ∈ 𝓝 0 := compl_singleton_mem_nhds (Ne.symm ha)
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · by_contra ha
    have : {a}ᶜ ∈ 𝓝 0 := compl_singleton_mem_nhds (Ne.symm ha)
    

Proof state:
case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
h : Summable fun x => a
ha : ¬a = 0
this : {a}ᶜ ∈ 𝓝 0
⊢ False

Next tactic:
have : Finite β := by
      simpa [← Set.finite_univ_iff] using h.tendsto_cofinite_zero this
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · by_contra ha
    have : {a}ᶜ ∈ 𝓝 0 := compl_singleton_mem_nhds (Ne.symm ha)
    have : Finite β := by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
h : Summable fun x => a
ha : ¬a = 0
this : {a}ᶜ ∈ 𝓝 0
⊢ Finite β

Next tactic:
simpa [← Set.finite_univ_iff] using h.tendsto_cofinite_zero this
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · by_contra ha
    have : {a}ᶜ ∈ 𝓝 0 := compl_singleton_mem_nhds (Ne.symm ha)
    have : Finite β := by
      simpa [← Set.finite_univ_iff] using h.tendsto_cofinite_zero this
    

Proof state:
case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
h : Summable fun x => a
ha : ¬a = 0
this✝ : {a}ᶜ ∈ 𝓝 0
this : Finite β
⊢ False

Next tactic:
exact not_finite β
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · by_contra ha
    have : {a}ᶜ ∈ 𝓝 0 := compl_singleton_mem_nhds (Ne.symm ha)
    have : Finite β := by
      simpa [← Set.finite_univ_iff] using h.tendsto_cofinite_zero this
    exact not_finite β
  · 

Proof state:
case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
a : G
⊢ a = 0 → Summable fun x => a

Next tactic:
rintro rfl
theorem summable_const_iff [Infinite β] [T2Space G] (a : G) :
    Summable (fun _ : β ↦ a) ↔ a = 0 := by
  refine ⟨fun h ↦ ?_, ?_⟩
  · by_contra ha
    have : {a}ᶜ ∈ 𝓝 0 := compl_singleton_mem_nhds (Ne.symm ha)
    have : Finite β := by
      simpa [← Set.finite_univ_iff] using h.tendsto_cofinite_zero this
    exact not_finite β
  · rintro rfl
    

Proof state:
case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝⁴ : TopologicalSpace G
inst✝³ : AddCommGroup G
inst✝² : TopologicalAddGroup G
f : α → G
inst✝¹ : Infinite β
inst✝ : T2Space G
⊢ Summable fun x => 0

Next tactic:
exact summable_zero
@[simp]
theorem tsum_const [T2Space G] : ∑' _ : β, (a : G) = Nat.card β • a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝³ : TopologicalSpace G
inst✝² : AddCommGroup G
inst✝¹ : TopologicalAddGroup G
f : α → G
a : G
inst✝ : T2Space G
⊢ ∑' (x : β), a = Nat.card β • a

Next tactic:
rcases finite_or_infinite β with hβ|hβ
@[simp]
theorem tsum_const [T2Space G] : ∑' _ : β, (a : G) = Nat.card β • a := by
  rcases finite_or_infinite β with hβ|hβ
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝³ : TopologicalSpace G
inst✝² : AddCommGroup G
inst✝¹ : TopologicalAddGroup G
f : α → G
a : G
inst✝ : T2Space G
hβ : Finite β
⊢ ∑' (x : β), a = Nat.card β • a

Next tactic:
letI : Fintype β := Fintype.ofFinite β
@[simp]
theorem tsum_const [T2Space G] : ∑' _ : β, (a : G) = Nat.card β • a := by
  rcases finite_or_infinite β with hβ|hβ
  · letI : Fintype β := Fintype.ofFinite β
    

Proof state:
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝³ : TopologicalSpace G
inst✝² : AddCommGroup G
inst✝¹ : TopologicalAddGroup G
f : α → G
a : G
inst✝ : T2Space G
hβ : Finite β
this : Fintype β := Fintype.ofFinite β
⊢ ∑' (x : β), a = Nat.card β • a

Next tactic:
rw [tsum_eq_sum (s := univ) (fun x hx ↦ (hx (mem_univ x)).elim)]
@[simp]
theorem tsum_const [T2Space G] : ∑' _ : β, (a : G) = Nat.card β • a := by
  rcases finite_or_infinite β with hβ|hβ
  · letI : Fintype β := Fintype.ofFinite β
    rw [tsum_eq_sum (s := univ) (fun x hx ↦ (hx (mem_univ x)).elim)]
    

Proof state:
case inl
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
G : Type u_5
inst✝³ : TopologicalSpace G
inst✝² : AddCommGroup G
inst✝¹ : TopologicalAddGroup G
f : α → G
a : G
inst✝ : T2Space G
hβ : Finite β
this : Fintype β := Fintype.ofFinite β
⊢ ∑ b : β, a = Nat.card β • a

Next tactic:
simp only [sum_const, Nat.card_eq_fintype_card]