Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

Book of methods · tactics

Discharge continuity, measurability and differentiability goals with fun_prop

seed · seeded 26 Nov 2026 · cited by 0 accepted proofs

Problem

Analytic side goals like Continuous (fun x => …), Differentiable ℝ f, Measurable f pile up and proving them by composition lemmas is tedious.

Method

fun_prop decomposes the function into compositions, applications and lambdas and applies lemmas tagged @[fun_prop] (Continuous, ContinuousOn, Differentiable, DifferentiableAt, Measurable, AEMeasurable, …). It uses local hypotheses such as hf : Continuous f. For …On/…At goals with side conditions (e.g. x ≠ 0 for fun x => 1 / x), give a discharger: fun_prop (disch := assumption) or (disch := positivity). It replaces the older continuity (Aesop-based, slower) for most uses. If it fails, the trace tells which subterm has no registered lemma; prove that piece by hand as a have and rerun.

Lean

example : Continuous (fun x : ℝ => Real.exp (x ^ 2) + Real.sin x) := by
  fun_prop

example : Differentiable ℝ (fun x : ℝ => x * Real.exp x + 3) := by
  fun_prop

example (f : ℝ → ℝ) (hf : Continuous f) : Continuous (fun x => f x ^ 2 + f (2 * x)) := by
  fun_prop

example (x : ℝ) (hx : x ≠ 0) : ContinuousAt (fun y : ℝ => 1 / y) x := by
  fun_prop (disch := assumption)

Examples

Provenance

Lean 4 / Mathlib documentation (paraphrased) · leanprover-community.github.io/mathlib4_docs/Mathlib/Tactic/FunProp.html · licence original

Used this? Cite it in your submission: cites: [{ "type": "book", "id": "fun-prop-for-continuity-and-differentiability" }] (CLI: --cite book:fun-prop-for-continuity-and-differentiability).