Theorem: cauchy_product
File: Mathlib/Data/Complex/Exponential.lean

tactic: norm_num
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
⊢ 2 > 0

tactic: norm_num
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
⊢ 0 < 4

tactic: have h₁ :
  (∑ m in range K, ∑ k in range (m + 1), a k * b (m - k)) =
    ∑ m in range K, ∑ n in range (K - m), a m * b n :=
  by simpa using sum_range_diag_flip K fun m n => a m * b n
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have h₂ :
  (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k := by
  simp [Finset.mul_sum]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have h₃ :
  (∑ i in range K, a i * ∑ k in range (K - i), b k) =
    (∑ i in range K, a i * ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) +
      ∑ i in range K, a i * ∑ k in range K, b k :=
  by rw [← sum_add_distrib]; simp [(mul_add _ _ _).symm]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have two_mul_two : (4 : α) = 2 * 2 := by norm_num
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have hQ0 : Q ≠ 0 := fun h => by simp [h, lt_irrefl] at hQε0
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have h2Q0 : 2 * Q ≠ 0 := mul_ne_zero two_ne_zero hQ0
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε := by
  rw [← div_div, div_mul_cancel _ (Ne.symm (ne_of_lt hP0)), two_mul_two, mul_assoc, ← div_div,
    div_mul_cancel _ h2Q0, add_halves]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have hNMK : max N M + 1 < K :=
  lt_of_lt_of_le (by rw [two_mul]; exact lt_add_of_pos_left _ (Nat.succ_pos _)) hK
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have hKN : N < K :=
  calc
    N ≤ max N M := le_max_left _ _
    _ < max N M + 1 := (Nat.lt_succ_self _)
    _ < K := hNMK
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have hsumlesum :
  (∑ i in range (max N M + 1),
      abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: have hsumltP : (∑ n in range (max N M + 1), abv (a n)) < P :=
  calc
    (∑ n in range (max N M + 1), abv (a n)) = |∑ n in range (max N M + 1), abv (a n)| :=
      Eq.symm (abs_of_nonneg (sum_nonneg fun x _ => abv_nonneg abv (a x)))
    _ < P := hP (max N M + 1)
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: rw [h₁, h₂, h₃, sum_mul, ← sub_sub, sub_right_comm, sub_self, zero_sub, abv_neg abv]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ abv ((∑ k in range K, a k) * ∑ k in range K, b k - ∑ n in range K, ∑ m in range (n + 1), a m * b (n - m)) < ε

tactic: refine' lt_of_le_of_lt (abv_sum_le_sum_abv _ _) _
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ abv (∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k)) < ε

tactic: suffices
  (∑ i in range (max N M + 1),
        abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) +
      ((∑ i in range K, abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) -
        ∑ i in range (max N M + 1),
          abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) <
    ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) by
  rw [hε] at this
  simpa [abv_mul abv] using this
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ k in range K, abv (a k * (∑ k in range (K - k), b k - ∑ k in range K, b k)) < ε

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) +
      (∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -
        ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k)) <
    ε / (2 * P) * P + ε / (4 * Q) * (2 * Q)

tactic: rw [sum_range_sub_sum_range (le_of_lt hNMK)]
state_before: case h₂
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -
      ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) <
    ε / (4 * Q) * (2 * Q)

tactic: calc
  (∑ i in (range K).filter fun k => max N M + 1 ≤ k,
        abv (a i) * abv ((∑ k in range (K - i), b k) - ∑ k in range K, b k)) ≤
      ∑ i in (range K).filter fun k => max N M + 1 ≤ k, abv (a i) * (2 * Q) := by
      gcongr
      rw [sub_eq_add_neg]
      refine' le_trans (abv_add _ _ _) _
      rw [two_mul, abv_neg abv]
      gcongr <;> exact le_of_lt (hQ _)
  _ < ε / (4 * Q) * (2 * Q) := by
      rw [← sum_mul, ← sum_range_sub_sum_range (le_of_lt hNMK)]
      have := lt_of_le_of_lt (abv_nonneg _ _) (hQ 0)
      gcongr
      refine'
           lt_of_le_of_lt (le_abs_self _)
            (hM _ (le_trans (Nat.le_succ_of_le (le_max_right _ _)) (le_of_lt hNMK)) _
              (Nat.le_succ_of_le (le_max_right _ _)))
state_before: case h₂
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ k in filter (fun k => max N M + 1 ≤ k) (range K),
      abv (a k) * abv (∑ k in range (K - k), b k - ∑ k in range K, b k) <
    ε / (4 * Q) * (2 * Q)

tactic: simpa using sum_range_diag_flip K fun m n => a m * b n
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
⊢ ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n

tactic: simp [Finset.mul_sum]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
⊢ (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k

tactic: rw [← sum_add_distrib]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
⊢ ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k

tactic: simp [(mul_add _ _ _).symm]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
⊢ ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ x in range K, (a x * (∑ k in range (K - x), b k - ∑ k in range K, b k) + a x * ∑ k in range K, b k)

tactic: norm_num
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
⊢ 4 = 2 * 2

tactic: simp [h, lt_irrefl] at hQε0
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
h : Q = 0
⊢ False

tactic: rw [← div_div, div_mul_cancel _ (Ne.symm (ne_of_lt hP0)), two_mul_two, mul_assoc, ← div_div,
  div_mul_cancel _ h2Q0, add_halves]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε

tactic: rw [two_mul]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
⊢ max N M + 1 < 2 * (max N M + 1)

tactic: exact lt_add_of_pos_left _ (Nat.succ_pos _)
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
⊢ max N M + 1 < max N M + 1 + (max N M + 1)

tactic: gcongr with m hmJ
state_before: case hsumlesum
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
⊢ ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))

tactic: rw [two_mul]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
m : ℕ
hmJ : m ∈ range (max N M + 1)
⊢ m + N ≤ 2 * (max N M + 1)

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
m : ℕ
hmJ : m ∈ range (max N M + 1)
⊢ m + N ≤ max N M + 1 + (max N M + 1)

tactic: exact le_of_lt (mem_range.1 hmJ)
state_before: case h₁
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
m : ℕ
hmJ : m ∈ range (max N M + 1)
⊢ m ≤ max N M + 1

tactic: exact le_trans (le_max_left _ _) (le_of_lt (lt_add_one _))
state_before: case h₂
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
m : ℕ
hmJ : m ∈ range (max N M + 1)
⊢ N ≤ max N M + 1

tactic: rw [hε] at this
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
this :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) +
      (∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -
        ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k)) <
    ε / (2 * P) * P + ε / (4 * Q) * (2 * Q)
⊢ ∑ k in range K, abv (a k * (∑ k in range (K - k), b k - ∑ k in range K, b k)) < ε

tactic: simpa [abv_mul abv] using this
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
this :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) +
      (∑ i in range K, abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) -
        ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k)) <
    ε
⊢ ∑ k in range K, abv (a k * (∑ k in range (K - k), b k - ∑ k in range K, b k)) < ε

tactic: exact lt_of_le_of_lt hsumlesum
    (by rw [← sum_mul, mul_comm]; gcongr)
state_before: case h₁
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) < ε / (2 * P) * P

tactic: rw [← sum_mul, mul_comm]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P)) < ε / (2 * P) * P

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ε / (2 * P) * ∑ x in range (max N M + 1), abv (a x) < ε / (2 * P) * P

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ i in filter (fun k => max N M + 1 ≤ k) (range K),
      abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in filter (fun k => max N M + 1 ≤ k) (range K), abv (a i) * (2 * Q)

tactic: rw [sub_eq_add_neg]
state_before: case h.h
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
i✝ : ℕ
a✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)
⊢ abv (∑ k in range (K - i✝), b k - ∑ k in range K, b k) ≤ 2 * Q

tactic: refine' le_trans (abv_add _ _ _) _
state_before: case h.h
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
i✝ : ℕ
a✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)
⊢ abv (∑ k in range (K - i✝), b k + -∑ k in range K, b k) ≤ 2 * Q

tactic: rw [two_mul, abv_neg abv]
state_before: case h.h
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
i✝ : ℕ
a✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)
⊢ abv (∑ k in range (K - i✝), b k) + abv (-∑ k in range K, b k) ≤ 2 * Q

tactic: gcongr <;> exact le_of_lt (hQ _)
state_before: case h.h
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
i✝ : ℕ
a✝ : i✝ ∈ filter (fun k => max N M + 1 ≤ k) (range K)
⊢ abv (∑ k in range (K - i✝), b k) + abv (∑ k in range K, b k) ≤ Q + Q

tactic: rw [← sum_mul, ← sum_range_sub_sum_range (le_of_lt hNMK)]
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ ∑ i in filter (fun k => max N M + 1 ≤ k) (range K), abv (a i) * (2 * Q) < ε / (4 * Q) * (2 * Q)

tactic: have := lt_of_le_of_lt (abv_nonneg _ _) (hQ 0)
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
⊢ (∑ k in range K, abv (a k) - ∑ k in range (max N M + 1), abv (a k)) * (2 * Q) < ε / (4 * Q) * (2 * Q)

tactic: gcongr
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
this : 0 < Q
⊢ (∑ k in range K, abv (a k) - ∑ k in range (max N M + 1), abv (a k)) * (2 * Q) < ε / (4 * Q) * (2 * Q)

tactic: refine'
     lt_of_le_of_lt (le_abs_self _)
      (hM _ (le_trans (Nat.le_succ_of_le (le_max_right _ _)) (le_of_lt hNMK)) _
        (Nat.le_succ_of_le (le_max_right _ _)))
state_before: case bc
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
abv : β → α
inst✝¹ : Ring β
inst✝ : IsAbsoluteValue abv
a b : ℕ → β
ha : IsCauSeq abs' fun m => ∑ n in range m, abv (a n)
hb : IsCauSeq abv fun m => ∑ n in range m, b n
ε : α
ε0 : 0 < ε
Q : α
hQ : ∀ (i : ℕ), abv (↑{ val := fun m => ∑ n in range m, b n, property := hb } i) < Q
P : α
hP : ∀ (i : ℕ), abs' (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } i) < P
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN :
  ∀ (j : ℕ),
    j ≥ N →
      ∀ (k : ℕ),
        k ≥ N →
          abv
              (↑{ val := fun m => ∑ n in range m, b n, property := hb } j -
                ↑{ val := fun m => ∑ n in range m, b n, property := hb } k) <
            ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM :
  ∀ (j : ℕ),
    j ≥ M →
      ∀ (k : ℕ),
        k ≥ M →
          abs'
              (↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } j -
                ↑{ val := fun m => ∑ n in range m, abv (a n), property := ha } k) <
            ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ : ∑ m in range K, ∑ k in range (m + 1), a k * b (m - k) = ∑ m in range K, ∑ n in range (K - m), a m * b n
h₂ : (fun i => ∑ k in range (K - i), a i * b k) = fun i => a i * ∑ k in range (K - i), b k
h₃ :
  ∑ i in range K, a i * ∑ k in range (K - i), b k =
    ∑ i in range K, a i * (∑ k in range (K - i), b k - ∑ k in range K, b k) + ∑ i in range K, a i * ∑ k in range K, b k
two_mul_two : 4 = 2 * 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
hKN : N < K
hsumlesum :
  ∑ i in range (max N M + 1), abv (a i) * abv (∑ k in range (K - i), b k - ∑ k in range K, b k) ≤
    ∑ i in range (max N M + 1), abv (a i) * (ε / (2 * P))
hsumltP : ∑ n in range (max N M + 1), abv (a n) < P
this : 0 < Q
⊢ ∑ k in range K, abv (a k) - ∑ k in range (max N M + 1), abv (a k) < ε / (4 * Q)