FA-15171 / Numerics / Open access
Combinadic unrank: greedy upper bound · case 01
The exact combinadic unrank result violates the stated contract at greedy upper bound.
ROOT CAUSE
The greedy upper bound step uses ceiling-2 instead of ceiling-1.
THE FAILURE
The greedy upper bound step uses ceiling-2 instead of ceiling-1.
Unsuccessful approach: The partial repair j-1 still violates the greedy upper bound invariant.
Case contract
Input [k,r], k>=1 and r>=0; unique increasing combination of k nonnegative integers with colex rank r. Bounds: 1<=k<=5 and 0<=r<=49.
Why this case matters
Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
k,r=x;out=[];ceiling=r+k+1
for j in range(k,0,-1):
a=ceiling-2
for _ in range(200):
if a<j or math.comb(a,j)<=r:break
a-=1
out.append(a)
r=r-(math.comb(a,j) if a>=j else 0)
ceiling=a
return out[::-1]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 0], [0, 1]), ([1, 1], [1]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([1, 2], [2]), ([1, 3], [3]), ([1, 4], [4]), ([1, 5], [5])], [([2, 2], [1, 2]), ([1, 4], [4]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([1, 17], [17]), ([1, 18], [18]), ([1, 19], [19]), ([1, 20], [20])], [([2, 5], [2, 3]), ([1, 7], [7]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([1, 34], [34]), ([1, 35], [35]), ([1, 36], [36]), ([1, 37], [37])], [([2, 9], [3, 4]), ([1, 10], [10]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([2, 1], [0, 2]), ([2, 2], [1, 2]), ([2, 3], [0, 3]), ([2, 4], [1, 3])], [([2, 14], [4, 5]), ([1, 13], [13]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([2, 18], [3, 6]), ([2, 19], [4, 6]), ([2, 20], [5, 6]), ([2, 21], [0, 7])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, solve(args), expected)
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 |
|---|---|---|---|
| explicit oracle 0 | [-1, 1] | [0, 1] | Failed |
| explicit oracle 1 | [1] | [1] | Passed |
| explicit oracle 2 | [0] | [0] | Passed |
| explicit oracle 3 | [-1, 1, 3, 5, 7] | [0, 3, 5, 6, 7] | Failed |
| explicit oracle 4 | [2] | [2] | Passed |
| explicit oracle 5 | [3] | [3] | Passed |
| explicit oracle 6 | [4] | [4] | Passed |
| explicit oracle 7 | [5] | [5] | Passed |
SHA-256 / 788520b07d0aa2f14a5105858635e73dc8e41d41fdb0d6714c0d811f3b9d6073
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import itertools
from fractions import Fraction
N = 1
observations = []
def solve(x):
k,r=x;out=[];ceiling=r+k+1
for j in range(k,0,-1):
a=j-1
for _ in range(200):
if a<j or math.comb(a,j)<=r:break
a-=1
out.append(a)
r=r-(math.comb(a,j) if a>=j else 0)
ceiling=a
return out[::-1]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 0], [0, 1]), ([1, 1], [1]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([1, 2], [2]), ([1, 3], [3]), ([1, 4], [4]), ([1, 5], [5])], [([2, 2], [1, 2]), ([1, 4], [4]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([1, 17], [17]), ([1, 18], [18]), ([1, 19], [19]), ([1, 20], [20])], [([2, 5], [2, 3]), ([1, 7], [7]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([1, 34], [34]), ([1, 35], [35]), ([1, 36], [36]), ([1, 37], [37])], [([2, 9], [3, 4]), ([1, 10], [10]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([2, 1], [0, 2]), ([2, 2], [1, 2]), ([2, 3], [0, 3]), ([2, 4], [1, 3])], [([2, 14], [4, 5]), ([1, 13], [13]), ([1, 0], [0]), ([5, 49], [0, 3, 5, 6, 7]), ([2, 18], [3, 6]), ([2, 19], [4, 6]), ([2, 20], [5, 6]), ([2, 21], [0, 7])]]
for i, (args, expected) in enumerate(fixtures[N-1]):
check("explicit oracle %d" % i, solve(args), expected)
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 |
|---|---|---|---|
| explicit oracle 0 | [0, 1] | [0, 1] | Passed |
| explicit oracle 1 | [0] | [1] | Failed |
| explicit oracle 2 | [0] | [0] | Passed |
| explicit oracle 3 | [0, 1, 2, 3, 4] | [0, 3, 5, 6, 7] | Failed |
| explicit oracle 4 | [0] | [2] | Failed |
| explicit oracle 5 | [0] | [3] | Failed |
| explicit oracle 6 | [0] | [4] | Failed |
| explicit oracle 7 | [0] | [5] | Failed |
SHA-256 / 6dd8b23f0b0e7dc3e75d98ecbd6db5a9eb171e1002af606704570994e62e41e8
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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 deterministic bounded teaching model. Inputs are restricted to the explicit contract; this is not a production algebra 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:39:24.071031+00:00.
Case digest / abc1e69707d4140f7495edd7f4d8e5951d30e57f97590285fe8e315fd9d07a48