{"abstract":"The exact integer matrix binary power result violates the stated contract at binary exponent advancement.","category":"Numerics","checks":8,"contract":"Input [square integer matrix,nonnegative exponent<=12]; return exact matrix power.","evaluation_group":"s3-numerics-integer-matrix-binary-power","failed_approach":"The partial repair max(0,e//2-1) still violates the binary exponent advancement invariant.","family":"s3-numerics-integer-matrix-binary-power-binary-exponent-advancement","id":"FA-15486","implementations":{"attempt":{"sha256":"9637282a2c67c973309a71e9d0b5e790b2d6026acc7d1d87df2fd848f1b93cb7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    a,e=x;n=len(a)\n    def mul(a,b):return [[sum(a[i][k]*b[k][j] for k in range(n)) for j in range(n)] for i in range(n)]\n    r=[[int(i==j) for j in range(n)] for i in range(n)]\n    for _ in range(12):\n     if e==0:break\n     if e%2==1:r=mul(r,a)\n     a=mul(a,a)\n     e=max(0,e//2-1)\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[2]], 3], [[8]]), ([[[2]], 2], [[4]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-1]], 1], [[-1]]), ([[[-1]], 2], [[1]]), ([[[-1]], 3], [[-1]]), ([[[-1]], 4], [[1]])], [([[[2]], 4], [[16]]), ([[[2]], 5], [[32]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[2]], 8], [[256]]), ([[[2]], 0], [[1]]), ([[[2]], 1], [[2]]), ([[[2]], 2], [[4]])], [([[[2]], 5], [[32]]), ([[[2]], 8], [[256]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[1]], 7], [[1]]), ([[[1]], 8], [[1]]), ([[[3]], 0], [[1]]), ([[[3]], 1], [[3]])], [([[[2]], 6], [[64]]), ([[[2]], 4], [[16]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-1]], 6], [[1]]), ([[[-1]], 7], [[-1]]), ([[[-1]], 8], [[1]]), ([[[3]], 0], [[1]])], [([[[2]], 7], [[128]]), ([[[2]], 7], [[128]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-3]], 5], [[-243]]), ([[[-3]], 6], [[729]]), ([[[-3]], 7], [[-2187]]), ([[[-3]], 8], [[6561]])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"3afd6c138c2db9e57a9d21a9c8f35626bc30a8284b945c373e5e45b11ab22ae4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    a,e=x;n=len(a)\n    def mul(a,b):return [[sum(a[i][k]*b[k][j] for k in range(n)) for j in range(n)] for i in range(n)]\n    r=[[int(i==j) for j in range(n)] for i in range(n)]\n    for _ in range(12):\n     if e==0:break\n     if e%2==1:r=mul(r,a)\n     a=mul(a,a)\n     e=e-1\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[2]], 3], [[8]]), ([[[2]], 2], [[4]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-1]], 1], [[-1]]), ([[[-1]], 2], [[1]]), ([[[-1]], 3], [[-1]]), ([[[-1]], 4], [[1]])], [([[[2]], 4], [[16]]), ([[[2]], 5], [[32]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[2]], 8], [[256]]), ([[[2]], 0], [[1]]), ([[[2]], 1], [[2]]), ([[[2]], 2], [[4]])], [([[[2]], 5], [[32]]), ([[[2]], 8], [[256]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[1]], 7], [[1]]), ([[[1]], 8], [[1]]), ([[[3]], 0], [[1]]), ([[[3]], 1], [[3]])], [([[[2]], 6], [[64]]), ([[[2]], 4], [[16]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-1]], 6], [[1]]), ([[[-1]], 7], [[-1]]), ([[[-1]], 8], [[1]]), ([[[3]], 0], [[1]])], [([[[2]], 7], [[128]]), ([[[2]], 7], [[128]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-3]], 5], [[-243]]), ([[[-3]], 6], [[729]]), ([[[-3]], 7], [[-2187]]), ([[[-3]], 8], [[6561]])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"6f411f2a851d08d2a2139a364420997e1f7b9be754f72917a0403691e219f88b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    a,e=x;n=len(a)\n    def mul(a,b):return [[sum(a[i][k]*b[k][j] for k in range(n)) for j in range(n)] for i in range(n)]\n    r=[[int(i==j) for j in range(n)] for i in range(n)]\n    for _ in range(12):\n     if e==0:break\n     if e%2==1:r=mul(r,a)\n     a=mul(a,a)\n     e=e//2\n    return r\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[[2]], 3], [[8]]), ([[[2]], 2], [[4]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-1]], 1], [[-1]]), ([[[-1]], 2], [[1]]), ([[[-1]], 3], [[-1]]), ([[[-1]], 4], [[1]])], [([[[2]], 4], [[16]]), ([[[2]], 5], [[32]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[2]], 8], [[256]]), ([[[2]], 0], [[1]]), ([[[2]], 1], [[2]]), ([[[2]], 2], [[4]])], [([[[2]], 5], [[32]]), ([[[2]], 8], [[256]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[1]], 7], [[1]]), ([[[1]], 8], [[1]]), ([[[3]], 0], [[1]]), ([[[3]], 1], [[3]])], [([[[2]], 6], [[64]]), ([[[2]], 4], [[16]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-1]], 6], [[1]]), ([[[-1]], 7], [[-1]]), ([[[-1]], 8], [[1]]), ([[[3]], 0], [[1]])], [([[[2]], 7], [[128]]), ([[[2]], 7], [[128]]), ([[[-1]], 0], [[1]]), ([[[-1, 3], [-1, -3]], 8], [[1168, 2688], [-896, -624]]), ([[[-3]], 5], [[-243]]), ([[[-3]], 6], [[729]]), ([[[-3]], 7], [[-2187]]), ([[[-3]], 8], [[6561]])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-numerics-integer-matrix-binary-power-binary-exponent-advancement","generated_at":"2026-09-29T14:39:27.362735+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.","repair":"Use e//2 at the binary exponent advancement step.","root_cause":"The binary exponent advancement step uses e-1 instead of e//2.","sha256":"60ab629546ea7ebe8e938645b75c8cb19a908a29a4c9ff65f7e7cc4b89428287","title":"Integer matrix binary power: binary exponent advancement · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.977,"exit_code":1,"observations":[{"actual":[[2]],"check":"explicit oracle 0","expected":[[8]],"passed":false},{"actual":[[1]],"check":"explicit oracle 1","expected":[[4]],"passed":false},{"actual":[[1]],"check":"explicit oracle 2","expected":[[1]],"passed":true},{"actual":[[-2,-12],[4,6]],"check":"explicit oracle 3","expected":[[1168,2688],[-896,-624]],"passed":false},{"actual":[[-1]],"check":"explicit oracle 4","expected":[[-1]],"passed":true},{"actual":[[1]],"check":"explicit oracle 5","expected":[[1]],"passed":true},{"actual":[[-1]],"check":"explicit oracle 6","expected":[[-1]],"passed":true},{"actual":[[1]],"check":"explicit oracle 7","expected":[[1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [[2]], \"expected\": [[8]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [[1]], \"expected\": [[4]], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [[-2, -12], [4, 6]], \"expected\": [[1168, 2688], [-896, -624]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [[-1]], \"expected\": [[-1]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [[-1]], \"expected\": [[-1]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.12,"exit_code":1,"observations":[{"actual":[[32]],"check":"explicit oracle 0","expected":[[8]],"passed":false},{"actual":[[4]],"check":"explicit oracle 1","expected":[[4]],"passed":true},{"actual":[[1]],"check":"explicit oracle 2","expected":[[1]],"passed":true},{"actual":[[6256196587737406625340539501828006752895218385122505372842590208,2412911959431560330688592206164778849117792512395106255210689855488],[-804303986477186776896197402054926283039264170798368751736896618496,-1602351776366636147167054264608024559325633123211614998100950646784]],"check":"explicit oracle 3","expected":[[1168,2688],[-896,-624]],"passed":false},{"actual":[[-1]],"check":"explicit oracle 4","expected":[[-1]],"passed":true},{"actual":[[1]],"check":"explicit oracle 5","expected":[[1]],"passed":true},{"actual":[[-1]],"check":"explicit oracle 6","expected":[[-1]],"passed":true},{"actual":[[1]],"check":"explicit oracle 7","expected":[[1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [[32]], \"expected\": [[8]], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [[4]], \"expected\": [[4]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [[6256196587737406625340539501828006752895218385122505372842590208, 2412911959431560330688592206164778849117792512395106255210689855488], [-804303986477186776896197402054926283039264170798368751736896618496, -1602351776366636147167054264608024559325633123211614998100950646784]], \"expected\": [[1168, 2688], [-896, -624]], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [[-1]], \"expected\": [[-1]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [[-1]], \"expected\": [[-1]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.714,"exit_code":0,"observations":[{"actual":[[8]],"check":"explicit oracle 0","expected":[[8]],"passed":true},{"actual":[[4]],"check":"explicit oracle 1","expected":[[4]],"passed":true},{"actual":[[1]],"check":"explicit oracle 2","expected":[[1]],"passed":true},{"actual":[[1168,2688],[-896,-624]],"check":"explicit oracle 3","expected":[[1168,2688],[-896,-624]],"passed":true},{"actual":[[-1]],"check":"explicit oracle 4","expected":[[-1]],"passed":true},{"actual":[[1]],"check":"explicit oracle 5","expected":[[1]],"passed":true},{"actual":[[-1]],"check":"explicit oracle 6","expected":[[-1]],"passed":true},{"actual":[[1]],"check":"explicit oracle 7","expected":[[1]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [[8]], \"expected\": [[8]], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [[4]], \"expected\": [[4]], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [[1168, 2688], [-896, -624]], \"expected\": [[1168, 2688], [-896, -624]], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [[-1]], \"expected\": [[-1]], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [[-1]], \"expected\": [[-1]], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [[1]], \"expected\": [[1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}