FA-15671 / Numerics / Open access
Binary field trace: field extension degree orbit length · case 01
The exact binary field trace result violates the stated contract at field extension degree orbit length.
ROOT CAUSE
The field extension degree orbit length step uses range(n-1) instead of range(n).
VERIFIED REPAIR
Use range(n) at the field extension degree orbit length step.
Unsuccessful approach: The partial repair range(n+1) still violates the field extension degree orbit length 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-1):
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), ([1, 11], 1), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([3, 7], 1), ([4, 11], 0), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1)], [([1, 11], 1), ([7, 11], 1), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([2, 11], 0), ([3, 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 | 57 | 1 | Failed |
| explicit oracle 3 | 2 | 1 | Failed |
| explicit oracle 4 | 3 | 1 | Failed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 1 | Failed |
| explicit oracle 7 | 6 | 0 | Failed |
SHA-256 / 3162a60510bef74bc933beadfd7d7d1eecee5a24bf20f174f213aaab7515827d
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+1):
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), ([1, 11], 1), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([3, 7], 1), ([4, 11], 0), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1)], [([1, 11], 1), ([7, 11], 1), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([2, 11], 0), ([3, 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 | 62 | 1 | Failed |
| explicit oracle 3 | 3 | 1 | Failed |
| explicit oracle 4 | 2 | 1 | Failed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 1 | Failed |
| explicit oracle 7 | 2 | 0 | Failed |
SHA-256 / 1c1605b2c22c73975fdb9f018401ac3cd045df5e611caf27a4cd717725116712
3 / The verified repair
Exit 0"""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), ([1, 11], 1), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([3, 7], 1), ([4, 11], 0), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1)], [([1, 11], 1), ([7, 11], 1), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([2, 11], 0), ([3, 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 | 0 | 0 | Passed |
| explicit oracle 1 | 0 | 0 | Passed |
| explicit oracle 2 | 1 | 1 | Passed |
| explicit oracle 3 | 1 | 1 | Passed |
| explicit oracle 4 | 1 | 1 | Passed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 1 | 1 | Passed |
| explicit oracle 7 | 0 | 0 | Passed |
SHA-256 / 1e9918d7c5d7d9b842e3c60461c15a7f3aa52296077817f6b356903180a3c11f
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.056327+00:00.
Case digest / 700c69016d05fd7090e4318eb8d7841a38950a80c1fe81c183a99dace04e4032