fix: induction: do not register _ as binder in info tree

This commit is contained in:
Sebastian Ullrich 2022-06-06 23:04:09 +02:00
parent d55daf80d4
commit 143b2b49c8
3 changed files with 10 additions and 1 deletions

View file

@ -199,7 +199,7 @@ private def saveAltVarsInfo (altMVarId : MVarId) (altStx : Syntax) (fvarIds : Ar
for fvarId in fvarIds do
if !useNamesForExplicitOnly || (← getLocalDecl fvarId).binderInfo.isExplicit then
if i < altVars.size then
Term.addLocalVarInfo altVars[i] (mkFVar fvarId)
Term.addTermInfo' (isBinder := altVars[i].isIdent) altVars[i] (mkFVar fvarId)
i := i + 1
/--

9
tests/lean/1196.lean Normal file
View file

@ -0,0 +1,9 @@
inductive T: Type
| mk: Nat -> T
theorem T.zero_bad: T -> T
:= by {
intro H;
induction H with
| mk _ => exact T.mk 0
}

View file