FAILURE MAP
← Case archive

FA-15726 / Numerics / Open access

Finite field discrete transform: character exponent · case 01

The exact finite field discrete transform result violates the stated contract at character exponent.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The character exponent step uses pow(w,j+k,p) instead of pow(w,j*k,p).

VERIFIED REPAIR

Use pow(w,j*k,p) at the character exponent step.

Unsuccessful approach: The partial repair pow(w,-j*k,p) still violates the character exponent 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)
    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]), ([[0, 5, 4], 7, 2], [2, 5, 0]), ([[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])], [([[2, 1], 5, 4], [3, 1]), ([[4, 1, 3], 7, 2], [1, 4, 0]), ([[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]), ([[2, 5, 0], 7, 2], [0, 5, 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]), ([[1, 6, 1], 7, 2], [1, 3, 6]), ([[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]), ([[3, 0, 2], 7, 2], [5, 4, 0]), ([[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 fixtureActualExpectedOutcome
explicit oracle 0[2, 3][3, 2]Failed
explicit oracle 1[5, 3, 6][2, 5, 0]Failed
explicit oracle 2[14, 11, 5, 10, 3, 6, 12, 7][15, 14, 9, 14, 4, 14, 0, 10]Failed
explicit oracle 3[1, 4][3, 1]Failed
explicit oracle 4[1, 4][3, 1]Failed
explicit oracle 5[3, 2][3, 3]Failed
explicit oracle 6[3, 2][2, 3]Failed
explicit oracle 7[3, 2][4, 3]Failed

SHA-256 / 0c9c37d1dd491cd153433546c3b069fca664574a3ce18937e22c878f249e2c86

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)
    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]), ([[0, 5, 4], 7, 2], [2, 5, 0]), ([[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])], [([[2, 1], 5, 4], [3, 1]), ([[4, 1, 3], 7, 2], [1, 4, 0]), ([[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]), ([[2, 5, 0], 7, 2], [0, 5, 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]), ([[1, 6, 1], 7, 2], [1, 3, 6]), ([[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]), ([[3, 0, 2], 7, 2], [5, 4, 0]), ([[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 fixtureActualExpectedOutcome
explicit oracle 0[3, 2][3, 2]Passed
explicit oracle 1[2, 0, 5][2, 5, 0]Failed
explicit oracle 2[15, 10, 0, 14, 4, 14, 9, 14][15, 14, 9, 14, 4, 14, 0, 10]Failed
explicit oracle 3[3, 1][3, 1]Passed
explicit oracle 4[3, 1][3, 1]Passed
explicit oracle 5[3, 3][3, 3]Passed
explicit oracle 6[2, 3][2, 3]Passed
explicit oracle 7[4, 3][4, 3]Passed

SHA-256 / b963e17e187cfeedc441727f7e59517ea7570116a57c187bcebc268ce1b5240a

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]), ([[0, 5, 4], 7, 2], [2, 5, 0]), ([[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])], [([[2, 1], 5, 4], [3, 1]), ([[4, 1, 3], 7, 2], [1, 4, 0]), ([[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]), ([[2, 5, 0], 7, 2], [0, 5, 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]), ([[1, 6, 1], 7, 2], [1, 3, 6]), ([[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]), ([[3, 0, 2], 7, 2], [5, 4, 0]), ([[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 fixtureActualExpectedOutcome
explicit oracle 0[3, 2][3, 2]Passed
explicit oracle 1[2, 5, 0][2, 5, 0]Passed
explicit oracle 2[15, 14, 9, 14, 4, 14, 0, 10][15, 14, 9, 14, 4, 14, 0, 10]Passed
explicit oracle 3[3, 1][3, 1]Passed
explicit oracle 4[3, 1][3, 1]Passed
explicit oracle 5[3, 3][3, 3]Passed
explicit oracle 6[2, 3][2, 3]Passed
explicit oracle 7[4, 3][4, 3]Passed

SHA-256 / 188e0f5927845bd89b3cfa10e5b158574e6771c1a0065d73718918c3b0764524

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.477995+00:00.

Case digest / 0ef151c8aba1153426cac4ddfa70bfe79733385dbc390d841c74624aaa9f55ba