{"abstract":"The exact generalized crt result violates the stated contract at reduced congruence multiplier.","category":"Numerics","checks":8,"contract":"Input [a,m,b,n], positive moduli; return least nonnegative common residue and lcm modulus or None.","evaluation_group":"s3-numerics-generalized-crt","failed_approach":"The partial repair ((b-a)//g)%q if q>1 else 0 still violates the reduced congruence multiplier invariant.","family":"s3-numerics-generalized-crt-reduced-congruence-multiplier","id":"FA-14346","implementations":{"attempt":{"sha256":"ca17202ef4362c4f6bedef5cf0294fac605bcb84fb79566a237b578a0450c93d","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,m,b,n=x\n    g=math.gcd(m,n)\n    if (b-a)%g != 0: return None\n    q=n//g\n    k=((b-a)//g)%q if q>1 else 0\n    period=m*(n//g)\n    r=a+m*k\n    return [r%period,period]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-3, 2, -1, 4], [3, 4]), ([-3, 2, -2, 3], [1, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-3, 1, -2, 1], [0, 1]), ([-3, 1, -1, 1], [0, 1]), ([-3, 1, 0, 1], [0, 1]), ([-3, 1, 1, 1], [0, 1])], [([-3, 2, 3, 4], [3, 4]), ([-3, 2, 2, 3], [5, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-1, 1, 0, 1], [0, 1]), ([-1, 1, 1, 1], [0, 1]), ([-1, 1, 2, 1], [0, 1]), ([-1, 1, 3, 1], [0, 1])], [([-2, 2, 0, 4], [0, 4]), ([-2, 2, 0, 3], [0, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([1, 1, 3, 1], [0, 1]), ([2, 1, -3, 1], [0, 1]), ([2, 1, -2, 1], [0, 1]), ([2, 1, -1, 1], [0, 1])], [([-1, 2, -3, 4], [1, 4]), ([-1, 2, -3, 3], [3, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-3, 1, -1, 2], [1, 2]), ([-3, 1, 0, 2], [0, 2]), ([-3, 1, 1, 2], [1, 2]), ([-3, 1, 2, 2], [0, 2])], [([-1, 2, 1, 4], [1, 4]), ([-1, 2, 1, 3], [1, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-1, 1, 2, 2], [0, 2]), ([-1, 1, 3, 2], [1, 2]), ([0, 1, -3, 2], [1, 2]), ([0, 1, -2, 2], [0, 2])]]\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":"80b29ecabbcc33d7fb7e6fd76f6f9e7532c10fd8913a3ad172db42829986b622","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,m,b,n=x\n    g=math.gcd(m,n)\n    if (b-a)%g != 0: return None\n    q=n//g\n    k=((b-a)*pow(m//g,-1,q))%q if q>1 else 0\n    period=m*(n//g)\n    r=a+m*k\n    return [r%period,period]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-3, 2, -1, 4], [3, 4]), ([-3, 2, -2, 3], [1, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-3, 1, -2, 1], [0, 1]), ([-3, 1, -1, 1], [0, 1]), ([-3, 1, 0, 1], [0, 1]), ([-3, 1, 1, 1], [0, 1])], [([-3, 2, 3, 4], [3, 4]), ([-3, 2, 2, 3], [5, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-1, 1, 0, 1], [0, 1]), ([-1, 1, 1, 1], [0, 1]), ([-1, 1, 2, 1], [0, 1]), ([-1, 1, 3, 1], [0, 1])], [([-2, 2, 0, 4], [0, 4]), ([-2, 2, 0, 3], [0, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([1, 1, 3, 1], [0, 1]), ([2, 1, -3, 1], [0, 1]), ([2, 1, -2, 1], [0, 1]), ([2, 1, -1, 1], [0, 1])], [([-1, 2, -3, 4], [1, 4]), ([-1, 2, -3, 3], [3, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-3, 1, -1, 2], [1, 2]), ([-3, 1, 0, 2], [0, 2]), ([-3, 1, 1, 2], [1, 2]), ([-3, 1, 2, 2], [0, 2])], [([-1, 2, 1, 4], [1, 4]), ([-1, 2, 1, 3], [1, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-1, 1, 2, 2], [0, 2]), ([-1, 1, 3, 2], [1, 2]), ([0, 1, -3, 2], [1, 2]), ([0, 1, -2, 2], [0, 2])]]\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":"c54e04acf6519dd612e726b9496cfb1702f7b1703e43611dd66e8972f12330a7","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,m,b,n=x\n    g=math.gcd(m,n)\n    if (b-a)%g != 0: return None\n    q=n//g\n    k=((b-a)//g*pow(m//g,-1,q))%q if q>1 else 0\n    period=m*(n//g)\n    r=a+m*k\n    return [r%period,period]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-3, 2, -1, 4], [3, 4]), ([-3, 2, -2, 3], [1, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-3, 1, -2, 1], [0, 1]), ([-3, 1, -1, 1], [0, 1]), ([-3, 1, 0, 1], [0, 1]), ([-3, 1, 1, 1], [0, 1])], [([-3, 2, 3, 4], [3, 4]), ([-3, 2, 2, 3], [5, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-1, 1, 0, 1], [0, 1]), ([-1, 1, 1, 1], [0, 1]), ([-1, 1, 2, 1], [0, 1]), ([-1, 1, 3, 1], [0, 1])], [([-2, 2, 0, 4], [0, 4]), ([-2, 2, 0, 3], [0, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([1, 1, 3, 1], [0, 1]), ([2, 1, -3, 1], [0, 1]), ([2, 1, -2, 1], [0, 1]), ([2, 1, -1, 1], [0, 1])], [([-1, 2, -3, 4], [1, 4]), ([-1, 2, -3, 3], [3, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-3, 1, -1, 2], [1, 2]), ([-3, 1, 0, 2], [0, 2]), ([-3, 1, 1, 2], [1, 2]), ([-3, 1, 2, 2], [0, 2])], [([-1, 2, 1, 4], [1, 4]), ([-1, 2, 1, 3], [1, 6]), ([-3, 1, -3, 1], [0, 1]), ([3, 8, 3, 8], [3, 8]), ([-1, 1, 2, 2], [0, 2]), ([-1, 1, 3, 2], [1, 2]), ([0, 1, -3, 2], [1, 2]), ([0, 1, -2, 2], [0, 2])]]\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-generalized-crt-reduced-congruence-multiplier","generated_at":"2026-09-29T14:39:15.908107+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 ((b-a)//g*pow(m//g,-1,q))%q if q>1 else 0 at the reduced congruence multiplier step.","root_cause":"The reduced congruence multiplier step uses ((b-a)*pow(m//g,-1,q))%q if q>1 else 0 instead of ((b-a)//g*pow(m//g,-1,q))%q if q>1 else 0.","sha256":"9a475dc2c2f5887c9512dc0b4fdcc79dc22c7aae9c9dcb25ac2d2bc18b8c0763","title":"Generalized crt: reduced congruence multiplier · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.194,"exit_code":1,"observations":[{"actual":[3,4],"check":"explicit oracle 0","expected":[3,4],"passed":true},{"actual":[5,6],"check":"explicit oracle 1","expected":[1,6],"passed":false},{"actual":[0,1],"check":"explicit oracle 2","expected":[0,1],"passed":true},{"actual":[3,8],"check":"explicit oracle 3","expected":[3,8],"passed":true},{"actual":[0,1],"check":"explicit oracle 4","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 5","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 6","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 7","expected":[0,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [5, 6], \"expected\": [1, 6], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [3, 8], \"expected\": [3, 8], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.96,"exit_code":1,"observations":[{"actual":[1,4],"check":"explicit oracle 0","expected":[3,4],"passed":false},{"actual":[1,6],"check":"explicit oracle 1","expected":[1,6],"passed":true},{"actual":[0,1],"check":"explicit oracle 2","expected":[0,1],"passed":true},{"actual":[3,8],"check":"explicit oracle 3","expected":[3,8],"passed":true},{"actual":[0,1],"check":"explicit oracle 4","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 5","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 6","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 7","expected":[0,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 4], \"expected\": [3, 4], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [1, 6], \"expected\": [1, 6], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [3, 8], \"expected\": [3, 8], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.617,"exit_code":0,"observations":[{"actual":[3,4],"check":"explicit oracle 0","expected":[3,4],"passed":true},{"actual":[1,6],"check":"explicit oracle 1","expected":[1,6],"passed":true},{"actual":[0,1],"check":"explicit oracle 2","expected":[0,1],"passed":true},{"actual":[3,8],"check":"explicit oracle 3","expected":[3,8],"passed":true},{"actual":[0,1],"check":"explicit oracle 4","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 5","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 6","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 7","expected":[0,1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [3, 4], \"expected\": [3, 4], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [1, 6], \"expected\": [1, 6], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [3, 8], \"expected\": [3, 8], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}