FA-14961 / Numerics / Open access
Primitive pythagorean triples: triple canonical ordering · case 01
The exact primitive pythagorean triples result violates the stated contract at triple canonical ordering.
ROOT CAUSE
The triple canonical ordering step uses out instead of sorted(out).
VERIFIED REPAIR
Use sorted(out) at the triple canonical ordering step.
Unsuccessful approach: The partial repair sorted(out,key=lambda z:z[2]) still violates the triple canonical ordering invariant.
Case contract
Input bound L>=1; return lexicographically sorted [a,b,c] with 0<a<b<c<=L, coprime a,b,c and a^2+b^2=c^2.
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):
L=x;out=[]
for m in range(2,math.isqrt(L)+2):
for n in range(1,m):
if math.gcd(m,n)!=1:continue
if (m-n)%2==0:continue
a,b,c=m*m-n*n,2*m*n,m*m+n*n
a,b=sorted((a,b))
if c<=L:out.append([a,b,c])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(25, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (2, []), (3, []), (4, []), (5, [[3, 4, 5]]), (6, [[3, 4, 5]])], [(26, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (28, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (18, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (19, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (20, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (21, [[3, 4, 5], [5, 12, 13], [8, 15, 17]])], [(27, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (31, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (35, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (36, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (37, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]]), (38, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]])], [(28, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (34, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (52, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29]]), (53, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]]), (54, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]]), (55, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]])], [(29, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (37, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (69, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (70, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (71, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (72, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]])]]
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, 4, 5], [5, 12, 13], [8, 15, 17], [7, 24, 25]] | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]] | Failed |
| explicit oracle 1 | [] | [] | Passed |
| explicit oracle 2 | [[3, 4, 5], [5, 12, 13], [8, 15, 17], [7, 24, 25], [20, 21, 29], [9, 40, 41], [12, 35, 37], [11, 60, 61], [28, 45, 53], [33, 56, 65], [13, 84, 85], [16, 63, 65], [48, 55, 73], [39, 80, 89], [15, 112, 113], [36, 77, 85], [65, 72, 97], [17, 144, 145], [20, 99, 101], [60, 91, 109], [51, 140, 149], [44, 117, 125], [88, 105, 137], [85, 132, 157], [24, 143, 145], [119, 120, 169], [52, 165, 173]] | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]] | Failed |
| explicit oracle 3 | [] | [] | Passed |
| explicit oracle 4 | [] | [] | Passed |
| explicit oracle 5 | [] | [] | Passed |
| explicit oracle 6 | [[3, 4, 5]] | [[3, 4, 5]] | Passed |
| explicit oracle 7 | [[3, 4, 5]] | [[3, 4, 5]] | Passed |
SHA-256 / 0b15884ccb497d857ccc29e6d4ed10628716856bbbe49e433f58942b0b0bc3c1
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):
L=x;out=[]
for m in range(2,math.isqrt(L)+2):
for n in range(1,m):
if math.gcd(m,n)!=1:continue
if (m-n)%2==0:continue
a,b,c=m*m-n*n,2*m*n,m*m+n*n
a,b=sorted((a,b))
if c<=L:out.append([a,b,c])
return sorted(out,key=lambda z:z[2])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(25, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (2, []), (3, []), (4, []), (5, [[3, 4, 5]]), (6, [[3, 4, 5]])], [(26, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (28, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (18, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (19, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (20, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (21, [[3, 4, 5], [5, 12, 13], [8, 15, 17]])], [(27, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (31, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (35, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (36, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (37, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]]), (38, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]])], [(28, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (34, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (52, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29]]), (53, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]]), (54, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]]), (55, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]])], [(29, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (37, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (69, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (70, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (71, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (72, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]])]]
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, 4, 5], [5, 12, 13], [8, 15, 17], [7, 24, 25]] | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]] | Failed |
| explicit oracle 1 | [] | [] | Passed |
| explicit oracle 2 | [[3, 4, 5], [5, 12, 13], [8, 15, 17], [7, 24, 25], [20, 21, 29], [12, 35, 37], [9, 40, 41], [28, 45, 53], [11, 60, 61], [33, 56, 65], [16, 63, 65], [48, 55, 73], [13, 84, 85], [36, 77, 85], [39, 80, 89], [65, 72, 97], [20, 99, 101], [60, 91, 109], [15, 112, 113], [44, 117, 125], [88, 105, 137], [17, 144, 145], [24, 143, 145], [51, 140, 149], [85, 132, 157], [119, 120, 169], [52, 165, 173]] | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]] | Failed |
| explicit oracle 3 | [] | [] | Passed |
| explicit oracle 4 | [] | [] | Passed |
| explicit oracle 5 | [] | [] | Passed |
| explicit oracle 6 | [[3, 4, 5]] | [[3, 4, 5]] | Passed |
| explicit oracle 7 | [[3, 4, 5]] | [[3, 4, 5]] | Passed |
SHA-256 / 7a7f1709309630ed035a6aa1afb7429df5f16d477aa6066caf0585c0577ef8ad
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):
L=x;out=[]
for m in range(2,math.isqrt(L)+2):
for n in range(1,m):
if math.gcd(m,n)!=1:continue
if (m-n)%2==0:continue
a,b,c=m*m-n*n,2*m*n,m*m+n*n
a,b=sorted((a,b))
if c<=L:out.append([a,b,c])
return sorted(out)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[(25, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (2, []), (3, []), (4, []), (5, [[3, 4, 5]]), (6, [[3, 4, 5]])], [(26, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (28, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (18, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (19, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (20, [[3, 4, 5], [5, 12, 13], [8, 15, 17]]), (21, [[3, 4, 5], [5, 12, 13], [8, 15, 17]])], [(27, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (31, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (35, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (36, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (37, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]]), (38, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]])], [(28, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]]), (34, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (52, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29]]), (53, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]]), (54, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]]), (55, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [12, 35, 37], [20, 21, 29], [28, 45, 53]])], [(29, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [20, 21, 29]]), (37, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [12, 35, 37], [20, 21, 29]]), (1, []), (180, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]]), (69, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (70, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (71, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]]), (72, [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [16, 63, 65], [20, 21, 29], [28, 45, 53], [33, 56, 65]])]]
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, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]] | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17]] | Passed |
| explicit oracle 1 | [] | [] | Passed |
| explicit oracle 2 | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]] | [[3, 4, 5], [5, 12, 13], [7, 24, 25], [8, 15, 17], [9, 40, 41], [11, 60, 61], [12, 35, 37], [13, 84, 85], [15, 112, 113], [16, 63, 65], [17, 144, 145], [20, 21, 29], [20, 99, 101], [24, 143, 145], [28, 45, 53], [33, 56, 65], [36, 77, 85], [39, 80, 89], [44, 117, 125], [48, 55, 73], [51, 140, 149], [52, 165, 173], [60, 91, 109], [65, 72, 97], [85, 132, 157], [88, 105, 137], [119, 120, 169]] | Passed |
| explicit oracle 3 | [] | [] | Passed |
| explicit oracle 4 | [] | [] | Passed |
| explicit oracle 5 | [] | [] | Passed |
| explicit oracle 6 | [[3, 4, 5]] | [[3, 4, 5]] | Passed |
| explicit oracle 7 | [[3, 4, 5]] | [[3, 4, 5]] | Passed |
SHA-256 / 9932c2f4682ba1085e688c043d29933c3d0dd9ec7c9a99394fc29c51ab7f41eb
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:22.019499+00:00.
Case digest / 20834538e712c35b7b26e8181fcefaac43e8174cad293442c160a86037f47c28