l3lab/ntp-mathlib huggingface dataset:
theorem HasSum.pos_add_zero_add_neg {b : α} {f : ℤ → α} (hpos : HasSum (fun n : ℕ => f (n + 1)) a)
    (hneg : HasSum (fun n : ℕ => f (-n.succ)) b) : HasSum f (a + f 0 + b) :=
  haveI : ∀ g : ℕ → α, HasSum (fun k => g (k + 1)) a → HasSum g (a + g 0) := by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : AddCommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalAddGroup α
f✝ g : β → α
a a₁ a₂ b : α
f : ℤ → α
hpos : HasSum (fun n => f (↑n + 1)) a
hneg : HasSum (fun n => f (-↑(Nat.succ n))) b
⊢ ∀ (g : ℕ → α), HasSum (fun k => g (k + 1)) a → HasSum g (a + g 0)

Next tactic:
intro g hg
theorem HasSum.pos_add_zero_add_neg {b : α} {f : ℤ → α} (hpos : HasSum (fun n : ℕ => f (n + 1)) a)
    (hneg : HasSum (fun n : ℕ => f (-n.succ)) b) : HasSum f (a + f 0 + b) :=
  haveI : ∀ g : ℕ → α, HasSum (fun k => g (k + 1)) a → HasSum g (a + g 0) := by
    intro g hg
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : AddCommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalAddGroup α
f✝ g✝ : β → α
a a₁ a₂ b : α
f : ℤ → α
hpos : HasSum (fun n => f (↑n + 1)) a
hneg : HasSum (fun n => f (-↑(Nat.succ n))) b
g : ℕ → α
hg : HasSum (fun k => g (k + 1)) a
⊢ HasSum g (a + g 0)

Next tactic:
simpa using (hasSum_nat_add_iff _).mp hg
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
⊢ HasSum (fun n => f ↑n + f (-↑n)) (a + f 0)

Next tactic:
apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
⊢ ∃ v,
    ∀ (v' : Finset ℕ), v ⊆ v' → ∃ u', u ⊆ u' ∧ ∑ x in u', (f x + if x = 0 then f 0 else 0) = ∑ b in v', (f ↑b + f (-↑b))

Next tactic:
refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
⊢ ∃ u', u ⊆ u' ∧ ∑ x in u', (f x + if x = 0 then f 0 else 0) = ∑ b in v', (f ↑b + f (-↑b))

Next tactic:
let u1 := v'.image fun x : ℕ => (x : ℤ)
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
⊢ ∃ u', u ⊆ u' ∧ ∑ x in u', (f x + if x = 0 then f 0 else 0) = ∑ b in v', (f ↑b + f (-↑b))

Next tactic:
let u2 := v'.image fun x : ℕ => -(x : ℤ)
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
⊢ ∃ u', u ⊆ u' ∧ ∑ x in u', (f x + if x = 0 then f 0 else 0) = ∑ b in v', (f ↑b + f (-↑b))

Next tactic:
have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · right
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [abs_of_nonpos h'x, Int.coe_natAbs, neg_neg]
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
⊢ u ⊆ u1 ∪ u2

Next tactic:
intro x hx
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
⊢ x ∈ u1 ∪ u2

Next tactic:
simp only [mem_union, mem_image, exists_prop]
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
⊢ (∃ a ∈ v', ↑a = x) ∨ ∃ a ∈ v', -↑a = x

Next tactic:
rcases le_total 0 x with (h'x | h'x)
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · 

Proof state:
case inl
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : 0 ≤ x
⊢ (∃ a ∈ v', ↑a = x) ∨ ∃ a ∈ v', -↑a = x

Next tactic:
left
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      

Proof state:
case inl.h
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : 0 ≤ x
⊢ ∃ a ∈ v', ↑a = x

Next tactic:
refine' ⟨Int.natAbs x, hv' _, _⟩
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · 

Proof state:
case inl.h.refine'_1
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : 0 ≤ x
⊢ Int.natAbs x ∈ image Int.natAbs u

Next tactic:
simp only [mem_image, exists_prop]
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        

Proof state:
case inl.h.refine'_1
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : 0 ≤ x
⊢ ∃ a ∈ u, Int.natAbs a = Int.natAbs x

Next tactic:
exact ⟨x, hx, rfl⟩
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · 

Proof state:
case inl.h.refine'_2
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : 0 ≤ x
⊢ ↑(Int.natAbs x) = x

Next tactic:
simp only [h'x, Int.coe_natAbs, abs_eq_self]
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · 

Proof state:
case inr
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : x ≤ 0
⊢ (∃ a ∈ v', ↑a = x) ∨ ∃ a ∈ v', -↑a = x

Next tactic:
right
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · right
      

Proof state:
case inr.h
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : x ≤ 0
⊢ ∃ a ∈ v', -↑a = x

Next tactic:
refine' ⟨Int.natAbs x, hv' _, _⟩
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · right
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · 

Proof state:
case inr.h.refine'_1
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : x ≤ 0
⊢ Int.natAbs x ∈ image Int.natAbs u

Next tactic:
simp only [mem_image, exists_prop]
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · right
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        

Proof state:
case inr.h.refine'_1
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : x ≤ 0
⊢ ∃ a ∈ u, Int.natAbs a = Int.natAbs x

Next tactic:
exact ⟨x, hx, rfl⟩
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · right
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · 

Proof state:
case inr.h.refine'_2
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
x : ℤ
hx : x ∈ u
h'x : x ≤ 0
⊢ -↑(Int.natAbs x) = x

Next tactic:
simp only [abs_of_nonpos h'x, Int.coe_natAbs, neg_neg]
theorem HasSum.sum_nat_of_sum_int {α : Type*} [AddCommMonoid α] [TopologicalSpace α]
    [ContinuousAdd α] {a : α} {f : ℤ → α} (hf : HasSum f a) :
    HasSum (fun n : ℕ => f n + f (-n)) (a + f 0) := by
  apply (hf.add (hasSum_ite_eq (0 : ℤ) (f 0))).hasSum_of_sum_eq fun u => ?_
  refine' ⟨u.image Int.natAbs, fun v' hv' => _⟩
  let u1 := v'.image fun x : ℕ => (x : ℤ)
  let u2 := v'.image fun x : ℕ => -(x : ℤ)
  have A : u ⊆ u1 ∪ u2 := by
    intro x hx
    simp only [mem_union, mem_image, exists_prop]
    rcases le_total 0 x with (h'x | h'x)
    · left
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [h'x, Int.coe_natAbs, abs_eq_self]
    · right
      refine' ⟨Int.natAbs x, hv' _, _⟩
      · simp only [mem_image, exists_prop]
        exact ⟨x, hx, rfl⟩
      · simp only [abs_of_nonpos h'x, Int.coe_natAbs, neg_neg]
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : AddCommGroup α✝
inst✝⁴ : TopologicalSpace α✝
inst✝³ : TopologicalAddGroup α✝
f✝ g : β → α✝
a✝ a₁ a₂ : α✝
α : Type u_5
inst✝² : AddCommMonoid α
inst✝¹ : TopologicalSpace α
inst✝ : ContinuousAdd α
a : α
f : ℤ → α
hf : HasSum f a
u : Finset ℤ
v' : Finset ℕ
hv' : image Int.natAbs u ⊆ v'
u1 : Finset ℤ := image (fun x => ↑x) v'
u2 : Finset ℤ := image (fun x => -↑x) v'
A : u ⊆ u1 ∪ u2
⊢ ∃ u', u ⊆ u' ∧ ∑ x in u', (f x + if x = 0 then f 0 else 0) = ∑ b in v', (f ↑b + f (-↑b))

Next tactic:
refine' ⟨u1 ∪ u2, A, _⟩