FAILURE MAP
← Case archive

FA-13896 / Numerical aggregation / Open access

Retractable zero aware product: The multiplicative accumulator starts at zero. · case 01

The reduction disagrees with its explicit aggregation oracle.

Verified by executionVariant 1 · 11 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The multiplicative accumulator starts at zero.

THE FAILURE

The multiplicative accumulator starts at zero.

Unsuccessful approach: Negative one changes every empty and even-negative product sign.

Case contract

Process add/remove integer factors; each removal removes one currently present equal factor. Return the exact product of active factors with empty product one. Preserve zero multiplicity and signed parity while zero factors temporarily hide the nonzero product.

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(events):
    magnitude=0
    negative=zero=0
    for op,x in events:
        if op=="add":
            if x==0: zero+=1
            else:
                magnitude*=abs(x)
                negative+=int(x<0)
        else:
            if x==0: zero-=1
            else:
                magnitude//=abs(x)
                negative-=int(x<0)
    return 0 if zero else (-magnitude if negative%2 else magnitude)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([('add', 0), ('add', 0)],)), 0)
check('regression 2', solve(*([('add', 0), ('add', -3)],)), 0)
check('regression 3', solve(*([('add', -1), ('add', -2), ('add', -3)],)), -6)
check('regression 4', solve(*([('add', 2), ('add', 0), ('add', -3), ('remove', 0)],)), -6)
check('regression 5', solve(*([('add', 0), ('add', 0), ('remove', 0)],)), 0)
check('regression 6', solve(*([],)), 1)
check('regression 7', solve(*([('add', -2), ('add', -3), ('remove', -2)],)), -3)
check('regression 8', solve(*([('add', 3), ('add', 3), ('remove', 3)],)), 3)
check('regression 9', solve(*([('add', -1), ('remove', -1)],)), 1)
check('regression 10', solve(*([('add', -2), ('add', 5), ('add', -3)],)), 30)
check("variable zero removal",solve([("add",N),("add",0),("add",-2),("remove",0)]),-2*N)
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 fixtureActualExpectedOutcome
regression 100Passed
regression 200Passed
regression 30-6Failed
regression 40-6Failed
regression 500Passed
regression 601Failed
regression 70-3Failed
regression 803Failed
regression 901Failed
regression 10030Failed
variable zero removal0-2Failed

SHA-256 / 5ac84bb564f61c1ab881096bd36b7b3a6a618b321734b9cf2e30cf63d015f6cf

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(events):
    magnitude=-1
    negative=zero=0
    for op,x in events:
        if op=="add":
            if x==0: zero+=1
            else:
                magnitude*=abs(x)
                negative+=int(x<0)
        else:
            if x==0: zero-=1
            else:
                magnitude//=abs(x)
                negative-=int(x<0)
    return 0 if zero else (-magnitude if negative%2 else magnitude)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('regression 1', solve(*([('add', 0), ('add', 0)],)), 0)
check('regression 2', solve(*([('add', 0), ('add', -3)],)), 0)
check('regression 3', solve(*([('add', -1), ('add', -2), ('add', -3)],)), -6)
check('regression 4', solve(*([('add', 2), ('add', 0), ('add', -3), ('remove', 0)],)), -6)
check('regression 5', solve(*([('add', 0), ('add', 0), ('remove', 0)],)), 0)
check('regression 6', solve(*([],)), 1)
check('regression 7', solve(*([('add', -2), ('add', -3), ('remove', -2)],)), -3)
check('regression 8', solve(*([('add', 3), ('add', 3), ('remove', 3)],)), 3)
check('regression 9', solve(*([('add', -1), ('remove', -1)],)), 1)
check('regression 10', solve(*([('add', -2), ('add', 5), ('add', -3)],)), 30)
check("variable zero removal",solve([("add",N),("add",0),("add",-2),("remove",0)]),-2*N)
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 fixtureActualExpectedOutcome
regression 100Passed
regression 200Passed
regression 36-6Failed
regression 46-6Failed
regression 500Passed
regression 6-11Failed
regression 73-3Failed
regression 8-33Failed
regression 9-11Failed
regression 10-3030Failed
variable zero removal2-2Failed

SHA-256 / ceb856c38668e1028f1220849e7a8a236ee5536eac5946c2845f0d2aafe897c6

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 11 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

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:11.638773+00:00.

Case digest / a1f6b5b9d212c879fef966e64b79df6da10ea79806d4dfcd8ba47eaa5171d665