File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -516,15 +516,14 @@ elab_rules : tactic
516516 commitIfNoEx do liftMetaFinishingTactic <| Linarith.linarith o.isSome args.toList cfg
517517
518518private meta partial def minimize (cfg : Linarith.LinarithConfig) (st : Tactic.SavedState)
519- (hs : List Expr) (i : Nat) : TacticM (List Expr) := do
520- let g ← getMainGoal
519+ (g : MVarId) (hs : List Expr) (i : Nat) : TacticM (List Expr) := do
521520 if _h : i < hs.length then
522521 let rest := hs.eraseIdx i
523522 st.restore
524523 try
525524 let _ ← Linarith.linarith true rest cfg g
526- minimize cfg st rest i
527- catch _ => minimize cfg st hs (i+1 )
525+ minimize cfg st g rest i
526+ catch _ => minimize cfg st g hs (i+1 )
528527 else
529528 return hs
530529
@@ -543,7 +542,7 @@ elab_rules : tactic
543542 throwError "linarith? currently only supports named hypothesis, not terms"
544543 let used ←
545544 if cfg.minimize then
546- minimize cfg st used₀ 0
545+ minimize cfg st g used₀ 0
547546 else
548547 pure used₀
549548 st.restore
You can’t perform that action at this time.
0 commit comments