{"abstract":"The exact linear congruence solutions result violates the stated contract at quotient modulus.","category":"Numerics","checks":8,"contract":"Input [a,b,m], m>0; sorted all x in [0,m) with a*x congruent b modulo m.","evaluation_group":"s3-numerics-linear-congruence-solutions","failed_approach":"The partial repair g still violates the quotient modulus invariant.","family":"s3-numerics-linear-congruence-solutions-quotient-modulus","id":"FA-14371","implementations":{"attempt":{"sha256":"d8b2d5648048c1efb90e1c7c7fa41c547046825ffc1855dfc2934c23f1892055","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=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))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, -6, 2], [0, 1]), ([1, -6, 4], [2]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -6, 2], [0]), ([1, -6, 3], [0]), ([1, -6, 5], [4]), ([1, -6, 6], [0])], [([2, -6, 4], [1, 3]), ([1, -6, 8], [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])], [([2, -6, 6], [0, 3]), ([1, -6, 11], [5]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -4, 11], [7]), ([1, -4, 12], [8]), ([1, -3, 1], [0]), ([1, -3, 2], [1])], [([2, -6, 8], [1, 5]), ([1, -5, 3], [1]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -2, 4], [2]), ([1, -2, 5], [3]), ([1, -2, 6], [4]), ([1, -2, 7], [5])], [([2, -6, 10], [2, 7]), ([1, -5, 7], [2]), ([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":"77a86e8215f427bdd0af48b1397f08cb0ae4980ee64f821c3d5b285ae387cab0","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\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))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, -6, 2], [0, 1]), ([1, -6, 4], [2]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -6, 2], [0]), ([1, -6, 3], [0]), ([1, -6, 5], [4]), ([1, -6, 6], [0])], [([2, -6, 4], [1, 3]), ([1, -6, 8], [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])], [([2, -6, 6], [0, 3]), ([1, -6, 11], [5]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -4, 11], [7]), ([1, -4, 12], [8]), ([1, -3, 1], [0]), ([1, -3, 2], [1])], [([2, -6, 8], [1, 5]), ([1, -5, 3], [1]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -2, 4], [2]), ([1, -2, 5], [3]), ([1, -2, 6], [4]), ([1, -2, 7], [5])], [([2, -6, 10], [2, 7]), ([1, -5, 7], [2]), ([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"},"fixed":{"sha256":"22c7634e9c3b3822aa61a5e5387bf1f45b465b7942ce70b8aba4edab6f17e951","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))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, -6, 2], [0, 1]), ([1, -6, 4], [2]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -6, 2], [0]), ([1, -6, 3], [0]), ([1, -6, 5], [4]), ([1, -6, 6], [0])], [([2, -6, 4], [1, 3]), ([1, -6, 8], [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])], [([2, -6, 6], [0, 3]), ([1, -6, 11], [5]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -4, 11], [7]), ([1, -4, 12], [8]), ([1, -3, 1], [0]), ([1, -3, 2], [1])], [([2, -6, 8], [1, 5]), ([1, -5, 3], [1]), ([1, -6, 1], [0]), ([11, 6, 12], [6]), ([1, -2, 4], [2]), ([1, -2, 5], [3]), ([1, -2, 6], [4]), ([1, -2, 7], [5])], [([2, -6, 10], [2, 7]), ([1, -5, 7], [2]), ([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-quotient-modulus","generated_at":"2026-09-29T14:39:16.225512+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 m//g at the quotient modulus step.","root_cause":"The quotient modulus step uses m instead of m//g.","sha256":"41edac582f141c2b30b4db7205b928523159ef506ab104b3b60b91e8c2bc0479","title":"Linear congruence solutions: quotient modulus · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.226,"exit_code":1,"observations":[{"actual":[1,3],"check":"explicit oracle 0","expected":[0,1],"passed":false},{"actual":[0],"check":"explicit oracle 1","expected":[2],"passed":false},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 3","expected":[6],"passed":false},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 5","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 6","expected":[4],"passed":false},{"actual":[0],"check":"explicit oracle 7","expected":[0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 3], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0], \"expected\": [2], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [0], \"expected\": [6], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0], \"expected\": [4], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.889,"exit_code":1,"observations":[{"actual":[1,3],"check":"explicit oracle 0","expected":[0,1],"passed":false},{"actual":[2],"check":"explicit oracle 1","expected":[2],"passed":true},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[6],"check":"explicit oracle 3","expected":[6],"passed":true},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 5","expected":[0],"passed":true},{"actual":[4],"check":"explicit oracle 6","expected":[4],"passed":true},{"actual":[0],"check":"explicit oracle 7","expected":[0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 3], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [6], \"expected\": [6], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [4], \"expected\": [4], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.601,"exit_code":0,"observations":[{"actual":[0,1],"check":"explicit oracle 0","expected":[0,1],"passed":true},{"actual":[2],"check":"explicit oracle 1","expected":[2],"passed":true},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[6],"check":"explicit oracle 3","expected":[6],"passed":true},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 5","expected":[0],"passed":true},{"actual":[4],"check":"explicit oracle 6","expected":[4],"passed":true},{"actual":[0],"check":"explicit oracle 7","expected":[0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [6], \"expected\": [6], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [4], \"expected\": [4], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}