fix(library/elaborator): bug in free variable normalization (lift was missing)

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-12-21 06:41:09 -08:00
parent 7b0b363b32
commit 97145c0f88
2 changed files with 6 additions and 5 deletions

View file

@ -562,7 +562,7 @@ class elaborator::imp {
if (is_var(a)) {
auto e = find(ctx, var_idx(a));
if (e && e->get_body())
a = *(e->get_body());
a = lift_free_vars(*(e->get_body()), var_idx(a) + 1, m_state.m_menv);
}
}

View file

@ -633,11 +633,12 @@ void tst19() {
void tst20() {
std::cout << "\nTST 20\n";
environment env;
import_all(env);
metavar_env menv;
expr N = Const("N");
expr M = Const("M");
env->add_var("N", Type());
env->add_var("M", Type());
expr N = Const("N1");
expr M = Const("M1");
env->add_var("N1", Type());
env->add_var("M1", Type());
env->add_var("f", N >> (M >> M));
env->add_var("a", N);
env->add_var("b", M);