Mathlib Phrasebook

7. Filters🔗

Mathlib states every limit, "eventually", and "almost everywhere" claim through filters. If you want to write lim_{x → 0} sin x / x = 1 as a Lean proposition, prove that a sequence converges, or read a proof that pivots through 𝓝 and atTop, this chapter shows how. It assumes you are comfortable with Lean and with limits in the usual ε-δ sense, but not that you have met filters before.

A Filter l on a type α packages a notion of "eventually": for a set s : Set α, membership s l reads "we eventually land in s". Different filters carry different notions: 𝓝 x is "for points near x", atTop is "for sufficiently large input", ae μ is "for almost every point". You rarely touch the axioms directly; the skill is picking the filter that matches the limit you mean and letting the lemmas do the work. One relation, Filter.Tendsto, then covers sequence convergence, function limits at a point, "→ ∞", and almost-everywhere statements uniformly.

The chapter has four entries:

The notations 𝓝, atTop, ∀ᶠ only parse after open Filter Topology. A reference table of the standard filters closes the chapter.

  1. 7.1. Limit statements: Tendsto and ∀ᶠ
  2. 7.2. Proving limits
  3. 7.3. ε-δ and filter bases
  4. 7.4. Operations on filters