FA-15681 / Numerics / Open access
Binary field trace: Frobenius squaring transition · case 01
The exact binary field trace result violates the stated contract at Frobenius squaring transition.
ROOT CAUSE
The Frobenius squaring transition step uses mul(v,a) instead of mul(v,v).
VERIFIED REPAIR
Use mul(v,v) at the Frobenius squaring transition step.
Unsuccessful approach: The partial repair v<<1 still violates the Frobenius squaring transition 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,a)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 11], 0), ([1, 7], 0), ([0, 7], 0), ([63, 67], 1), ([2, 7], 1), ([3, 7], 1), ([0, 11], 0), ([1, 11], 1)], [([3, 11], 1), ([1, 11], 1), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([4, 11], 0), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1), ([10, 25], 0)], [([5, 11], 1), ([7, 11], 1), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([6, 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 | 5 | 0 | Failed |
| explicit oracle 1 | 0 | 0 | Passed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 38 | 1 | Failed |
| explicit oracle 4 | 1 | 1 | Passed |
| explicit oracle 5 | 1 | 1 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 1 | 1 | Passed |
SHA-256 / 1919b86124bb5ec529d31de65dc9985f7ca24086bbee81defe3ae20d1e1a795a
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=v<<1
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 11], 0), ([1, 7], 0), ([0, 7], 0), ([63, 67], 1), ([2, 7], 1), ([3, 7], 1), ([0, 11], 0), ([1, 11], 1)], [([3, 11], 1), ([1, 11], 1), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([4, 11], 0), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1), ([10, 25], 0)], [([5, 11], 1), ([7, 11], 1), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([6, 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 | 14 | 0 | Failed |
| explicit oracle 1 | 3 | 0 | Failed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 1365 | 1 | Failed |
| explicit oracle 4 | 6 | 1 | Failed |
| explicit oracle 5 | 5 | 1 | Failed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 7 | 1 | Failed |
SHA-256 / d1c61cc6209426b667bce259520d252faa3eac82f2937b6572dbd29df9cb58f0
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 = [[([2, 11], 0), ([1, 7], 0), ([0, 7], 0), ([63, 67], 1), ([2, 7], 1), ([3, 7], 1), ([0, 11], 0), ([1, 11], 1)], [([3, 11], 1), ([1, 11], 1), ([0, 7], 0), ([63, 67], 1), ([5, 19], 0), ([6, 19], 0), ([7, 19], 0), ([8, 19], 1)], [([4, 11], 0), ([0, 7], 0), ([63, 67], 1), ([6, 25], 0), ([7, 25], 0), ([8, 25], 1), ([9, 25], 1), ([10, 25], 0)], [([5, 11], 1), ([7, 11], 1), ([0, 7], 0), ([63, 67], 1), ([7, 31], 0), ([8, 31], 1), ([9, 31], 1), ([10, 31], 0)], [([6, 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 | 0 | 0 | Passed |
| explicit oracle 3 | 1 | 1 | Passed |
| explicit oracle 4 | 1 | 1 | Passed |
| explicit oracle 5 | 1 | 1 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 1 | 1 | Passed |
SHA-256 / 4569e44d2638fb4731aac02cb3202892764784f76b0e6daa2b24a140310f2be7
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.288427+00:00.
Case digest / b0f841eca6b50538de97a1d8490f4b240d51fba31c7163c87d0ea2cecc7f9ff7