{"abstract":"The exact bareiss determinant result violates the stated contract at fraction free cross product.","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[i][j]*a[k][k]+a[i][k]*a[k][j] still violates the fraction free cross product invariant.","family":"s3-numerics-bareiss-determinant-fraction-free-cross-product","id":"FA-15356","implementations":{"attempt":{"sha256":"5851a0b64656e4e96dc42402a4f34c44cb152524d08decc883e2c6b8f2d29386","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, 2], [2, -2]], -8), ([[2, 1], [3, 0]], -3), ([[-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)], [([[-3, 2], [2, -1]], -1), ([[-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), ([[2]], 2)], [([[-2, 3], [-3, 2]], 5), ([[-2, 2], [-3, -1]], 8), ([[-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)], [([[3, -1], [2, 3]], 11), ([[-2, 2], [-3, 1]], 4), ([[-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)], [([[-2, 2], [-3, -1]], 8), ([[-2, -3], [-1, 2]], -7), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[-1, 0], [-3, -2]], 2), ([[0, 3], [0, -3]], 0), ([[-1, 0], [1, 2]], -2), ([[-2, 0], [-2, 0]], 0)]]\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":"f0455321e2c5c7ef0527b9b6f424210549f8ceb37f5dc5b3b7a8718b622cf3c6","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[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, 2], [2, -2]], -8), ([[2, 1], [3, 0]], -3), ([[-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)], [([[-3, 2], [2, -1]], -1), ([[-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), ([[2]], 2)], [([[-2, 3], [-3, 2]], 5), ([[-2, 2], [-3, -1]], 8), ([[-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)], [([[3, -1], [2, 3]], 11), ([[-2, 2], [-3, 1]], 4), ([[-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)], [([[-2, 2], [-3, -1]], 8), ([[-2, -3], [-1, 2]], -7), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[-1, 0], [-3, -2]], 2), ([[0, 3], [0, -3]], 0), ([[-1, 0], [1, 2]], -2), ([[-2, 0], [-2, 0]], 0)]]\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":"74601e49a80a15b2b07aee00f1b3acb81c7ab8f699419173a8e991702399718e","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, 2], [2, -2]], -8), ([[2, 1], [3, 0]], -3), ([[-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)], [([[-3, 2], [2, -1]], -1), ([[-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), ([[2]], 2)], [([[-2, 3], [-3, 2]], 5), ([[-2, 2], [-3, -1]], 8), ([[-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)], [([[3, -1], [2, 3]], 11), ([[-2, 2], [-3, 1]], 4), ([[-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)], [([[-2, 2], [-3, -1]], 8), ([[-2, -3], [-1, 2]], -7), ([[-1]], -1), ([[-1, -1, 0, 3], [-3, 1, -2, 2], [0, -1, 1, 2], [-3, 2, -3, -2]], 4), ([[-1, 0], [-3, -2]], 2), ([[0, 3], [0, -3]], 0), ([[-1, 0], [1, 2]], -2), ([[-2, 0], [-2, 0]], 0)]]\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-fraction-free-cross-product","generated_at":"2026-09-29T14:39:26.013910+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][j]*a[k][k]-a[i][k]*a[k][j] at the fraction free cross product step.","root_cause":"The fraction free cross product step uses a[i][j]-a[i][k]*a[k][j] instead of a[i][j]*a[k][k]-a[i][k]*a[k][j].","sha256":"96a4afaaac5ec1f4d719a1a6a7d42febb926cfb8e65737a29610e39bc5d677c4","title":"Bareiss determinant: fraction free cross product · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.572,"exit_code":1,"observations":[{"actual":0,"check":"explicit oracle 0","expected":-8,"passed":false},{"actual":3,"check":"explicit oracle 1","expected":-3,"passed":false},{"actual":-1,"check":"explicit oracle 2","expected":-1,"passed":true},{"actual":60,"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\": -8, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 3, \"expected\": -3, \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": 60, \"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"},"broken":{"elapsed_ms":42.686,"exit_code":1,"observations":[{"actual":-6,"check":"explicit oracle 0","expected":-8,"passed":false},{"actual":-3,"check":"explicit oracle 1","expected":-3,"passed":true},{"actual":-1,"check":"explicit oracle 2","expected":-1,"passed":true},{"actual":-24,"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\": -6, \"expected\": -8, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": -3, \"expected\": -3, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": -1, \"expected\": -1, \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": -24, \"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":46.448,"exit_code":0,"observations":[{"actual":-8,"check":"explicit oracle 0","expected":-8,"passed":true},{"actual":-3,"check":"explicit oracle 1","expected":-3,"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\": -8, \"expected\": -8, \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": -3, \"expected\": -3, \"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"}