FA-6356 / Discrete calculus / Open access
Second central difference · case 01
The center sample is not doubled.
ROOT CAUSE
The center sample is not doubled.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return [a-2*b+c for a,b,c in zip(values,values[1:],values[2:])]
Unsuccessful approach: A first difference across two steps replaces curvature.
Case contract
Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. Second central difference. Exact operational definition: [a-2*b+c for a,b,c in zip(values,values[1:],values[2:])]
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Discrete calculus results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(values):
return [a-b+c for a,b,c in zip(values,values[1:],values[2:])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 4, 9, 16],)', solve(*([1, 4, 9, 16],)), [2, 2])
check('fixture 2: ([3, 3, 3],)', solve(*([3, 3, 3],)), [0])
check('fixture 3: ([1, 2],)', solve(*([1, 2],)), [])
check('fixture 4: ([0, 1, 0],)', solve(*([0, 1, 0],)), [-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 |
|---|---|---|---|
| fixture 1: ([1, 4, 9, 16],) | [6, 11] | [2, 2] | Failed |
| fixture 2: ([3, 3, 3],) | [3] | [0] | Failed |
| fixture 3: ([1, 2],) | [] | [] | Passed |
| fixture 4: ([0, 1, 0],) | [-1] | [-2] | Failed |
SHA-256 / a76e30261ccfa72c68cd2e56246884490648d940af57287bcd2f389ab9e37824
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(values):
return [c-a for a,b,c in zip(values,values[1:],values[2:])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 4, 9, 16],)', solve(*([1, 4, 9, 16],)), [2, 2])
check('fixture 2: ([3, 3, 3],)', solve(*([3, 3, 3],)), [0])
check('fixture 3: ([1, 2],)', solve(*([1, 2],)), [])
check('fixture 4: ([0, 1, 0],)', solve(*([0, 1, 0],)), [-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 |
|---|---|---|---|
| fixture 1: ([1, 4, 9, 16],) | [8, 12] | [2, 2] | Failed |
| fixture 2: ([3, 3, 3],) | [0] | [0] | Passed |
| fixture 3: ([1, 2],) | [] | [] | Passed |
| fixture 4: ([0, 1, 0],) | [0] | [-2] | Failed |
SHA-256 / 3aae46b0d1e204ee8df80d6496e3ec2aefd6a7d740a89fbb2d576a431e1b31bd
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(values):
return [a-2*b+c for a,b,c in zip(values,values[1:],values[2:])]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 4, 9, 16],)', solve(*([1, 4, 9, 16],)), [2, 2])
check('fixture 2: ([3, 3, 3],)', solve(*([3, 3, 3],)), [0])
check('fixture 3: ([1, 2],)', solve(*([1, 2],)), [])
check('fixture 4: ([0, 1, 0],)', solve(*([0, 1, 0],)), [-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 |
|---|---|---|---|
| fixture 1: ([1, 4, 9, 16],) | [2, 2] | [2, 2] | Passed |
| fixture 2: ([3, 3, 3],) | [0] | [0] | Passed |
| fixture 3: ([1, 2],) | [] | [] | Passed |
| fixture 4: ([0, 1, 0],) | [-2] | [-2] | Passed |
SHA-256 / 4049f50c67e8f0ace47128ef5a36d34fb7385a32570475306c6b4f952d9daff1
Verification & scope
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:38:00.624180+00:00.
Case digest / 968c8a0fb6f8e5f3cf8707d869e2e251fc394443d2afa4ff01ae163497a86aa8