FA-40629 / Heap invariants / Member archive
Heap hole descent lifts selected child values rather than old parent values · case 04
The bounded hole descent certificate reports an incorrect moved keys.
Case contract
A binary heap hole descent receives array keys and starting internal or leaf index. Repeatedly choose smaller existing child (left on ties), move that child into the hole, and stop at a leaf; the displaced root value is returned separately for later upward placement. Return path, moved keys, leaf slot, displaced value, remaining untouched slots, and comparison count between sibling pairs.
Why this case matters
This isolates an internal heap representation or priority-structure invariant using deterministic finite records.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression certificate 2 | {"comparisons": 0, "displaced": 9, "leaf_slot": 1, "moved_keys": [9], "path": [0, 1], "untouched": []} | {"comparisons": 0, "displaced": 9, "leaf_slot": 1, "moved_keys": [2], "path": [0, 1], "untouched": []} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗