FA-15591 / Numerics / Open access
Gf2 field multiplication: multiplier coefficient test · case 01
The exact gf2 field multiplication result violates the stated contract at multiplier coefficient test.
ROOT CAUSE
The multiplier coefficient test step uses b&2 instead of b&1.
VERIFIED REPAIR
Use b&1 at the multiplier coefficient test step.
Unsuccessful approach: The partial repair b==1 still violates the multiplier coefficient test invariant.
Case contract
Input [a,b,irreducible polynomial bitmask], nonnegative field elements; return carryless product reduced by that monic polynomial.
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,b,poly=x;n=poly.bit_length()-1;out=0
for _ in range(n):
if b&2:out=out^a
b=b>>1
a<<=1
if a&(1<<n):a=a^poly
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 1, 7], 1), ([1, 3, 7], 3), ([0, 0, 7], 0), ([15, 15, 31], 8), ([0, 1, 7], 0), ([0, 2, 7], 0), ([0, 3, 7], 0), ([1, 0, 7], 0)], [([1, 2, 7], 2), ([1, 3, 11], 3), ([0, 0, 7], 0), ([15, 15, 31], 8), ([0, 1, 11], 0), ([0, 2, 11], 0), ([0, 3, 11], 0), ([0, 4, 11], 0)], [([1, 3, 7], 3), ([1, 7, 11], 7), ([0, 0, 7], 0), ([15, 15, 31], 8), ([2, 2, 11], 4), ([2, 3, 11], 6), ([2, 4, 11], 3), ([2, 5, 11], 1)], [([2, 1, 7], 2), ([2, 6, 11], 7), ([0, 0, 7], 0), ([15, 15, 31], 8), ([4, 3, 11], 7), ([4, 4, 11], 6), ([4, 5, 11], 2), ([4, 6, 11], 5)], [([2, 2, 7], 3), ([3, 5, 11], 4), ([0, 0, 7], 0), ([15, 15, 31], 8), ([6, 4, 11], 5), ([6, 5, 11], 3), ([6, 6, 11], 2), ([6, 7, 11], 4)]]
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 | 1 | Failed |
| explicit oracle 1 | 1 | 3 | Failed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 12 | 8 | Failed |
| explicit oracle 4 | 0 | 0 | Passed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 0 | 0 | Passed |
SHA-256 / c4205f7915cadba9e58344ff850f5ab5a7709ceaed93b0b69ed4f407188ab359
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,b,poly=x;n=poly.bit_length()-1;out=0
for _ in range(n):
if b==1:out=out^a
b=b>>1
a<<=1
if a&(1<<n):a=a^poly
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 1, 7], 1), ([1, 3, 7], 3), ([0, 0, 7], 0), ([15, 15, 31], 8), ([0, 1, 7], 0), ([0, 2, 7], 0), ([0, 3, 7], 0), ([1, 0, 7], 0)], [([1, 2, 7], 2), ([1, 3, 11], 3), ([0, 0, 7], 0), ([15, 15, 31], 8), ([0, 1, 11], 0), ([0, 2, 11], 0), ([0, 3, 11], 0), ([0, 4, 11], 0)], [([1, 3, 7], 3), ([1, 7, 11], 7), ([0, 0, 7], 0), ([15, 15, 31], 8), ([2, 2, 11], 4), ([2, 3, 11], 6), ([2, 4, 11], 3), ([2, 5, 11], 1)], [([2, 1, 7], 2), ([2, 6, 11], 7), ([0, 0, 7], 0), ([15, 15, 31], 8), ([4, 3, 11], 7), ([4, 4, 11], 6), ([4, 5, 11], 2), ([4, 6, 11], 5)], [([2, 2, 7], 3), ([3, 5, 11], 4), ([0, 0, 7], 0), ([15, 15, 31], 8), ([6, 4, 11], 5), ([6, 5, 11], 3), ([6, 6, 11], 2), ([6, 7, 11], 4)]]
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 | 1 | Passed |
| explicit oracle 1 | 2 | 3 | Failed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 4 | 8 | Failed |
| explicit oracle 4 | 0 | 0 | Passed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 0 | 0 | Passed |
SHA-256 / 245acfa1938c75e96e9da76baba2cec5a5e3eb27cf166373fea1048332a0599f
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,b,poly=x;n=poly.bit_length()-1;out=0
for _ in range(n):
if b&1:out=out^a
b=b>>1
a<<=1
if a&(1<<n):a=a^poly
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([1, 1, 7], 1), ([1, 3, 7], 3), ([0, 0, 7], 0), ([15, 15, 31], 8), ([0, 1, 7], 0), ([0, 2, 7], 0), ([0, 3, 7], 0), ([1, 0, 7], 0)], [([1, 2, 7], 2), ([1, 3, 11], 3), ([0, 0, 7], 0), ([15, 15, 31], 8), ([0, 1, 11], 0), ([0, 2, 11], 0), ([0, 3, 11], 0), ([0, 4, 11], 0)], [([1, 3, 7], 3), ([1, 7, 11], 7), ([0, 0, 7], 0), ([15, 15, 31], 8), ([2, 2, 11], 4), ([2, 3, 11], 6), ([2, 4, 11], 3), ([2, 5, 11], 1)], [([2, 1, 7], 2), ([2, 6, 11], 7), ([0, 0, 7], 0), ([15, 15, 31], 8), ([4, 3, 11], 7), ([4, 4, 11], 6), ([4, 5, 11], 2), ([4, 6, 11], 5)], [([2, 2, 7], 3), ([3, 5, 11], 4), ([0, 0, 7], 0), ([15, 15, 31], 8), ([6, 4, 11], 5), ([6, 5, 11], 3), ([6, 6, 11], 2), ([6, 7, 11], 4)]]
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 | 1 | Passed |
| explicit oracle 1 | 3 | 3 | Passed |
| explicit oracle 2 | 0 | 0 | Passed |
| explicit oracle 3 | 8 | 8 | Passed |
| explicit oracle 4 | 0 | 0 | Passed |
| explicit oracle 5 | 0 | 0 | Passed |
| explicit oracle 6 | 0 | 0 | Passed |
| explicit oracle 7 | 0 | 0 | Passed |
SHA-256 / a2ebb15678f53090f53db68a8a85335820757086b0713b74976a0178457767ff
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:28.191996+00:00.
Case digest / c332b12a5fabad160887e9af085cf906a39c4bd67420703634c94458e5f038d8