File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
src/Lean/Elab/Tactic/Grind Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,10 @@ public def withParams (params : Grind.Params) (ps : TSyntaxArray ``Parser.Tactic
217217 else
218218 let mut params := params
219219 if only then
220- params := { params with anchorRefs? := none }
220+ params := { params with
221+ ematch := {}
222+ anchorRefs? := none
223+ }
221224 params ← elabGrindParams params ps (only := only) (incremental := true )
222225 let anchorRefs? := params.anchorRefs?
223226 withReader (fun c => { c with params, ctx.anchorRefs? := anchorRefs? }) do
Original file line number Diff line number Diff line change @@ -292,12 +292,18 @@ example (m : IndexMap α β) (a : α) (b : β) :
292292example (m : IndexMap α β) (a : α) (b : β) :
293293 (m.insert a b).findIdx a = if h : a ∈ m then m.findIdx a else m.size := by
294294 grind =>
295- instantiate only [insert, = mem_indices_of_mem, findIdx ]
296- instantiate only [= getElem?_pos , = getElem?_neg ]
295+ instantiate only [findIdx, insert, = mem_indices_of_mem]
296+ instantiate only [= getElem?_neg , = getElem?_pos ]
297297 cases #1bba
298- next => instantiate only [findIdx]
299- next =>
300- instantiate only
301- instantiate only [= HashMap.mem_insert, = HashMap.getElem_insert]
298+ · instantiate only [findIdx]
299+ · finish only [= HashMap.mem_insert, = HashMap.getElem_insert]
300+
301+ example (m : IndexMap α β) (a : α) (b : β) :
302+ (m.insert a b).findIdx a = if h : a ∈ m then m.findIdx a else m.size := by
303+ grind =>
304+ instantiate only [findIdx, insert, = mem_indices_of_mem]
305+ instantiate only [= getElem?_neg, = getElem?_pos]
306+ cases #1bba <;>
307+ finish only [findIdx, = HashMap.mem_insert, = HashMap.getElem_insert]
302308
303309end IndexMap
You can’t perform that action at this time.
0 commit comments