If the limit of the sequence u(n) is a and c ∈ ℝ, then the limit of u(n)c is ac
In Lean, a sequence \(u_₀, u_₁, u_₂, ... \) can be represented by a function \(u : ℕ → ℝ\) such that \(u(n)\) is \(u_n\).
It is defined that \(a\) is the limit of the sequence \(u\), by
def limite : (ℕ → ℝ) → ℝ → Prop := fun u c ↦ ∀ ε > 0, ∃ N, ∀ n ≥ N, |u n - c| < ε
Prove that if the limit of \(u_n\) is \(a\), then the limit of \(u_nc\) is \(ac\).
import Mathlib.Data.Real.Basic import Mathlib.Tactic variable (u : ℕ → ℝ) variable (a c : ℝ) def TendsTo : (ℕ → ℝ) → ℝ → Prop := fun u c ↦ ∀ ε > 0, ∃ N, ∀ n ≥ N, |u n - c| < ε example (h : TendsTo u a) : TendsTo (fun n ↦ (u n) * c) (a * c) := by sorry