You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bogus error message: don't know how to synthesize placeholder #2
The error messages don't know how to synthesize placeholder are displaying an incorrect context after commit 7842036.
For example:
theoremfoo (a b : nat) (h : a = b) : b = a :=
_
produces the error message
error: don't know how to synthesize placeholder
context:
⊢ ∀ (a b : ℕ), a = b → b = a
instead of
error: don't know how to synthesize placeholder
context:
a b : ℕ
h : a = b
⊢ b = a
Commit 7842036 avoids the use of delayed abstractions when creating bindings (lambda/pi/let). The idea is simple for every metavariable ?m occurring in the body of the binder e, revert all locals in ?m that are being abstracted, and obtain ?m1. Then, ?m is replaced with ?m1 x_1 ... x_n where x_1 ... x_n are the reverted locals.
The body of the theorem is just a placeholder which is elaborated into ?m. The local context of ?m contains a, b and h. Then, when we abstract a b h, we obtain fun (a b : nat) (h : a = b), ?m_1 a b h, and the assignment ?m := ?m_1 a b h. Then, the method elaborator::ensure_no_unassigned_metavars incorrectly produces an error message for ?m_1 which has an empty context.
@Kha This problem is quite annoying, but it is not worth fixing now since we will re-write the elaborator. In the new elaborator, we should use a different approach where we record the metavariable created for each placeholder _. Then, during finalization, we check whether these placeholders have been assigned or not. If they have been assigned to metavariables applications such as ?m_1 a b h, we just report the error for ?m instead of ?m_1.
Activity
Kha commentedon Jun 6, 2018
Yes, I've just assumed that this will be fixed later. The fix sounds good.
Kha commentedon Dec 21, 2018
fixed a while ago
MLIR now crashes!
poke around at how extern c inline defns are codegene
add ability to emit MLIR for externs correctly. I'm not sure why this…
chore: disable #4006
chore: disable #4006 (#4021)
fix: kernel exception from fvars left from `?m a b` instantiation
fix: kernel exception from fvars left from `?m a b` instantiation
fix: kernel exception from fvars left from `?m a b` instantiation (#4410
feat: improve E-matching pattern inference in `grind` (#8196)
feat: new E-matching pattern inference for `grind` (#10342)
feat: add higher-order Miller pattern support in e-matching (#12483)
feat: support contracts, expression templates, and class specs in Kot…
feat: support contracts, expression templates, and class specs in Kot…
R11a: delete the dead tooling (cauli leftovers, two unregistered work…
fix: make the import options persistent before any import-time task c…
fix: mark a pooled kernel checker state thread-shared before the pool…
fix: make the import options persistent before any import-time task c…
fix: mark a pooled kernel checker state thread-shared before the pool…
docs,test: add PR leanprover#2 tactic docs, ADRs, tutorial chapter, a…