{"abstract":"The exact linear congruence solutions result violates the stated contract at coset cardinality.","category":"Numerics","checks":8,"contract":"Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.","contract_signature":"x","evaluation_group":"s3-numerics-linear-congruence-solutions","failed_approach":"The partial repair range(1,g) still violates the coset cardinality invariant.","family":"s3-numerics-linear-congruence-solutions-coset-cardinality","id":"FA-14386","implementations":{"attempt":{"sha256":"0af69cd81aca27d6e2851869df4d515ac88d98af8b3d0beb85228dc924c96e61","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,b,m=x\n    g=math.gcd(a,m)\n    if b%g != 0: return []\n    q=m//g\n    r=((b//g)*pow(a//g,-1,q))%q if q>1 else 0\n    return sorted(r+k*q for k in range(1,g))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -6, 2], [0]), ([1, -6, 3], [0]), ([1, -6, 4], [2]), ([1, -6, 5], [4]), ([1, -6, 6], [0]), ([1, -6, 7], [1])], [([1, -6, 2], [0]), ([1, -6, 4], [2]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -5, 6], [1]), ([1, -5, 7], [2]), ([1, -5, 8], [3]), ([1, -5, 9], [4])], [([1, -6, 3], [0]), ([1, -6, 7], [1]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -4, 11], [7]), ([1, -4, 12], [8]), ([1, -3, 1], [0]), ([1, -3, 2], [1])], [([1, -6, 4], [2]), ([1, -6, 10], [4]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -2, 4], [2]), ([1, -2, 5], [3]), ([1, -2, 6], [4]), ([1, -2, 7], [5])], [([1, -6, 5], [4]), ([1, -5, 1], [0]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -1, 9], [8]), ([1, -1, 10], [9]), ([1, -1, 11], [10]), ([1, -1, 12], [11])]]\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":"e8386910e3e44d5294c263ab9109c607df1a48a11b8984e43f825b2109db7cfe","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,b,m=x\n    g=math.gcd(a,m)\n    if b%g != 0: return []\n    q=m//g\n    r=((b//g)*pow(a//g,-1,q))%q if q>1 else 0\n    return sorted(r+k*q for k in range(g+1))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -6, 2], [0]), ([1, -6, 3], [0]), ([1, -6, 4], [2]), ([1, -6, 5], [4]), ([1, -6, 6], [0]), ([1, -6, 7], [1])], [([1, -6, 2], [0]), ([1, -6, 4], [2]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -5, 6], [1]), ([1, -5, 7], [2]), ([1, -5, 8], [3]), ([1, -5, 9], [4])], [([1, -6, 3], [0]), ([1, -6, 7], [1]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -4, 11], [7]), ([1, -4, 12], [8]), ([1, -3, 1], [0]), ([1, -3, 2], [1])], [([1, -6, 4], [2]), ([1, -6, 10], [4]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -2, 4], [2]), ([1, -2, 5], [3]), ([1, -2, 6], [4]), ([1, -2, 7], [5])], [([1, -6, 5], [4]), ([1, -5, 1], [0]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -1, 9], [8]), ([1, -1, 10], [9]), ([1, -1, 11], [10]), ([1, -1, 12], [11])]]\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-linear-congruence-solutions-coset-cardinality","generated_at":"2026-09-29T14:39:16.446840+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.","root_cause":"The coset cardinality step uses range(g+1) instead of range(g).","sha256":"8b1346c2af813d711feca4ff0a43d8c46dd475caa02d8824ab70dcbb2c985f09","title":"Linear congruence solutions: coset cardinality · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":44.008,"exit_code":1,"observations":[{"actual":[],"check":"explicit oracle 0","expected":[0],"passed":false},{"actual":[],"check":"explicit oracle 1","expected":[6],"passed":false},{"actual":[],"check":"explicit oracle 2","expected":[0],"passed":false},{"actual":[],"check":"explicit oracle 3","expected":[0],"passed":false},{"actual":[],"check":"explicit oracle 4","expected":[2],"passed":false},{"actual":[],"check":"explicit oracle 5","expected":[4],"passed":false},{"actual":[],"check":"explicit oracle 6","expected":[0],"passed":false},{"actual":[],"check":"explicit oracle 7","expected":[1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [], \"expected\": [6], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [], \"expected\": [2], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [], \"expected\": [4], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [], \"expected\": [1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.951,"exit_code":1,"observations":[{"actual":[0,1],"check":"explicit oracle 0","expected":[0],"passed":false},{"actual":[6,18],"check":"explicit oracle 1","expected":[6],"passed":false},{"actual":[0,2],"check":"explicit oracle 2","expected":[0],"passed":false},{"actual":[0,3],"check":"explicit oracle 3","expected":[0],"passed":false},{"actual":[2,6],"check":"explicit oracle 4","expected":[2],"passed":false},{"actual":[4,9],"check":"explicit oracle 5","expected":[4],"passed":false},{"actual":[0,6],"check":"explicit oracle 6","expected":[0],"passed":false},{"actual":[1,8],"check":"explicit oracle 7","expected":[1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 1], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [6, 18], \"expected\": [6], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 2], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [0, 3], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [2, 6], \"expected\": [2], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [4, 9], \"expected\": [4], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 6], \"expected\": [0], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 8], \"expected\": [1], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}