Zulip Chat Archive
Stream: lean4
Topic: omega errs
Michael Stoll (May 22 2024 at 20:57):
import Mathlib
/-- error: omega could not prove the goal:
it is false -/
#guard_msgs in
example : Odd 3 := by
omega
I guess it is OK that omega
claims that it cannot prove that 3 is odd, but claiming in addition that 3 is in fact not odd goes a bit far...
Ruben Van de Velde (May 22 2024 at 21:04):
On live.lean-lang.org , with the button in your code snippet, it does work
Kyle Miller (May 22 2024 at 21:21):
I'm seeing the error on the most recent master branch of mathlib.
Kyle Miller (May 22 2024 at 21:26):
@Ruben Van de Velde When you say "it does work" do you mean that omega
works, or that Michael's example really does show the error? I'm seeing the latter on live.lean-lang.org, but I interpreted you as saying the former.
Ruben Van de Velde (May 22 2024 at 21:32):
Oh no, I missed the guard messages and misinterpreted the output. Never mind me
Kyle Miller (May 22 2024 at 21:32):
@Kim Morrison The error message in Lean.Elab.Tactic.Omega.formatErrorMessage is a bit strong. It seems like "it is false" is correct for the problem that omega created from the local context, but it discarded not (Odd 3)
itself, so it's presumptuous of it to say it's not possible at all. Maybe it could report what facts it ended up being able to use, and that with these facts the problem is impossible?
Kim Morrison (May 22 2024 at 23:20):
Yes, I think we could just remove it is false
.
Better would be to say "could not prove the goal from the relevant hypotheses:" and then list the facts it pulled from the context. Then the user could see that it ignored Odd 3
.
Kim Morrison (May 24 2024 at 04:59):
Joachim Breitner (May 24 2024 at 05:12):
My bad, when I changed the error message it seems I didn't think this through as much as I thought I did.
Kim Morrison (May 24 2024 at 05:14):
All good. This was just a corner case of a massive improvement over my original messages. :-)
Last updated: May 02 2025 at 03:31 UTC