lean4-htt/tests
Kim Morrison 2e779f79de
fix: bump numInstances for delayed grind theorem instances (#12176)
This PR fixes a bug where delayed E-match theorem instances could cause
uniqueId collisions in the instance tracking map.

The `uniqueId` for theorem instances is generated using `numInstances`,
but this counter was only bumped for immediately activated instances
(`.ready` case), not for delayed instances (`.next` case). This caused
ID collisions:

1. Theorem A matches, becomes delayed, gets `uniqueId = N`
2. Counter isn't bumped (stays at N)
3. Theorem B matches next, gets `uniqueId = N` (same!)
4. B's entry overwrites A's entry in `instanceMap`
5. A's tracking is lost

This manifested as `grind?` and `finish?` producing `instantiate approx`
(meaning "we couldn't determine which theorems to use") instead of
proper `instantiate only [...]` with specific theorem lists.

The fix bumps `numInstances` for delayed instances too, ensuring each
theorem instance gets a truly unique ID.

🤖 Prepared with Claude Code

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-28 03:09:27 +00:00
..
bench test: delayed assignment performance issue (#12201) 2026-01-28 02:08:39 +00:00
bench-radar chore: make bench suite more similar to mathlib's (#12091) 2026-01-22 14:20:10 +00:00
compiler test: compiler test with big meta closure (#12141) 2026-01-24 15:18:33 +00:00
elabissues
ir
lake fix: lake: --no-build exit code w/ release fetch (#12142) 2026-01-24 17:03:07 +00:00
lean fix: bump numInstances for delayed grind theorem instances (#12176) 2026-01-28 03:09:27 +00:00
pkg fix: revert "split ngen on async elab" (#12148) 2026-01-25 03:18:24 +00:00
playground
plugin
simpperf
.gitignore
common.sh feat: re-integrate lean4checker as leanchecker (#11887) 2026-01-08 09:41:33 +00:00
lakefile.toml
lean-toolchain