FA-15156 / Numerics / Open access
Colex combination rank: combinatorial place accumulation · case 01
The exact colex combination rank result violates the stated contract at combinatorial place accumulation.
ROOT CAUSE
The combinatorial place accumulation step uses rank*term instead of rank+term.
THE FAILURE
The combinatorial place accumulation step uses rank*term instead of rank+term.
Unsuccessful approach: The partial repair term still violates the combinatorial place accumulation invariant.
Case contract
Input strictly increasing selected nonnegative integers; zero-based colex rank=sum choose(a_i,i+1).
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):
a=x;rank=0
for i in range(len(a)):
top=a[i];bottom=i+1
term=math.comb(top,bottom) if 0<=bottom<=top else 0
rank=rank*term
return rank
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1], 1), ([1, 2], 2), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0], 0), ([0, 1], 0), ([0], 0), ([1], 1)], [([1], 1), ([2, 3], 5), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0, 3], 3), ([1, 2], 2), ([1, 3], 4), ([0, 1, 2], 0)], [([2], 2), ([1, 2], 2), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0, 4], 6), ([1, 3], 4), ([1, 4], 7), ([2, 3], 5)], [([0, 2], 1), ([2, 3], 5), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0, 1, 2, 3], 0), ([0, 1, 2, 4], 1), ([0, 1, 3, 4], 2), ([0, 2, 3, 4], 3)], [([1, 2], 2), ([0, 2, 3], 2), ([0], 0), ([4, 5, 6, 7, 8], 125), ([1, 2], 2), ([1, 3], 4), ([1, 4], 7), ([1, 5], 11)]]
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 | Failed |
| explicit oracle 1 | 0 | 2 | Failed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 0 | 125 | Failed |
| explicit oracle 4 | 0 | 0 | Passed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 0 | 1 | Failed |
SHA-256 / 01ba1052e1bda407f6dddec2bf2a87e075364c61238554dd3c69d057ccc59c7c
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):
a=x;rank=0
for i in range(len(a)):
top=a[i];bottom=i+1
term=math.comb(top,bottom) if 0<=bottom<=top else 0
rank=term
return rank
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1], 1), ([1, 2], 2), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0], 0), ([0, 1], 0), ([0], 0), ([1], 1)], [([1], 1), ([2, 3], 5), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0, 3], 3), ([1, 2], 2), ([1, 3], 4), ([0, 1, 2], 0)], [([2], 2), ([1, 2], 2), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0, 4], 6), ([1, 3], 4), ([1, 4], 7), ([2, 3], 5)], [([0, 2], 1), ([2, 3], 5), ([0], 0), ([4, 5, 6, 7, 8], 125), ([0, 1, 2, 3], 0), ([0, 1, 2, 4], 1), ([0, 1, 3, 4], 2), ([0, 2, 3, 4], 3)], [([1, 2], 2), ([0, 2, 3], 2), ([0], 0), ([4, 5, 6, 7, 8], 125), ([1, 2], 2), ([1, 3], 4), ([1, 4], 7), ([1, 5], 11)]]
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 | Passed |
| explicit oracle 1 | 1 | 2 | Failed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 56 | 125 | Failed |
| explicit oracle 4 | 0 | 0 | Passed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 1 | 1 | Passed |
SHA-256 / c784a3d0c81a94652e0f1cc83ea62312fc20ce8901f65e257cf5d647613b728c
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:23.969705+00:00.
Case digest / 89944c6631e16e0fb4e8e43034722c8803a44e0ff3599536eb11a01a2873cf1f