chore: add headBeta to avoid unnecessary applications introduced by metavariable management

This commit is contained in:
Leonardo de Moura 2020-07-24 16:05:05 -07:00
parent 732dfed8b5
commit 81d2754cd2

View file

@ -909,6 +909,7 @@ xs.size.foldRevM
match lctx.getFVar! x with
| LocalDecl.cdecl _ _ n type bi =>
if !usedOnly || e.hasLooseBVar 0 then do
let type := type.headBeta;
type ← abstractRange xs i type;
if isLambda then
pure (Lean.mkLambda n bi type e, num + 1)