fix: use instantiateMVars before invoking pure function findIfToSplit

This commit is contained in:
Leonardo de Moura 2022-02-23 16:25:33 -08:00
parent a1366fcb3b
commit 3e0ea7fbae

View file

@ -66,6 +66,7 @@ partial def findIfToSplit? (e : Expr) : Option Expr :=
none
def splitIfAt? (mvarId : MVarId) (e : Expr) (hName? : Option Name) : MetaM (Option (ByCasesSubgoal × ByCasesSubgoal)) := do
let e ← instantiateMVars e
if let some cond := findIfToSplit? e then
let hName ← match hName? with
| none => mkFreshUserName `h