Zulip Chat Archive

Stream: lean4

Topic: definition of a limit


tica (Dec 11 2022 at 18:22):

Hello,

With lean 3 I can write write the definition very clearly.

def limit (f:   ) (a: ) (l: ): Prop:=
  ε > 0, δ > 0, x: , |x - a| < δ  |f x - l| < ε

How to do the same thing with lean 4?
Thanks

Henrik Böving (Dec 11 2022 at 18:25):

Two things:

  1. To my knowledge this is not the definition of a limit used in mathlib, so if you are interested in working with mathlib you should probably stick to their definition which is filter based iirc
  2. Since a limit requires real numbers and real numbers have not been defined yet in mathlib4 i'd say you don't right now, if you wait a few months or weeks however basically the same thing as above should work out in a mathlib4 project.

tica (Dec 11 2022 at 18:31):

Yes several definitions are usable but I try to learn to make my own definitions to learn the language.

I'm going to stay on lean 3 until the real numbers are set.

Thanks

Winston Yin (Dec 13 2022 at 02:20):

@tica I would recommend playing with Lean3 first, as mathlib in Lean4 is still quite bare at the moment. You may find this reference useful. Tracing chains of definitions on the mathlib3 docs site is also a good way to learn the language/library.

tica (Dec 13 2022 at 15:26):

Yes that is what I will do and I will learn lean 4 later.
Thanks for the reference :smile:


Last updated: Dec 20 2023 at 11:08 UTC