Zulip Chat Archive
Stream: new members
Topic: Proving continuity of elementary functions
Duncan Skahan (Oct 27 2024 at 17:11):
How do I prove continuity of an elementary function? continuity
isn't working for me.
import Mathlib
noncomputable section
def f (x : ℝ) := x + 1
theorem test: Continuous f := by
continuity
#check test
I'm getting the error tactic 'aesop' failed, failed to prove the goal after exhaustive search.
Notification Bot (Oct 27 2024 at 17:15):
A message was moved here from #new members > ✔ How to prove basic continuity statements? by Duncan Skahan.
Kevin Buzzard (Oct 27 2024 at 17:29):
I suspect Lean will not unfold that f
unless explicitly asked (which would explain the error because you defined f
but didn't prove any theorems about it). Probably unfold f
or simp [f]
will enable continuity
but there might be tricks like continuity [f]
(not sure, this is not a tactic I use much and I'm not at lean right now)
Kevin Buzzard (Oct 27 2024 at 17:31):
Or changing def f
to abbrev f
(which aesop will unfold) would also probably work
Duncan Skahan (Oct 27 2024 at 17:44):
Thank you. unfold f
worked.
Jireh Loreaux (Oct 27 2024 at 17:52):
Also, you'll likely prefer to use fun_prop
instead of continuity
.
Last updated: May 02 2025 at 03:31 UTC