FA-40401 / Heap invariants / Open access
Min-max heap maximum can be either child of the root · case 01
The bounded minmax levels certificate reports an incorrect maximum.
ROOT CAUSE
Min-max heap maximum can be either child of the root.
THE FAILURE
Min-max heap maximum can be either child of the root.
Unsuccessful approach: The local patch uses None if not a else a[1] if n>1 else a[0] and still violates the stated relation.
Case contract
A min-max heap certificate is a complete zero-based binary array. Even depth is a minimum level, odd depth a maximum level. Report level parities, grandparent indices, minimum-level grandchild violations, maximum-level grandchild violations, maximum endpoint, and immediate-child level alternation pairs. Empty maximum is None.
Why this case matters
This isolates an internal heap representation or priority-structure invariant using deterministic finite records.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['keys']; n=len(a)
def depth(i): return (i+1).bit_length()-1
def grandchildren(i): return [j for j in range(4*i+3,4*i+7) if j<n]
return {'parity': [depth(i)%2 for i in range(n)],
'grandparents': [None if i<3 else (i-3)//4 for i in range(n)],
'min_violations': [[i,j] for i in range(n) if depth(i)%2==0 for j in grandchildren(i) if a[j]<a[i]],
'max_violations': [[i,j] for i in range(n) if depth(i)%2==1 for j in grandchildren(i) if a[j]>a[i]],
'maximum': None if not a else a[-1],
'edges': [[i,j] for i in range(n) for j in (2*i+1,2*i+2) if j<n]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 8, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 9, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 10, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 10, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 11, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 11, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 12, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 12, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression certificate 1 | {'edges': [], 'grandparents': [], 'max_violations': [], 'maximum': None, 'min_violations': [], 'parity': []} | {'edges': [], 'grandparents': [], 'max_violations': [], 'maximum': None, 'min_violations': [], 'parity': []} | Passed |
| regression certificate 2 | {'edges': [], 'grandparents': [None], 'max_violations': [], 'maximum': 4, 'min_violations': [], 'parity': [0]} | {'edges': [], 'grandparents': [None], 'max_violations': [], 'maximum': 4, 'min_violations': [], 'parity': [0]} | Passed |
| regression certificate 3 | {'edges': [[0, 1], [0, 2]], 'grandparents': [None, None, None], 'max_violations': [], 'maximum': 9, 'min_violations': [], 'parity': [0, 1, 1]} | {'edges': [[0, 1], [0, 2]], 'grandparents': [None, None, None], 'max_violations': [], 'maximum': 9, 'min_violations': [], 'parity': [0, 1, 1]} | Passed |
| regression certificate 4 | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]], 'grandparents': [None, None, None, 0, 0, 0, 0], 'max_violations': [], 'maximum': 7, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]], 'grandparents': [None, None, None, 0, 0, 0, 0], 'max_violations': [], 'maximum': 9, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0]} | Failed |
| regression certificate 5 | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 3, 'min_violations': [[0, 3], [0, 5]], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'min_violations': [[0, 3], [0, 5]], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | Failed |
| regression certificate 6 | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | Passed |
| variant-dependent certificate | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | Passed |
SHA-256 / 2e64cf2f6d3bd82e3ace46de895314600cd83d9e2254ad57cf62840c9d1581a3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
a=d['keys']; n=len(a)
def depth(i): return (i+1).bit_length()-1
def grandchildren(i): return [j for j in range(4*i+3,4*i+7) if j<n]
return {'parity': [depth(i)%2 for i in range(n)],
'grandparents': [None if i<3 else (i-3)//4 for i in range(n)],
'min_violations': [[i,j] for i in range(n) if depth(i)%2==0 for j in grandchildren(i) if a[j]<a[i]],
'max_violations': [[i,j] for i in range(n) if depth(i)%2==1 for j in grandchildren(i) if a[j]>a[i]],
'maximum': None if not a else a[1] if n>1 else a[0],
'edges': [[i,j] for i in range(n) for j in (2*i+1,2*i+2) if j<n]}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 8, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 9, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 10, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 10, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 11, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 11, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})], [({'keys': []}, {'parity': [], 'grandparents': [], 'min_violations': [], 'max_violations': [], 'maximum': None, 'edges': []}), ({'keys': [4]}, {'parity': [0], 'grandparents': [None], 'min_violations': [], 'max_violations': [], 'maximum': 4, 'edges': []}), ({'keys': [1, 8, 9]}, {'parity': [0, 1, 1], 'grandparents': [None, None, None], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2]]}), ({'keys': [2, 9, 8, 3, 2, 4, 7]}, {'parity': [0, 1, 1, 0, 0, 0, 0], 'grandparents': [None, None, None, 0, 0, 0, 0], 'min_violations': [], 'max_violations': [], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]]}), ({'keys': [5, 4, 9, 1, 8, 2, 6, 10, 3, 8, 7, 6, 5, 4, 3]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [[0, 3], [0, 5]], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 7, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [[1, 10]], 'maximum': 8, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]}), ({'keys': [0, 12, 8, 2, 3, 1, 4, 7, 7, 7, 9, 8, 8, 8, 8]}, {'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'min_violations': [], 'max_violations': [], 'maximum': 12, 'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]})]][N-1]
check('regression certificate 1', solve(cases[0][0]), cases[0][1])
check('regression certificate 2', solve(cases[1][0]), cases[1][1])
check('regression certificate 3', solve(cases[2][0]), cases[2][1])
check('regression certificate 4', solve(cases[3][0]), cases[3][1])
check('regression certificate 5', solve(cases[4][0]), cases[4][1])
check('regression certificate 6', solve(cases[5][0]), cases[5][1])
check('variant-dependent certificate', solve(cases[6][0]), cases[6][1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression certificate 1 | {'edges': [], 'grandparents': [], 'max_violations': [], 'maximum': None, 'min_violations': [], 'parity': []} | {'edges': [], 'grandparents': [], 'max_violations': [], 'maximum': None, 'min_violations': [], 'parity': []} | Passed |
| regression certificate 2 | {'edges': [], 'grandparents': [None], 'max_violations': [], 'maximum': 4, 'min_violations': [], 'parity': [0]} | {'edges': [], 'grandparents': [None], 'max_violations': [], 'maximum': 4, 'min_violations': [], 'parity': [0]} | Passed |
| regression certificate 3 | {'edges': [[0, 1], [0, 2]], 'grandparents': [None, None, None], 'max_violations': [], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1]} | {'edges': [[0, 1], [0, 2]], 'grandparents': [None, None, None], 'max_violations': [], 'maximum': 9, 'min_violations': [], 'parity': [0, 1, 1]} | Failed |
| regression certificate 4 | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]], 'grandparents': [None, None, None, 0, 0, 0, 0], 'max_violations': [], 'maximum': 9, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6]], 'grandparents': [None, None, None, 0, 0, 0, 0], 'max_violations': [], 'maximum': 9, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0]} | Passed |
| regression certificate 5 | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 4, 'min_violations': [[0, 3], [0, 5]], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 7], [1, 9], [1, 10]], 'maximum': 9, 'min_violations': [[0, 3], [0, 5]], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | Failed |
| regression certificate 6 | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 7, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | Failed |
| variant-dependent certificate | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | {'edges': [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]], 'grandparents': [None, None, None, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2], 'max_violations': [[1, 10]], 'maximum': 8, 'min_violations': [], 'parity': [0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]} | Passed |
SHA-256 / 51fd60db5b144c0d903c9336513b68c3b6d25173db4d72556e976f2de1c9f2f4
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A stipulated offline diagnostic model; it does not implement a production allocator, concurrency protocol, or complete heap library. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:43:30.827037+00:00.
Case digest / 8b538e58ada57006604882df7398ca70f558452d976991e2a77a5985aba7083e