{"abstract":"The exact bareiss determinant result violates the stated contract at nonzero pivot selection.","category":"Numerics","checks":8,"contract":"Input nonempty square integer matrix; return exact determinant using pivoted fraction-free elimination.","evaluation_group":"s3-numerics-bareiss-determinant","failed_approach":"The partial repair a[k][i]!=0 still violates the nonzero pivot selection invariant.","family":"s3-numerics-bareiss-determinant-nonzero-pivot-selection","id":"FA-15346","implementations":{"attempt":{"sha256":"921be477503169c3dec83951be2a14c6936ec12f9af7424efdb00aace29f4707","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=[r[:] for r in x];n=len(a);prev=1;sign=1\n    for k in range(n-1):\n     pivot=next((i for i in range(k,n) if a[k][i]!=0),None)\n     if pivot is None:return 0\n     if pivot!=k:\n      a[k],a[pivot]=a[pivot],a[k]\n      sign=-sign\n     for i in range(k+1,n):\n      for j in range(k+1,n):a[i][j]=(a[i][j]*a[k][k]-a[i][k]*a[k][j])//prev\n     prev=a[k][k]\n     if not prev:return None\n     for i in range(k+1,n):a[i][k]=0\n    return sign*a[-1][-1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-2, 3], [-3, 2]], 5), ([[0, 3], [0, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[2]], 2), ([[2]], 2), ([[1]], 1), ([[3]], 3)], [([[-2, 2], [-3, -1]], 8), ([[3, 3, 1], [1, 1, -3], [2, 2, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[-3]], -3), ([[1]], 1), ([[3]], 3), ([[2]], 2)], [([[-1, 1], [0, 2]], -2), ([[0, -2, 0, -1], [0, 3, 2, 3], [-1, -1, 3, 1], [0, 0, 0, -3]], -12), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[3]], 3), ([[-2]], -2), ([[-1]], -1), ([[-3]], -3)], [([[-2, 2], [-3, 1]], 4), ([[0, 0, 3], [2, -2, -1], [-2, 2, -2]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[2]], 2), ([[-2]], -2), ([[2]], 2), ([[2]], 2)], [([[-1, 0], [-3, -2]], 2), ([[2, 0, 2, 0], [0, -1, -1, 1], [-3, 1, -2, 3], [0, 0, 0, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[0, 3], [0, -3]], 0), ([[-1, 0], [1, 2]], -2), ([[-2, 0], [-2, 0]], 0), ([[2, 1], [1, 3]], 5)]]\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":"50cef7fd84bbd3fe8ec5b0ed15c8139b14b62f0bfe5adc18f8095dbf4fa83d08","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=[r[:] for r in x];n=len(a);prev=1;sign=1\n    for k in range(n-1):\n     pivot=next((i for i in range(k,n) if a[i][k]>0),None)\n     if pivot is None:return 0\n     if pivot!=k:\n      a[k],a[pivot]=a[pivot],a[k]\n      sign=-sign\n     for i in range(k+1,n):\n      for j in range(k+1,n):a[i][j]=(a[i][j]*a[k][k]-a[i][k]*a[k][j])//prev\n     prev=a[k][k]\n     if not prev:return None\n     for i in range(k+1,n):a[i][k]=0\n    return sign*a[-1][-1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-2, 3], [-3, 2]], 5), ([[0, 3], [0, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[2]], 2), ([[2]], 2), ([[1]], 1), ([[3]], 3)], [([[-2, 2], [-3, -1]], 8), ([[3, 3, 1], [1, 1, -3], [2, 2, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[-3]], -3), ([[1]], 1), ([[3]], 3), ([[2]], 2)], [([[-1, 1], [0, 2]], -2), ([[0, -2, 0, -1], [0, 3, 2, 3], [-1, -1, 3, 1], [0, 0, 0, -3]], -12), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[3]], 3), ([[-2]], -2), ([[-1]], -1), ([[-3]], -3)], [([[-2, 2], [-3, 1]], 4), ([[0, 0, 3], [2, -2, -1], [-2, 2, -2]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[2]], 2), ([[-2]], -2), ([[2]], 2), ([[2]], 2)], [([[-1, 0], [-3, -2]], 2), ([[2, 0, 2, 0], [0, -1, -1, 1], [-3, 1, -2, 3], [0, 0, 0, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[0, 3], [0, -3]], 0), ([[-1, 0], [1, 2]], -2), ([[-2, 0], [-2, 0]], 0), ([[2, 1], [1, 3]], 5)]]\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":"a2351b765876260915c28aa7b5af0e7039793699ba0e21c634781a67706ccc1f","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=[r[:] for r in x];n=len(a);prev=1;sign=1\n    for k in range(n-1):\n     pivot=next((i for i in range(k,n) if a[i][k]!=0),None)\n     if pivot is None:return 0\n     if pivot!=k:\n      a[k],a[pivot]=a[pivot],a[k]\n      sign=-sign\n     for i in range(k+1,n):\n      for j in range(k+1,n):a[i][j]=(a[i][j]*a[k][k]-a[i][k]*a[k][j])//prev\n     prev=a[k][k]\n     if not prev:return None\n     for i in range(k+1,n):a[i][k]=0\n    return sign*a[-1][-1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[-2, 3], [-3, 2]], 5), ([[0, 3], [0, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[2]], 2), ([[2]], 2), ([[1]], 1), ([[3]], 3)], [([[-2, 2], [-3, -1]], 8), ([[3, 3, 1], [1, 1, -3], [2, 2, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[-3]], -3), ([[1]], 1), ([[3]], 3), ([[2]], 2)], [([[-1, 1], [0, 2]], -2), ([[0, -2, 0, -1], [0, 3, 2, 3], [-1, -1, 3, 1], [0, 0, 0, -3]], -12), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[3]], 3), ([[-2]], -2), ([[-1]], -1), ([[-3]], -3)], [([[-2, 2], [-3, 1]], 4), ([[0, 0, 3], [2, -2, -1], [-2, 2, -2]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[2]], 2), ([[-2]], -2), ([[2]], 2), ([[2]], 2)], [([[-1, 0], [-3, -2]], 2), ([[2, 0, 2, 0], [0, -1, -1, 1], [-3, 1, -2, 3], [0, 0, 0, -3]], 0), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[0, 3], [0, -3]], 0), ([[-1, 0], [1, 2]], -2), ([[-2, 0], [-2, 0]], 0), ([[2, 1], [1, 3]], 5)]]\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-bareiss-determinant-nonzero-pivot-selection","generated_at":"2026-09-29T14:39:25.979270+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 a[i][k]!=0 at the nonzero pivot selection step.","root_cause":"The nonzero pivot selection step uses a[i][k]>0 instead of a[i][k]!=0.","sha256":"6fd44e9d14029e3bdfb37826c69e6356aea2371f0c445f4c5cdbe561da647bce","title":"Bareiss determinant: nonzero pivot selection · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.361,"exit_code":1,"observations":[{"actual":5,"check":"explicit oracle 0","expected":5,"passed":true},{"actual":null,"check":"explicit oracle 1","expected":0,"passed":false},{"actual":-1,"check":"explicit oracle 2","expected":-1,"passed":true},{"actual":4,"check":"explicit oracle 3","expected":4,"passed":true},{"actual":2,"check":"explicit oracle 4","expected":2,"passed":true},{"actual":2,"check":"explicit oracle 5","expected":2,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":3,"check":"explicit oracle 7","expected":3,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": null, \"expected\": 0, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 3, \"expected\": 3, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.159,"exit_code":1,"observations":[{"actual":0,"check":"explicit oracle 0","expected":5,"passed":false},{"actual":0,"check":"explicit oracle 1","expected":0,"passed":true},{"actual":-1,"check":"explicit oracle 2","expected":-1,"passed":true},{"actual":0,"check":"explicit oracle 3","expected":4,"passed":false},{"actual":2,"check":"explicit oracle 4","expected":2,"passed":true},{"actual":2,"check":"explicit oracle 5","expected":2,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":3,"check":"explicit oracle 7","expected":3,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 0, \"expected\": 5, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 0, \"expected\": 4, \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 3, \"expected\": 3, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.778,"exit_code":0,"observations":[{"actual":5,"check":"explicit oracle 0","expected":5,"passed":true},{"actual":0,"check":"explicit oracle 1","expected":0,"passed":true},{"actual":-1,"check":"explicit oracle 2","expected":-1,"passed":true},{"actual":4,"check":"explicit oracle 3","expected":4,"passed":true},{"actual":2,"check":"explicit oracle 4","expected":2,"passed":true},{"actual":2,"check":"explicit oracle 5","expected":2,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":3,"check":"explicit oracle 7","expected":3,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 5, \"expected\": 5, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 3, \"expected\": 3, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}