FA-15676 / Numerics / Open access
Binary field trace: trace field addition · case 01
The exact binary field trace result violates the stated contract at trace field addition.
ROOT CAUSE
The trace field addition step uses out+v instead of out^v.
THE FAILURE
The trace field addition step uses out+v instead of out^v.
Unsuccessful approach: The partial repair out|v still violates the trace field addition invariant.
Case contract
Input [a,irreducible bitmask]; return absolute field trace a+a^2+...+a^(2^(n-1)), an F2 element represented integer 0 or1.
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,poly=x;n=poly.bit_length()-1
def mul(a,b):
z=0
while b:
if b&1:z^=a
b>>=1;a<<=1
if a&(1<<n):a^=poly
return z
v=a;out=0
for _ in range(n):
out=out+v
v=mul(v,v)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 7], 0), ([0, 7], 0), ([63, 67], 1), ([2, 7], 1), ([3, 7], 1), ([0, 11], 0), ([1, 11], 1), ([2, 11], 0)], [([2, 7], 1), ([2, 11], 0), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([3, 7], 1), ([5, 11], 1), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1)], [([1, 11], 1), ([1, 19], 0), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([2, 11], 0), ([4, 19], 0), ([0, 7], 0), ([63, 67], 1), ([8, 37], 1), ([9, 37], 0), ([10, 37], 1), ([11, 37], 0)]]
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 | 2 | 0 | Failed |
| explicit oracle 1 | 0 | 0 | Passed |
| explicit oracle 2 | 307 | 1 | Failed |
| explicit oracle 3 | 5 | 1 | Failed |
| explicit oracle 4 | 5 | 1 | Failed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 3 | 1 | Failed |
| explicit oracle 7 | 12 | 0 | Failed |
SHA-256 / 5b20731f41e87fd5d28295be9b1ae1219bb177505d01d0872e7aeeff6d977c23
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,poly=x;n=poly.bit_length()-1
def mul(a,b):
z=0
while b:
if b&1:z^=a
b>>=1;a<<=1
if a&(1<<n):a^=poly
return z
v=a;out=0
for _ in range(n):
out=out|v
v=mul(v,v)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 7], 0), ([0, 7], 0), ([63, 67], 1), ([2, 7], 1), ([3, 7], 1), ([0, 11], 0), ([1, 11], 1), ([2, 11], 0)], [([2, 7], 1), ([2, 11], 0), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([3, 7], 1), ([5, 11], 1), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1)], [([1, 11], 1), ([1, 19], 0), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([2, 11], 0), ([4, 19], 0), ([0, 7], 0), ([63, 67], 1), ([8, 37], 1), ([9, 37], 0), ([10, 37], 1), ([11, 37], 0)]]
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 | 0 | Failed |
| explicit oracle 1 | 0 | 0 | Passed |
| explicit oracle 2 | 63 | 1 | Failed |
| explicit oracle 3 | 3 | 1 | Failed |
| explicit oracle 4 | 3 | 1 | Failed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 1 | 1 | Passed |
| explicit oracle 7 | 6 | 0 | Failed |
SHA-256 / e525c7dc417e4fd7c16e561ba539a3315aa4c257588eed40fc3244b8b9feb13f
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:29.104773+00:00.
Case digest / 354465a4b27e428c5973472747021e918e6033116fa3f852580433c420b5126d