Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iff is translated as an uninterpreted function, leading to wrong results #121

Open
dranov opened this issue Jul 8, 2024 · 3 comments
Open

Comments

@dranov
Copy link

dranov commented Jul 8, 2024

import Smt

set_option trace.smt true
set_option trace.smt.solve true

variable {node : Type} [Nonempty node]

theorem wrong (a : node → Prop)
: ∀ n, a n ↔ a n := by smt

The generated query is:

(set-logic ALL)
(declare-sort node 0)
(declare-fun a (node) Bool)
(declare-fun Iff (Bool Bool) Bool)
(assert (not (forall ((n node)) (Iff (a n) (a n)))))
(check-sat) 

which returns sat

@dranov
Copy link
Author

dranov commented Jul 9, 2024

The change in PR #122 seems sufficient.

@abdoo8080
Copy link
Collaborator

Hi @dranov! Thanks for filing the bug and working on a fix. While your PR is sound, the proof reconstruction part of the tactic is not aware of the change, which might cause Lean to reject the reconstructed proof. To avoid confusion, it's better to eliminate Iff in a pre-processing step. PR #123 addresses this for the most part, though there may still be some corner cases. We'll have a proper solution once we start integrating lean-smt with lean-auto.

@dranov
Copy link
Author

dranov commented Jul 12, 2024

That makes sense. Thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants