fix: nontermination

This commit is contained in:
Leonardo de Moura 2021-03-18 14:23:03 -07:00
parent b7c82d40a2
commit f73615c3d2
3 changed files with 13 additions and 1 deletions

View file

@ -294,7 +294,11 @@ mutual
loop ()
else
reportStuckSyntheticMVars
loop ()
/- Disable `autoBoundImplicit` to avoid nontermination.
The postponed terms have a fixed `localContext`, i.e. the context of the metavariable representing the "hole".
`throwAutoBoundImplicit` exception will have not effect. -/
withReader (fun ctx => { ctx with autoBoundImplicit := false }) do
loop ()
end
def synthesizeSyntheticMVarsNoPostponing : TermElabM Unit :=

View file

@ -0,0 +1,7 @@
theorem ex
(h₁ : α = β)
(as : List α)
(bs : List β)
(h₂ : (h ▸ as) = bs)
: True :=
True.intro

View file

@ -0,0 +1 @@
autoBoundPostponeLoop.lean:5:12-5:13: error: unknown identifier 'h'