Zulip Chat Archive

Stream: lean4

Topic: Problem by rounding


Leni Greco (Nov 03 2023 at 10:04):

hello!
I have problems working with ↑q . What do I have to change, so that I don't get errors?

import LeanCourse.Common
import LeanCourse.MIL.C03_Logic.solutions.Solutions_S06_Sequences_and_Convergence
set_option linter.unusedVariables false
open Nat Real Function Set


lemma : SequentialLimit (fun n ↦ 1 / (n+1)) 0 := by
   intros a b
   have ha: a>0 := by assumption
   use (⌈1/a⌉₊ : ℕ)
   simp
   intro q w
   have h1: |(↑q + 1)⁻¹|=(↑q + 1)⁻¹:= by exact sorry
   sorry

Eric Wieser (Nov 03 2023 at 10:12):

Unfortunately this isn't a #mwe because it uses LeanCourse, which most of us don't have because we're not on your course!

Damiano Testa (Nov 03 2023 at 10:14):

Taking into account what Eric said, you could see if using a type ascription similar to the one you used in the use line and removing the ↑ helps... : smile


Last updated: Feb 28 2026 at 14:05 UTC