lean2/tests/lean/elab_bug1.lean
Leonardo de Moura 17cce340f6 fix(library/elaborator): in optimization for metavariable free terms
The optimization was incorrect if the term indirectly contained a metavariable.
It could happen if the term contained a free variable that was assigned in the context to a term containing a metavariable.

This commit also adds a new test that exposes the problem.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-22 18:06:00 -08:00

4 lines
No EOL
145 B
Text

set_option pp::implicit true
check let P : Nat → Bool := λ x, x ≠ 0,
Q : ∀ x, P (x + 1) := λ x, Nat::succ_nz x
in Q