FA-13381 / Numerical aggregation / Open access
Empirical cdf supremum: The maximum point-mass difference is used without cumulative accumulation. · case 01
The reduction disagrees with its explicit aggregation oracle.
ROOT CAUSE
The maximum point-mass difference is used without cumulative accumulation.
VERIFIED REPAIR
Preserve the empirical cdf supremum contract at the identified reduction decision.
Unsuccessful approach: Accumulating only one distribution compares cumulative and local mass.
Case contract
Return the maximum absolute difference between the right-continuous empirical cumulative distributions of two nonempty integer samples as a Fraction string. Empty either side returns None.
Why this case matters
Exact bounded examples isolate a reduction defect without floating-point or external-service effects.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
if not a or not b: return None
ca,cb=Counter(a),Counter(b)
pa=pb=Fraction(0)
best=Fraction(0)
for x in sorted(set(ca)|set(cb)):
pa=Fraction(ca[x],len(a))
pb=Fraction(cb[x],len(b))
best=max(best,abs(pa-pb))
return str(best)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3], [0])), '1')
check('regression 2', solve(*([-5, 3], [-2, 1])), '1/2')
check('regression 3', solve(*([1, 1, 4], [2, 3])), '2/3')
check('regression 4', solve(*([0, 0, 0], [0])), '0')
check('regression 5', solve(*([], [1])), None)
check('regression 6', solve(*([1, 2], [1, 2])), '0')
check('regression 7', solve(*([-5, 0, 8], [-2, 8, 8, 8])), '5/12')
check('regression 8', solve(*([0, 4], [0, 1, 2, 3, 4])), '3/10')
check('regression 9', solve(*([2, 2], [1, 1, 3, 3])), '1/2')
check("variable support",solve([0,N],[N,N]),"1/2")
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 1 | 1 | 1 | Passed |
| regression 2 | 1/2 | 1/2 | Passed |
| regression 3 | 2/3 | 2/3 | Passed |
| regression 4 | 0 | 0 | Passed |
| regression 5 | None | None | Passed |
| regression 6 | 0 | 0 | Passed |
| regression 7 | 5/12 | 5/12 | Passed |
| regression 8 | 3/10 | 3/10 | Passed |
| regression 9 | 1 | 1/2 | Failed |
| variable support | 1/2 | 1/2 | Passed |
SHA-256 / 7b3a0aab46115602cdaba28b58479651cc9097747f71c14234c644955c8da986
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
if not a or not b: return None
ca,cb=Counter(a),Counter(b)
pa=pb=Fraction(0)
best=Fraction(0)
for x in sorted(set(ca)|set(cb)):
pa+=Fraction(ca[x],len(a))
pb=Fraction(cb[x],len(b))
best=max(best,abs(pa-pb))
return str(best)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3], [0])), '1')
check('regression 2', solve(*([-5, 3], [-2, 1])), '1/2')
check('regression 3', solve(*([1, 1, 4], [2, 3])), '2/3')
check('regression 4', solve(*([0, 0, 0], [0])), '0')
check('regression 5', solve(*([], [1])), None)
check('regression 6', solve(*([1, 2], [1, 2])), '0')
check('regression 7', solve(*([-5, 0, 8], [-2, 8, 8, 8])), '5/12')
check('regression 8', solve(*([0, 4], [0, 1, 2, 3, 4])), '3/10')
check('regression 9', solve(*([2, 2], [1, 1, 3, 3])), '1/2')
check("variable support",solve([0,N],[N,N]),"1/2")
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 1 | 1 | 1 | Passed |
| regression 2 | 1 | 1/2 | Failed |
| regression 3 | 1 | 2/3 | Failed |
| regression 4 | 0 | 0 | Passed |
| regression 5 | None | None | Passed |
| regression 6 | 1/2 | 0 | Failed |
| regression 7 | 2/3 | 5/12 | Failed |
| regression 8 | 4/5 | 3/10 | Failed |
| regression 9 | 1 | 1/2 | Failed |
| variable support | 1/2 | 1/2 | Passed |
SHA-256 / cf52da700c9d44474c1a7a21046b436bd1d64efbf545bd168255f8a08e911acf
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
from collections import Counter, defaultdict
import math
import itertools
N = 1
observations = []
def solve(a, b):
if not a or not b: return None
ca,cb=Counter(a),Counter(b)
pa=pb=Fraction(0)
best=Fraction(0)
for x in sorted(set(ca)|set(cb)):
pa+=Fraction(ca[x],len(a))
pb+=Fraction(cb[x],len(b))
best=max(best,abs(pa-pb))
return str(best)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([3], [0])), '1')
check('regression 2', solve(*([-5, 3], [-2, 1])), '1/2')
check('regression 3', solve(*([1, 1, 4], [2, 3])), '2/3')
check('regression 4', solve(*([0, 0, 0], [0])), '0')
check('regression 5', solve(*([], [1])), None)
check('regression 6', solve(*([1, 2], [1, 2])), '0')
check('regression 7', solve(*([-5, 0, 8], [-2, 8, 8, 8])), '5/12')
check('regression 8', solve(*([0, 4], [0, 1, 2, 3, 4])), '3/10')
check('regression 9', solve(*([2, 2], [1, 1, 3, 3])), '1/2')
check("variable support",solve([0,N],[N,N]),"1/2")
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 1 | 1 | 1 | Passed |
| regression 2 | 1/2 | 1/2 | Passed |
| regression 3 | 2/3 | 2/3 | Passed |
| regression 4 | 0 | 0 | Passed |
| regression 5 | None | None | Passed |
| regression 6 | 0 | 0 | Passed |
| regression 7 | 5/12 | 5/12 | Passed |
| regression 8 | 3/10 | 3/10 | Passed |
| regression 9 | 1/2 | 1/2 | Passed |
| variable support | 1/2 | 1/2 | Passed |
SHA-256 / ddf4ebc36608e574c462ed740eefb855c4c46abcb901c6a609803ce88ef84dbe
Verification & scope
Small offline integer/rational inputs only; no performance, statistical inference, or production-library conformance claim. 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:06.485728+00:00.
Case digest / c530343fb7c9675e750eef611528d4d81f06cdd62c7da678f060beda31389478