FAILURE MAP
← Case archive

FA-15461 / Numerics / Open access

Exact ldl decomposition: lower factor diagonal divisor · case 01

The exact exact ldl decomposition result violates the stated contract at lower factor diagonal divisor.

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

ROOT CAUSE

The lower factor diagonal divisor step uses a[j][j] instead of D[j].

VERIFIED REPAIR

Use D[j] at the lower factor diagonal divisor step.

Unsuccessful approach: The partial repair D[j-1] if j else 1 still violates the lower factor diagonal divisor invariant.

Case contract

Input symmetric positive definite integer matrix; return unit lower L and diagonal D as rational pairs such that A=L*D*Ltranspose.

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=[list(map(Fraction,row)) for row in x];n=len(a);L=[[Fraction(int(i==j)) for j in range(n)] for i in range(n)];D=[Fraction(0)]*n
    for j in range(n):
     D[j]=a[j][j]-sum(L[j][k]**2*D[k] for k in range(j))
     if not D[j]:return None
     for i in range(j+1,n):
      L[i][j]=(a[i][j]-sum(L[i][k]*L[j][k]*D[k] for k in range(j)))/(a[j][j])
    return [[[[v.numerator,v.denominator] for v in row] for row in L],[[v.numerator,v.denominator] for v in D]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[15, 14, 1], [14, 20, -1], [1, -1, 6]], [[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]]), ([[14, 2], [2, 2]], [[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]])], [([[11, 2, 6], [2, 14, 6], [6, 6, 9]], [[[[1, 1], [0, 1], [0, 1]], [[2, 11], [1, 1], [0, 1]], [[6, 11], [9, 25], [1, 1]]], [[11, 1], [150, 11], [99, 25]]]), ([[14, -12], [-12, 14]], [[[[1, 1], [0, 1]], [[-6, 7], [1, 1]]], [[14, 1], [26, 7]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]])], [([[20, -4, -6], [-4, 15, 11], [-6, 11, 15]], [[[[1, 1], [0, 1], [0, 1]], [[-1, 5], [1, 1], [0, 1]], [[-3, 10], [49, 71], [1, 1]]], [[20, 1], [71, 5], [457, 71]]]), ([[14, -1], [-1, 6]], [[[[1, 1], [0, 1]], [[-1, 14], [1, 1]]], [[14, 1], [83, 14]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]])], [([[7, 2, -10], [2, 5, -4], [-10, -4, 18]], [[[[1, 1], [0, 1], [0, 1]], [[2, 7], [1, 1], [0, 1]], [[-10, 7], [-8, 31], [1, 1]]], [[7, 1], [31, 7], [106, 31]]]), ([[19, 15], [15, 14]], [[[[1, 1], [0, 1]], [[15, 19], [1, 1]]], [[19, 1], [41, 19]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]])], [([[18, -12, -2], [-12, 14, 2], [-2, 2, 13]], [[[[1, 1], [0, 1], [0, 1]], [[-2, 3], [1, 1], [0, 1]], [[-1, 9], [1, 9], [1, 1]]], [[18, 1], [6, 1], [343, 27]]]), ([[11, 6], [6, 5]], [[[[1, 1], [0, 1]], [[6, 11], [1, 1]]], [[11, 1], [19, 11]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[1, 0], [0, 19]], [[[[1, 1], [0, 1]], [[0, 1], [1, 1]]], [[1, 1], [19, 1]]]), ([[3, 2], [2, 5]], [[[[1, 1], [0, 1]], [[2, 3], [1, 1]]], [[3, 1], [11, 3]]]), ([[9, 0], [0, 1]], [[[[1, 1], [0, 1]], [[0, 1], [1, 1]]], [[9, 1], [1, 1]]]), ([[6, 5], [5, 11]], [[[[1, 1], [0, 1]], [[5, 6], [1, 1]]], [[6, 1], [41, 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[[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 300], [1, 1]]], [[15, 1], [104, 15], [990317, 168750]]][[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]]Failed
explicit oracle 1[[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]][[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]]Passed
explicit oracle 2[[[[1, 1]]], [[2, 1]]][[[[1, 1]]], [[2, 1]]]Passed
explicit oracle 3[[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-3, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 40], [881, 3000], [1, 1]]], [[20, 1], [24, 5], [123, 40], [1949017399, 120000000]]][[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]Failed
explicit oracle 4[[[[1, 1]]], [[5, 1]]][[[[1, 1]]], [[5, 1]]]Passed
explicit oracle 5[[[[1, 1]]], [[5, 1]]][[[[1, 1]]], [[5, 1]]]Passed
explicit oracle 6[[[[1, 1]]], [[2, 1]]][[[[1, 1]]], [[2, 1]]]Passed
explicit oracle 7[[[[1, 1]]], [[10, 1]]][[[[1, 1]]], [[10, 1]]]Passed

SHA-256 / b880a502a456a18890b50c396885cdb1332d202c19e6e770a31bff74ddbae6db

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=[list(map(Fraction,row)) for row in x];n=len(a);L=[[Fraction(int(i==j)) for j in range(n)] for i in range(n)];D=[Fraction(0)]*n
    for j in range(n):
     D[j]=a[j][j]-sum(L[j][k]**2*D[k] for k in range(j))
     if not D[j]:return None
     for i in range(j+1,n):
      L[i][j]=(a[i][j]-sum(L[i][k]*L[j][k]*D[k] for k in range(j)))/(D[j-1] if j else 1)
    return [[[[v.numerator,v.denominator] for v in row] for row in L],[[v.numerator,v.denominator] for v in D]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[15, 14, 1], [14, 20, -1], [1, -1, 6]], [[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]]), ([[14, 2], [2, 2]], [[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]])], [([[11, 2, 6], [2, 14, 6], [6, 6, 9]], [[[[1, 1], [0, 1], [0, 1]], [[2, 11], [1, 1], [0, 1]], [[6, 11], [9, 25], [1, 1]]], [[11, 1], [150, 11], [99, 25]]]), ([[14, -12], [-12, 14]], [[[[1, 1], [0, 1]], [[-6, 7], [1, 1]]], [[14, 1], [26, 7]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]])], [([[20, -4, -6], [-4, 15, 11], [-6, 11, 15]], [[[[1, 1], [0, 1], [0, 1]], [[-1, 5], [1, 1], [0, 1]], [[-3, 10], [49, 71], [1, 1]]], [[20, 1], [71, 5], [457, 71]]]), ([[14, -1], [-1, 6]], [[[[1, 1], [0, 1]], [[-1, 14], [1, 1]]], [[14, 1], [83, 14]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]])], [([[7, 2, -10], [2, 5, -4], [-10, -4, 18]], [[[[1, 1], [0, 1], [0, 1]], [[2, 7], [1, 1], [0, 1]], [[-10, 7], [-8, 31], [1, 1]]], [[7, 1], [31, 7], [106, 31]]]), ([[19, 15], [15, 14]], [[[[1, 1], [0, 1]], [[15, 19], [1, 1]]], [[19, 1], [41, 19]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]])], [([[18, -12, -2], [-12, 14, 2], [-2, 2, 13]], [[[[1, 1], [0, 1], [0, 1]], [[-2, 3], [1, 1], [0, 1]], [[-1, 9], [1, 9], [1, 1]]], [[18, 1], [6, 1], [343, 27]]]), ([[11, 6], [6, 5]], [[[[1, 1], [0, 1]], [[6, 11], [1, 1]]], [[11, 1], [19, 11]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[1, 0], [0, 19]], [[[[1, 1], [0, 1]], [[0, 1], [1, 1]]], [[1, 1], [19, 1]]]), ([[3, 2], [2, 5]], [[[[1, 1], [0, 1]], [[2, 3], [1, 1]]], [[3, 1], [11, 3]]]), ([[9, 0], [0, 1]], [[[[1, 1], [0, 1]], [[0, 1], [1, 1]]], [[9, 1], [1, 1]]]), ([[6, 5], [5, 11]], [[[[1, 1], [0, 1]], [[5, 6], [1, 1]]], [[6, 1], [41, 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[[[[1, 1], [0, 1], [0, 1]], [[14, 1], [1, 1], [0, 1]], [[1, 1], [-211, 15], [1, 1]]], [[15, 1], [-2920, 1], [25999859, 45]]][[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]]Failed
explicit oracle 1[[[[1, 1], [0, 1]], [[2, 1], [1, 1]]], [[14, 1], [-54, 1]]][[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]]Failed
explicit oracle 2[[[[1, 1]]], [[2, 1]]][[[[1, 1]]], [[2, 1]]]Passed
explicit oracle 3[[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-8, 1], [1, 1], [0, 1], [0, 1]], [[15, 1], [2391, 20], [1, 1], [0, 1]], [[-3, 1], [-487, 20], [185097103, 63600], [1, 1]]], [[20, 1], [-1272, 1], [908759829, 50], [-10378321195603879856981287, 67416000000]]][[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]Failed
explicit oracle 4[[[[1, 1]]], [[5, 1]]][[[[1, 1]]], [[5, 1]]]Passed
explicit oracle 5[[[[1, 1]]], [[5, 1]]][[[[1, 1]]], [[5, 1]]]Passed
explicit oracle 6[[[[1, 1]]], [[2, 1]]][[[[1, 1]]], [[2, 1]]]Passed
explicit oracle 7[[[[1, 1]]], [[10, 1]]][[[[1, 1]]], [[10, 1]]]Passed

SHA-256 / a7fa501ceb714cc76291f499d5039aefa97f5eac3ae742874a0cbf32e1faf05a

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=[list(map(Fraction,row)) for row in x];n=len(a);L=[[Fraction(int(i==j)) for j in range(n)] for i in range(n)];D=[Fraction(0)]*n
    for j in range(n):
     D[j]=a[j][j]-sum(L[j][k]**2*D[k] for k in range(j))
     if not D[j]:return None
     for i in range(j+1,n):
      L[i][j]=(a[i][j]-sum(L[i][k]*L[j][k]*D[k] for k in range(j)))/(D[j])
    return [[[[v.numerator,v.denominator] for v in row] for row in L],[[v.numerator,v.denominator] for v in D]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[([[15, 14, 1], [14, 20, -1], [1, -1, 6]], [[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]]), ([[14, 2], [2, 2]], [[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]])], [([[11, 2, 6], [2, 14, 6], [6, 6, 9]], [[[[1, 1], [0, 1], [0, 1]], [[2, 11], [1, 1], [0, 1]], [[6, 11], [9, 25], [1, 1]]], [[11, 1], [150, 11], [99, 25]]]), ([[14, -12], [-12, 14]], [[[[1, 1], [0, 1]], [[-6, 7], [1, 1]]], [[14, 1], [26, 7]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]])], [([[20, -4, -6], [-4, 15, 11], [-6, 11, 15]], [[[[1, 1], [0, 1], [0, 1]], [[-1, 5], [1, 1], [0, 1]], [[-3, 10], [49, 71], [1, 1]]], [[20, 1], [71, 5], [457, 71]]]), ([[14, -1], [-1, 6]], [[[[1, 1], [0, 1]], [[-1, 14], [1, 1]]], [[14, 1], [83, 14]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[10]], [[[[1, 1]]], [[10, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[10]], [[[[1, 1]]], [[10, 1]]])], [([[7, 2, -10], [2, 5, -4], [-10, -4, 18]], [[[[1, 1], [0, 1], [0, 1]], [[2, 7], [1, 1], [0, 1]], [[-10, 7], [-8, 31], [1, 1]]], [[7, 1], [31, 7], [106, 31]]]), ([[19, 15], [15, 14]], [[[[1, 1], [0, 1]], [[15, 19], [1, 1]]], [[19, 1], [41, 19]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]]), ([[5]], [[[[1, 1]]], [[5, 1]]])], [([[18, -12, -2], [-12, 14, 2], [-2, 2, 13]], [[[[1, 1], [0, 1], [0, 1]], [[-2, 3], [1, 1], [0, 1]], [[-1, 9], [1, 9], [1, 1]]], [[18, 1], [6, 1], [343, 27]]]), ([[11, 6], [6, 5]], [[[[1, 1], [0, 1]], [[6, 11], [1, 1]]], [[11, 1], [19, 11]]]), ([[2]], [[[[1, 1]]], [[2, 1]]]), ([[20, -8, 15, -3], [-8, 8, -9, -7], [15, -9, 15, 4], [-3, -7, 4, 22]], [[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]), ([[1, 0], [0, 19]], [[[[1, 1], [0, 1]], [[0, 1], [1, 1]]], [[1, 1], [19, 1]]]), ([[3, 2], [2, 5]], [[[[1, 1], [0, 1]], [[2, 3], [1, 1]]], [[3, 1], [11, 3]]]), ([[9, 0], [0, 1]], [[[[1, 1], [0, 1]], [[0, 1], [1, 1]]], [[9, 1], [1, 1]]]), ([[6, 5], [5, 11]], [[[[1, 1], [0, 1]], [[5, 6], [1, 1]]], [[6, 1], [41, 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[[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]][[[[1, 1], [0, 1], [0, 1]], [[14, 15], [1, 1], [0, 1]], [[1, 15], [-29, 104], [1, 1]]], [[15, 1], [104, 15], [561, 104]]]Passed
explicit oracle 1[[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]][[[[1, 1], [0, 1]], [[1, 7], [1, 1]]], [[14, 1], [12, 7]]]Passed
explicit oracle 2[[[[1, 1]]], [[2, 1]]][[[[1, 1]]], [[2, 1]]]Passed
explicit oracle 3[[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]][[[[1, 1], [0, 1], [0, 1], [0, 1]], [[-2, 5], [1, 1], [0, 1], [0, 1]], [[3, 4], [-5, 8], [1, 1], [0, 1]], [[-3, 20], [-41, 24], [3, 5], [1, 1]]], [[20, 1], [24, 5], [15, 8], [103, 15]]]Passed
explicit oracle 4[[[[1, 1]]], [[5, 1]]][[[[1, 1]]], [[5, 1]]]Passed
explicit oracle 5[[[[1, 1]]], [[5, 1]]][[[[1, 1]]], [[5, 1]]]Passed
explicit oracle 6[[[[1, 1]]], [[2, 1]]][[[[1, 1]]], [[2, 1]]]Passed
explicit oracle 7[[[[1, 1]]], [[10, 1]]][[[[1, 1]]], [[10, 1]]]Passed

SHA-256 / 6243c838e05296e5f84cbf2ea4b6e6f0c3eea924972cbcd3deb590a50eb23795

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

Case digest / 2c7d9578ffd4c55597c7db5ba94576aa792b60220a9bd6160cc50864adfb2db4