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
calc tactic resolves notation incorrectly #651
Comments
I think this is the start of the offending code: lean/src/frontends/lean/tactic_notation.cpp Lines 285 to 290 in e4203af
|
I believe the issue is in the quoting and antiquoting that occurs when translating the calc proof to a pexpr to pass to refine. The example (eq : ℕ) : 1 ≤ 1 :=
by tactic.interactive.refine ``(@eq.trans _ 1 1 1 rfl rfl) which fails because you can't write |
This is also visible as a difference in how expr vs pexpr quoting is handled: example (eq : ℕ) : 1 = 1 :=
by exact %%`(@eq.trans _ 1 1 1 rfl rfl) -- ok, uses global eq.trans
example (eq : ℕ) : 1 = 1 :=
by exact %%``(@eq.trans _ 1 1 1 rfl rfl) -- fail, tries to project on the local variable |
Prerequisites
or feature requests.
Description
calc
, the tactic, is confused by a local variable calledeq
.Steps to Reproduce
Expected behavior: No diagnostics
Actual behavior:
invalid occurrence of field notation
Reproduces how often: Always
Versions
Lean (version 3.35.1, commit 4887d8a, Release)
The text was updated successfully, but these errors were encountered: