FA-15651 / Numerics / Open access
Binary field inversion: Euclidean polynomial cancellation · case 01
The exact binary field inversion result violates the stated contract at Euclidean polynomial cancellation.
ROOT CAUSE
The Euclidean polynomial cancellation step uses u^(v>>j) instead of u^(v<<j).
THE FAILURE
The Euclidean polynomial cancellation step uses u^(v>>j) instead of u^(v<<j).
Unsuccessful approach: The partial repair u-(v<<j) still violates the Euclidean polynomial cancellation invariant.
Case contract
Input [a,irreducible bitmask], a nonzero with degree below modulus; return multiplicative inverse in binary field. Bounds: modulus degree is between two and six.
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,p=x;u=a;v=p;g1=1;g2=0
for _ in range(60):
if u==1:break
if u==0:return None
j=u.bit_length()-v.bit_length()
if j<0:
u,v=v,u;g1,g2=g2,g1;j=-j
u=u^(v>>j)
g1=g1^(g2<<j)
for _ in range(60):
if g1.bit_length()<p.bit_length():break
g1=g1^(p<<(g1.bit_length()-p.bit_length()))
return g1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 7], 3), ([3, 11], 6), ([1, 7], 1), ([63, 67], 32), ([3, 7], 2), ([1, 11], 1), ([2, 11], 5), ([4, 11], 7)], [([3, 7], 2), ([3, 19], 14), ([1, 7], 1), ([63, 67], 32), ([8, 19], 15), ([9, 19], 2), ([10, 19], 12), ([11, 19], 5)], [([2, 11], 5), ([6, 19], 7), ([1, 7], 1), ([63, 67], 32), ([10, 25], 11), ([11, 25], 10), ([12, 25], 2), ([13, 25], 9)], [([3, 11], 6), ([10, 19], 12), ([1, 7], 1), ([63, 67], 32), ([12, 31], 13), ([13, 31], 12), ([14, 31], 11), ([15, 31], 2)], [([4, 11], 7), ([14, 19], 3), ([1, 7], 1), ([63, 67], 32), ([14, 37], 6), ([15, 37], 13), ([16, 37], 11), ([17, 37], 24)]]
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 | 3 | Failed |
| explicit oracle 1 | 0 | 6 | Failed |
| explicit oracle 2 | 1 | 1 | Passed |
| explicit oracle 3 | 0 | 32 | Failed |
| explicit oracle 4 | 0 | 2 | Failed |
| explicit oracle 5 | 1 | 1 | Passed |
| explicit oracle 6 | 0 | 5 | Failed |
| explicit oracle 7 | 0 | 7 | Failed |
SHA-256 / 76ca606a849f83fe9fa5360e8d1df3ff079d23008d5c885a8b8ffdb97a30c03f
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,p=x;u=a;v=p;g1=1;g2=0
for _ in range(60):
if u==1:break
if u==0:return None
j=u.bit_length()-v.bit_length()
if j<0:
u,v=v,u;g1,g2=g2,g1;j=-j
u=u-(v<<j)
g1=g1^(g2<<j)
for _ in range(60):
if g1.bit_length()<p.bit_length():break
g1=g1^(p<<(g1.bit_length()-p.bit_length()))
return g1
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([2, 7], 3), ([3, 11], 6), ([1, 7], 1), ([63, 67], 32), ([3, 7], 2), ([1, 11], 1), ([2, 11], 5), ([4, 11], 7)], [([3, 7], 2), ([3, 19], 14), ([1, 7], 1), ([63, 67], 32), ([8, 19], 15), ([9, 19], 2), ([10, 19], 12), ([11, 19], 5)], [([2, 11], 5), ([6, 19], 7), ([1, 7], 1), ([63, 67], 32), ([10, 25], 11), ([11, 25], 10), ([12, 25], 2), ([13, 25], 9)], [([3, 11], 6), ([10, 19], 12), ([1, 7], 1), ([63, 67], 32), ([12, 31], 13), ([13, 31], 12), ([14, 31], 11), ([15, 31], 2)], [([4, 11], 7), ([14, 19], 3), ([1, 7], 1), ([63, 67], 32), ([14, 37], 6), ([15, 37], 13), ([16, 37], 11), ([17, 37], 24)]]
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 | 3 | 3 | Passed |
| explicit oracle 1 | 3 | 6 | Failed |
| explicit oracle 2 | 1 | 1 | Passed |
| explicit oracle 3 | 22 | 32 | Failed |
| explicit oracle 4 | 2 | 2 | Passed |
| explicit oracle 5 | 1 | 1 | Passed |
| explicit oracle 6 | 5 | 5 | Passed |
| explicit oracle 7 | 3 | 7 | Failed |
SHA-256 / 2d4e8e424d7d18fc54e7c2f85128ae709faac2dd3542a4d88eff37b32412e4aa
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:28.776869+00:00.
Case digest / 3064a13bb463f38ab63631a99be5f268760120d5b8233aa08665106019d03b45