l3lab/ntp-mathlib huggingface dataset:
@[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)]
    simp only [sum_const, Nat.card_eq_fintype_card]
    

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 β
⊢ card univ • a = Fintype.card β • a

Next tactic:
rfl
@[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)]
    simp only [sum_const, Nat.card_eq_fintype_card]
    rfl
  · 

Proof state:
case inr
α : 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β : Infinite β
⊢ ∑' (x : β), a = Nat.card β • a

Next tactic:
simp only [Nat.card_eq_zero_of_infinite, zero_smul]
@[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)]
    simp only [sum_const, Nat.card_eq_fintype_card]
    rfl
  · simp only [Nat.card_eq_zero_of_infinite, zero_smul]
    

Proof state:
case inr
α : 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β : Infinite β
⊢ ∑' (x : β), a = 0

Next tactic:
rcases eq_or_ne a 0 with rfl|ha
@[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)]
    simp only [sum_const, Nat.card_eq_fintype_card]
    rfl
  · simp only [Nat.card_eq_zero_of_infinite, zero_smul]
    rcases eq_or_ne a 0 with rfl|ha
    · 

Proof state:
case inr.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
inst✝ : T2Space G
hβ : Infinite β
⊢ ∑' (x : β), 0 = 0

Next tactic:
simp
@[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)]
    simp only [sum_const, Nat.card_eq_fintype_card]
    rfl
  · simp only [Nat.card_eq_zero_of_infinite, zero_smul]
    rcases eq_or_ne a 0 with rfl|ha
    · simp
    · 

Proof state:
case inr.inr
α : 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β : Infinite β
ha : a ≠ 0
⊢ ∑' (x : β), a = 0

Next tactic:
apply tsum_eq_zero_of_not_summable
@[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)]
    simp only [sum_const, Nat.card_eq_fintype_card]
    rfl
  · simp only [Nat.card_eq_zero_of_infinite, zero_smul]
    rcases eq_or_ne a 0 with rfl|ha
    · simp
    · apply tsum_eq_zero_of_not_summable
      

Proof state:
case inr.inr.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 : α → G
a : G
inst✝ : T2Space G
hβ : Infinite β
ha : a ≠ 0
⊢ ¬Summable fun b => a

Next tactic:
simpa [summable_const_iff] using ha
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

Next tactic:
by_cases hf : Summable f
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : Summable f
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

Next tactic:
exact tsum_const_smul g hf
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

Next tactic:
rw [tsum_eq_zero_of_not_summable hf]
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
⊢ ∑' (i : β), g • f i = g • 0

Next tactic:
simp only [smul_zero]
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
⊢ ∑' (i : β), g • f i = 0

Next tactic:
let mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
⊢ ∑' (i : β), g • f i = 0

Next tactic:
apply tsum_eq_zero_of_not_summable
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
  apply tsum_eq_zero_of_not_summable
  

Proof state:
case neg.h
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
⊢ ¬Summable fun b => g • f b

Next tactic:
change ¬ Summable (mul_g ∘ f)
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
  apply tsum_eq_zero_of_not_summable
  change ¬ Summable (mul_g ∘ f)
  

Proof state:
case neg.h
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
⊢ ¬Summable (⇑mul_g ∘ f)

Next tactic:
rwa [Summable.map_iff_of_equiv mul_g]
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
  apply tsum_eq_zero_of_not_summable
  change ¬ Summable (mul_g ∘ f)
  rwa [Summable.map_iff_of_equiv mul_g]
  · 

Proof state:
case neg.h.hg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
⊢ Continuous ⇑mul_g

Next tactic:
apply continuous_const_smul
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a `Group`, but
  not requiring any summability hypothesis. -/
lemma tsum_const_smul' {γ : Type*} [Group γ] [DistribMulAction γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
  apply tsum_eq_zero_of_not_summable
  change ¬ Summable (mul_g ∘ f)
  rwa [Summable.map_iff_of_equiv mul_g]
  · apply continuous_const_smul
  · 

Proof state:
case neg.h.hg'
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : Group γ
inst✝² : DistribMulAction γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
mul_g : α ≃+ α := DistribMulAction.toAddEquiv α g
⊢ Continuous (EquivLike.inv mul_g)

Next tactic:
apply continuous_const_smul
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

Next tactic:
by_cases hf : Summable f
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : Summable f
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

Next tactic:
exact tsum_const_smul g hf
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
⊢ ∑' (i : β), g • f i = g • ∑' (i : β), f i

Next tactic:
rw [tsum_eq_zero_of_not_summable hf]
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
⊢ ∑' (i : β), g • f i = g • 0

Next tactic:
simp only [smul_zero]
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
⊢ ∑' (i : β), g • f i = 0

Next tactic:
by_cases hg : g = 0
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · 

Proof state:
case pos
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : g = 0
⊢ ∑' (i : β), g • f i = 0

Next tactic:
simp [hg]
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · simp [hg]
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : ¬g = 0
⊢ ∑' (i : β), g • f i = 0

Next tactic:
let mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · simp [hg]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
  

Proof state:
case neg
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : ¬g = 0
mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
⊢ ∑' (i : β), g • f i = 0

Next tactic:
apply tsum_eq_zero_of_not_summable
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · simp [hg]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
  apply tsum_eq_zero_of_not_summable
  

Proof state:
case neg.h
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : ¬g = 0
mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
⊢ ¬Summable fun b => g • f b

Next tactic:
change ¬ Summable (mul_g ∘ f)
/-- Infinite sums commute with scalar multiplication. Version for scalars living in a
  `DivisionRing`; no summability hypothesis. This could be made to work for a
  `[GroupWithZero γ]` if there was such a thing as `DistribMulActionWithZero`. -/
lemma tsum_const_smul'' {γ : Type*} [DivisionRing γ] [Module γ α] [ContinuousConstSMul γ α]
    [T2Space α] (g : γ) : ∑' (i : β), g • f i = g • ∑' (i : β), f i := by
  by_cases hf : Summable f
  · exact tsum_const_smul g hf
  rw [tsum_eq_zero_of_not_summable hf]
  simp only [smul_zero]
  by_cases hg : g = 0
  · simp [hg]
  let mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
  apply tsum_eq_zero_of_not_summable
  change ¬ Summable (mul_g ∘ f)
  

Proof state:
case neg.h
α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝⁸ : Monoid γ✝
inst✝⁷ : TopologicalSpace α
inst✝⁶ : AddCommMonoid α
inst✝⁵ : DistribMulAction γ✝ α
inst✝⁴ : ContinuousConstSMul γ✝ α
f : β → α
γ : Type u_5
inst✝³ : DivisionRing γ
inst✝² : Module γ α
inst✝¹ : ContinuousConstSMul γ α
inst✝ : T2Space α
g : γ
hf : ¬Summable f
hg : ¬g = 0
mul_g : α ≃+ α := DistribMulAction.toAddEquiv₀ α g hg
⊢ ¬Summable (⇑mul_g ∘ f)

Next tactic:
rwa [Summable.map_iff_of_equiv]