Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Lean/Elab/Tactic/Grind/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@ def tryTactic (tac : GrindTacticM α) : GrindTacticM Bool := do

open Grind

def liftGrindM (k : GrindM α) : GrindTacticM α := do
/-
**Note**: Recall that `grind` uses `Reducible` setting to avoid expensive definitionally equality tests.
-/
def liftGrindM (k : GrindM α) : GrindTacticM α := withReducible do
let ctx ← read
let s ← get
let (a, state) ← liftMetaM <| k ctx.methods.toMethodsRef ctx.ctx |>.run s.state
Expand Down
6 changes: 5 additions & 1 deletion src/Lean/Meta/Tactic/Grind/EMatch.lean
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ where
-- We must add a hint because `annotateEqnTypeConds` introduces `Grind.PreMatchCond`
-- which is not reducible.
proof := mkExpectedPropHint proof prop
addTheoremInstance thm proof prop (generation+1) guards
/-
**Note**: Must restore `reducible` setting because with use `withDefault` at `instantiateTheorem`.
-/
withReducible do
addTheoremInstance thm proof prop (generation+1) guards

private def synthesizeInsts (mvars : Array Expr) (bis : Array BinderInfo) : OptionT M Unit := do
let thm := (← read).thm
Expand Down
Loading