fix: bug in markNestedProofs within grind (#6500)

This PR fixes a bug in the `markNestedProofs` used in `grind`. See new
test.
This commit is contained in:
Leonardo de Moura 2025-01-02 03:14:45 +01:00 committed by GitHub
parent a8d09dad1b
commit c0d67e2a65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -28,9 +28,9 @@ where
| .bvar .. => unreachable!
-- See comments on `Canon.lean` for why we do not visit these cases.
| .letE .. | .forallE .. | .lam ..
| .const .. | .lit .. | .mvar .. | .sort .. | .fvar ..
| .proj ..
| .mdata .. => return e
| .const .. | .lit .. | .mvar .. | .sort .. | .fvar .. => return e
| .proj _ _ b => return e.updateProj! (← visit b)
| .mdata _ b => return e.updateMData! (← visit b)
-- We only visit applications
| .app .. =>
-- Check whether it is cached

View file

@ -0,0 +1,6 @@
example (as bs : Array α) (v : α)
(i : Nat)
(h₁ : i < as.size)
(h₂ : bs = as.set i v)
: (as.set i v).size = as.size → as.size = bs.size := by
grind