FA-15736 / Numerics / Open access
Finite field discrete transform: transform normalization convention · case 01
The exact finite field discrete transform result violates the stated contract at transform normalization convention.
ROOT CAUSE
The transform normalization convention step uses total*pow(n,-1,p)%p instead of total.
VERIFIED REPAIR
Use total at the transform normalization convention step.
Unsuccessful approach: The partial repair total*n%p still violates the transform normalization convention invariant.
Case contract
Input [values,p,w], len(values)=n and w has exact multiplicative order n modulo prime p; forward transform sum values[j]*w^(j*k) modulo p.
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):
values,p,w=x;n=len(values);out=[]
for k in range(n):
total=0
for j in range(n):
factor=pow(w,j*k,p)
total=(total+values[j]*factor)%p
out.append(total*pow(n,-1,p)%p)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[2, 1], 5, 4], [3, 1]), ([[2, 1], 5, 4], [3, 1]), ([[3, 0], 5, 4], [3, 3]), ([[0, 2], 5, 4], [2, 3]), ([[1, 3], 5, 4], [4, 3]), ([[0, 4], 5, 4], [4, 1])], [([[2, 1], 5, 4], [3, 1]), ([[3, 0], 5, 4], [3, 3]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[0, 2], 5, 4], [2, 3]), ([[1, 1], 5, 4], [2, 0]), ([[4, 3], 5, 4], [2, 1]), ([[2, 0], 5, 4], [2, 2])], [([[2, 1], 5, 4], [3, 1]), ([[0, 4], 5, 4], [4, 1]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[4, 0], 5, 4], [4, 4]), ([[1, 4], 5, 4], [0, 2]), ([[1, 2], 5, 4], [3, 4]), ([[0, 3], 5, 4], [3, 2])], [([[3, 0], 5, 4], [3, 3]), ([[3, 1], 5, 4], [4, 2]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[4, 3], 5, 4], [2, 1]), ([[4, 1], 5, 4], [0, 3]), ([[1, 0], 5, 4], [1, 1]), ([[3, 3], 5, 4], [1, 0])], [([[0, 2], 5, 4], [2, 3]), ([[4, 0], 5, 4], [4, 4]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[2, 5, 0], 7, 2], [0, 5, 1]), ([[0, 0, 4], 7, 2], [4, 2, 1]), ([[5, 5, 2], 7, 2], [5, 2, 1]), ([[1, 6, 1], 7, 2], [1, 3, 6])]]
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 | [4, 1] | [3, 2] | Failed |
| explicit oracle 1 | [4, 6, 16, 6, 9, 6, 0, 14] | [15, 14, 9, 14, 4, 14, 0, 10] | Failed |
| explicit oracle 2 | [4, 3] | [3, 1] | Failed |
| explicit oracle 3 | [4, 3] | [3, 1] | Failed |
| explicit oracle 4 | [4, 4] | [3, 3] | Failed |
| explicit oracle 5 | [1, 4] | [2, 3] | Failed |
| explicit oracle 6 | [2, 4] | [4, 3] | Failed |
| explicit oracle 7 | [2, 3] | [4, 1] | Failed |
SHA-256 / de50158390fe78f29fc4fd07be0abfedcd6672edf8faafa704d745011a159acc
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):
values,p,w=x;n=len(values);out=[]
for k in range(n):
total=0
for j in range(n):
factor=pow(w,j*k,p)
total=(total+values[j]*factor)%p
out.append(total*n%p)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[2, 1], 5, 4], [3, 1]), ([[2, 1], 5, 4], [3, 1]), ([[3, 0], 5, 4], [3, 3]), ([[0, 2], 5, 4], [2, 3]), ([[1, 3], 5, 4], [4, 3]), ([[0, 4], 5, 4], [4, 1])], [([[2, 1], 5, 4], [3, 1]), ([[3, 0], 5, 4], [3, 3]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[0, 2], 5, 4], [2, 3]), ([[1, 1], 5, 4], [2, 0]), ([[4, 3], 5, 4], [2, 1]), ([[2, 0], 5, 4], [2, 2])], [([[2, 1], 5, 4], [3, 1]), ([[0, 4], 5, 4], [4, 1]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[4, 0], 5, 4], [4, 4]), ([[1, 4], 5, 4], [0, 2]), ([[1, 2], 5, 4], [3, 4]), ([[0, 3], 5, 4], [3, 2])], [([[3, 0], 5, 4], [3, 3]), ([[3, 1], 5, 4], [4, 2]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[4, 3], 5, 4], [2, 1]), ([[4, 1], 5, 4], [0, 3]), ([[1, 0], 5, 4], [1, 1]), ([[3, 3], 5, 4], [1, 0])], [([[0, 2], 5, 4], [2, 3]), ([[4, 0], 5, 4], [4, 4]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[2, 5, 0], 7, 2], [0, 5, 1]), ([[0, 0, 4], 7, 2], [4, 2, 1]), ([[5, 5, 2], 7, 2], [5, 2, 1]), ([[1, 6, 1], 7, 2], [1, 3, 6])]]
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, 4] | [3, 2] | Failed |
| explicit oracle 1 | [1, 10, 4, 10, 15, 10, 0, 12] | [15, 14, 9, 14, 4, 14, 0, 10] | Failed |
| explicit oracle 2 | [1, 2] | [3, 1] | Failed |
| explicit oracle 3 | [1, 2] | [3, 1] | Failed |
| explicit oracle 4 | [1, 1] | [3, 3] | Failed |
| explicit oracle 5 | [4, 1] | [2, 3] | Failed |
| explicit oracle 6 | [3, 1] | [4, 3] | Failed |
| explicit oracle 7 | [3, 2] | [4, 1] | Failed |
SHA-256 / bddb1a7a99f2244edb2871e248077b968d3889011a6d867baec595239843eacf
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):
values,p,w=x;n=len(values);out=[]
for k in range(n):
total=0
for j in range(n):
factor=pow(w,j*k,p)
total=(total+values[j]*factor)%p
out.append(total)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[2, 1], 5, 4], [3, 1]), ([[2, 1], 5, 4], [3, 1]), ([[3, 0], 5, 4], [3, 3]), ([[0, 2], 5, 4], [2, 3]), ([[1, 3], 5, 4], [4, 3]), ([[0, 4], 5, 4], [4, 1])], [([[2, 1], 5, 4], [3, 1]), ([[3, 0], 5, 4], [3, 3]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[0, 2], 5, 4], [2, 3]), ([[1, 1], 5, 4], [2, 0]), ([[4, 3], 5, 4], [2, 1]), ([[2, 0], 5, 4], [2, 2])], [([[2, 1], 5, 4], [3, 1]), ([[0, 4], 5, 4], [4, 1]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[4, 0], 5, 4], [4, 4]), ([[1, 4], 5, 4], [0, 2]), ([[1, 2], 5, 4], [3, 4]), ([[0, 3], 5, 4], [3, 2])], [([[3, 0], 5, 4], [3, 3]), ([[3, 1], 5, 4], [4, 2]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[4, 3], 5, 4], [2, 1]), ([[4, 1], 5, 4], [0, 3]), ([[1, 0], 5, 4], [1, 1]), ([[3, 3], 5, 4], [1, 0])], [([[0, 2], 5, 4], [2, 3]), ([[4, 0], 5, 4], [4, 4]), ([[0, 3], 5, 4], [3, 2]), ([[10, 15, 12, 4, 14, 0, 16, 12], 17, 2], [15, 14, 9, 14, 4, 14, 0, 10]), ([[2, 5, 0], 7, 2], [0, 5, 1]), ([[0, 0, 4], 7, 2], [4, 2, 1]), ([[5, 5, 2], 7, 2], [5, 2, 1]), ([[1, 6, 1], 7, 2], [1, 3, 6])]]
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, 2] | [3, 2] | Passed |
| explicit oracle 1 | [15, 14, 9, 14, 4, 14, 0, 10] | [15, 14, 9, 14, 4, 14, 0, 10] | Passed |
| explicit oracle 2 | [3, 1] | [3, 1] | Passed |
| explicit oracle 3 | [3, 1] | [3, 1] | Passed |
| explicit oracle 4 | [3, 3] | [3, 3] | Passed |
| explicit oracle 5 | [2, 3] | [2, 3] | Passed |
| explicit oracle 6 | [4, 3] | [4, 3] | Passed |
| explicit oracle 7 | [4, 1] | [4, 1] | Passed |
SHA-256 / 5884d77836ac915b12824d2e7ca49f84f2f810cffeb214f5c7103cba6b49ed27
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.758791+00:00.
Case digest / edaaa3b19b8279321982435172d8d427c872209e5fa81a3c9fba42f32ae74773