fix(frontends/lean/elaborator): add missing synthesize

We added for the following reasons:
1- It should mimic the behavior of `visit_lambda` and `visit_pi`.
2- It minimizes the number of auxiliary metavariables that need to be
   created when we execute `locals.mk_lambda(new_body)`. In Lean3,
   it would minimize the number of delayed abstractions.
This commit is contained in:
Leonardo de Moura 2018-05-29 16:40:13 -07:00
parent 7842036aba
commit f7b6645b60

View file

@ -3523,7 +3523,7 @@ expr elaborator::visit_let(expr const & e, optional<expr> const & expected_type)
save_identifier_info(l);
expr body = instantiate_rev_locals(let_body(e), locals);
expr new_body = visit(body, expected_type);
/* TODO(Leo): add synthesize here? */
synthesize();
expr new_e = locals.mk_lambda(new_body);
return new_e;
}