awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw₁ : ε / 2 + ε / (4 * Q) * (2 * Q) = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
rw₁ : ε / 2 + ε / (4 * Q) * (2 * Q) = ε
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw₂ : ε / 2 + ε / (HMul.hMul (α := α) 2 2 * Q) * (2 * Q) = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
rw₁ : ε / 2 + ε / (4 * Q) * (2 * Q) = ε
rw₂ : ε / 2 + ε / (HMul.hMul (α := α) 2 2 * Q) * (2 * Q) = ε
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw₃ : ε / 2 + ε / (2 * (2 * Q)) * (2 * Q) = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
rw₁ : ε / 2 + ε / (4 * Q) * (2 * Q) = ε
rw₂ : ε / 2 + ε / (HMul.hMul (α := α) 2 2 * Q) * (2 * Q) = ε
rw₃ : ε / 2 + ε / (2 * (2 * Q)) * (2 * Q) = ε
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw₄ : ε / 2 + ε / 2 / (2 * Q) * (2 * Q) = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
rw₁ : ε / 2 + ε / (4 * Q) * (2 * Q) = ε
rw₂ : ε / 2 + ε / (HMul.hMul (α := α) 2 2 * Q) * (2 * Q) = ε
rw₃ : ε / 2 + ε / (2 * (2 * Q)) * (2 * Q) = ε
rw₄ : ε / 2 + ε / 2 / (2 * Q) * (2 * Q) = ε
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw₅ : ε / 2 + ε / 2 = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
rw : ε / 2 / P * P + ε / (4 * Q) * (2 * Q) = ε
rw₁ : ε / 2 + ε / (4 * Q) * (2 * Q) = ε
rw₂ : ε / 2 + ε / (HMul.hMul (α := α) 2 2 * Q) * (2 * Q) = ε
rw₃ : ε / 2 + ε / (2 * (2 * Q)) * (2 * Q) = ε
rw₄ : ε / 2 + ε / 2 / (2 * Q) * (2 * Q) = ε
rw₅ : ε / 2 + ε / 2 = ε
⊢ ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
have rw₆ : ε = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (hypothesis)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
⊢ abv
      (HMul.hMul (α := β) (∑ k ∈ range K, f k) (∑ k ∈ range K, g k) -
        ∑ n ∈ range K, ∑ m ∈ range (n + 1), f m * g (n - m)) <
    ε
have hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
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]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 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)
have rw : max N M + 1 < max N M + 1 + (max N M + 1)
Tactic: rw [two_mul]
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (hypothesis)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
⊢ abv
      (HMul.hMul (α := β) (∑ k ∈ range K, f k) (∑ k ∈ range K, g k) -
        ∑ n ∈ range K, ∑ m ∈ range (n + 1), f m * g (n - m)) <
    ε
have hNMK : max N M + 1 < K
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
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (hypothesis)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 2 2
hQ0 : Q ≠ 0
h2Q0 : 2 * Q ≠ 0
hε : ε / (2 * P) * P + ε / (4 * Q) * (2 * Q) = ε
hNMK : max N M + 1 < K
⊢ abv
      (HMul.hMul (α := β) (∑ k ∈ range K, f k) (∑ k ∈ range K, g k) -
        ∑ n ∈ range K, ∑ m ∈ range (n + 1), f m * g (n - m)) <
    ε
have hKN : N < K
Tactic: have hKN : N < K :=
    calc
      N ≤ max N M := le_max_left _ _
      _ < max N M + 1 := Nat.lt_succ_self _
      _ < K := hNMK
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 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
⊢ LE.le.{u_1} (α := α)
    (∑ i ∈ range (max N M + 1), abv (f i) * abv (HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k)))
    (∑ i ∈ range (max N M + 1), abv (f i) * (ε / (2 * P)))
have h : ∀ (m : ℕ) (hmJ : m ∈ range (max N M + 1)),
  abv (HSub.hSub (α := β) (∑ k ∈ range (K - m), g k) (∑ k ∈ range K, g k)) ≤ ε / (2 * P)
Tactic: gcongr with m hmJ
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 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)
⊢ abv (HSub.hSub (α := β) (∑ k ∈ range (K - m), g k) (∑ k ∈ range K, g k)) ≤ ε / (2 * P)
have h : m + N ≤ 2 * (max N M + 1)
Tactic: refine le_of_lt <| hN (K - m) (le_tsub_of_add_le_left <| hK.trans' ?_) K hKN.le
-- Lean 4 proof step from Mathlib.Algebra.Order.CauSeq.BigOperators (goal)
Goal:
α : Type u_1
β : Type u_2
inst : Field α
inst_1 : LinearOrder α
inst_2 : IsStrictOrderedRing α
inst_3 : Ring β
abv : β → α
inst_4 : IsAbsoluteValue abv
f g : ℕ → β
ha : IsCauSeq.{u_1, u_1} (α := α) abs fun (m : ℕ) ↦ ∑ n ∈ range m, abv (f n)
hb : IsCauSeq abv fun (m : ℕ) ↦ ∑ n ∈ range m, g n
ε : α
ε0 : 0 < ε
P : α
hP : ∀ (i : ℕ), |∑ n ∈ range i, abv (f n)| < P
Q : α
hQ : ∀ (i : ℕ), abv (∑ n ∈ range i, g n) < Q
hP0 : 0 < P
hPε0 : 0 < ε / (2 * P)
N : ℕ
hN : ∀ j ≥ N, ∀ k ≥ N, abv (HSub.hSub (α := β) (∑ n ∈ range j, g n) (∑ n ∈ range k, g n)) < ε / (2 * P)
hQε0 : 0 < ε / (4 * Q)
M : ℕ
hM : ∀ j ≥ M, ∀ k ≥ M, |HSub.hSub (α := α) (∑ n ∈ range j, abv (f n)) (∑ n ∈ range k, abv (f n))| < ε / (4 * Q)
K : ℕ
hK : K ≥ 2 * (max N M + 1)
h₁ :
  Eq.{u_2 + 1} (α := β) (∑ m ∈ range K, ∑ k ∈ range (m + 1), f k * g (m - k))
    (∑ m ∈ range K, ∑ n ∈ range (K - m), f m * g n)
h₂ :
  Eq.{u_2 + 1} (α := (i : ℕ) → β) (fun (i : ℕ) ↦ ∑ k ∈ range (K - i), f i * g k) fun (i : ℕ) ↦
    f i * ∑ k ∈ range (K - i), g k
h₃ :
  ∑ i ∈ range K, f i * ∑ k ∈ range (K - i), g k =
    HAdd.hAdd (α := β) (∑ i ∈ range K, f i * HSub.hSub (α := β) (∑ k ∈ range (K - i), g k) (∑ k ∈ range K, g k))
      (∑ i ∈ range K, f i * ∑ k ∈ range K, g k)
two_mul_two : 4 = HMul.hMul (α := α) 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)
have h : m + N ≤ max N M + 1 + (max N M + 1)
Tactic: rw [two_mul]