Compare commits

...

1 Commits

Author SHA1 Message Date
Leonardo de Moura
b04aac6f21 fix: markNestedProofs preprocessor in grind
This PR fixes the `markNestedProofs` preprocessor used in
`grind`. There was a missing case (e.g., `Expr.mdata`)
2025-05-19 18:24:29 -07:00
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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