fix: markNestedProofs preprocessor in grind (#8412)
This PR fixes the `markNestedProofs` preprocessor used in `grind`. There was a missing case (e.g., `Expr.mdata`)
This commit is contained in:
parent
88f6439955
commit
e984473886
2 changed files with 9 additions and 1 deletions
|
|
@ -47,7 +47,7 @@ where
|
|||
return e'
|
||||
-- Remark: we have to process `Expr.proj` since we only
|
||||
-- fold projections later during term internalization
|
||||
unless e.isApp || e.isForall || e.isProj do
|
||||
unless e.isApp || e.isForall || e.isProj || e.isMData do
|
||||
return e
|
||||
-- Check whether it is cached
|
||||
if let some r := (← get).find? e then
|
||||
|
|
@ -68,6 +68,8 @@ where
|
|||
pure e
|
||||
| .proj _ _ b =>
|
||||
pure <| e.updateProj! (← visit b)
|
||||
| .mdata _ b =>
|
||||
pure <| e.updateMData! (← visit b)
|
||||
| .forallE _ d b _ =>
|
||||
-- Recall that we have `ForallProp.lean`.
|
||||
let d' ← visit d
|
||||
|
|
|
|||
|
|
@ -26,3 +26,9 @@ example (as bs cs : Array α) (v : α)
|
|||
(h₆ : j < as.size)
|
||||
: cs[j] = as[j] := by
|
||||
grind only [= Array.getElem_set_ne_abstracted, = Array.size_set] -- should work
|
||||
|
||||
opaque p : (i : Nat) → i ≠ 10 → Prop
|
||||
|
||||
example (h : ∀ i, (¬i > 0) ∨ ∀ h : i ≠ 10, p i h) : p 5 (by decide) := by
|
||||
have := h 5; clear h
|
||||
grind
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue