{"abstract":"The exact jacobi symbol result violates the stated contract at supplementary two law.","category":"Numerics","checks":8,"contract":"Input [a,n], positive odd n; return Jacobi symbol in {-1,0,1}. Bounds: |a|<=100 and odd n<=99.","contract_signature":"x","evaluation_group":"s3-numerics-jacobi-symbol","failed_approach":"The partial repair n%8==3 still violates the supplementary two law invariant.","family":"s3-numerics-jacobi-symbol-supplementary-two-law","id":"FA-14846","implementations":{"attempt":{"sha256":"f4e3a5a6645d93d97ddf6f7877c4d4e0ec4bb5b3234ddcb54fbc79802d156c2f","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,n=x\n    a=a%n;sign=1\n    for _ in range(100):\n     if a==0:break\n     while a%2==0:\n      a//=2\n      if n%8==3:sign=-sign\n     if a%4==3 and n%4==3:sign=-sign\n     a,n=n%a,a\n    return sign if n==1 else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-28, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([-29, 1], 1), ([-28, 1], 1), ([-27, 1], 1), ([-26, 1], 1), ([-25, 1], 1)], [([-23, 5], -1), ([-13, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([-13, 1], 1), ([-12, 1], 1), ([-11, 1], 1), ([-10, 1], 1)], [([-18, 5], -1), ([2, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([4, 1], 1), ([5, 1], 1), ([6, 1], 1), ([7, 1], 1)], [([-13, 5], -1), ([17, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([21, 1], 1), ([22, 1], 1), ([23, 1], 1), ([24, 1], 1)], [([-8, 5], -1), ([32, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([38, 1], 1), ([39, 1], 1), ([40, 1], 1), ([41, 1], 1)]]\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":"3c00c04bd2ddd8f1ae329f8cc11e501365c9176116bfb3a2fa5a9beb1ab98126","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,n=x\n    a=a%n;sign=1\n    for _ in range(100):\n     if a==0:break\n     while a%2==0:\n      a//=2\n      if n%4==3:sign=-sign\n     if a%4==3 and n%4==3:sign=-sign\n     a,n=n%a,a\n    return sign if n==1 else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([-28, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([-29, 1], 1), ([-28, 1], 1), ([-27, 1], 1), ([-26, 1], 1), ([-25, 1], 1)], [([-23, 5], -1), ([-13, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([-13, 1], 1), ([-12, 1], 1), ([-11, 1], 1), ([-10, 1], 1)], [([-18, 5], -1), ([2, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([4, 1], 1), ([5, 1], 1), ([6, 1], 1), ([7, 1], 1)], [([-13, 5], -1), ([17, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([21, 1], 1), ([22, 1], 1), ([23, 1], 1), ([24, 1], 1)], [([-8, 5], -1), ([32, 5], -1), ([-30, 1], 1), ([50, 69], -1), ([38, 1], 1), ([39, 1], 1), ([40, 1], 1), ([41, 1], 1)]]\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-jacobi-symbol-supplementary-two-law","generated_at":"2026-09-29T14:39:20.971064+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 supplementary two law step uses n%4==3 instead of n%8 in (3,5).","sha256":"4f2b5cdef40e29a111df3f738628b2140002a5a52246506904482c2faa78677b","title":"Jacobi symbol: supplementary two law · 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":42.844,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":-1,"passed":false},{"actual":1,"check":"explicit oracle 1","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 2","expected":-1,"passed":false},{"actual":1,"check":"explicit oracle 3","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 4","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 7","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.148,"exit_code":1,"observations":[{"actual":1,"check":"explicit oracle 0","expected":-1,"passed":false},{"actual":1,"check":"explicit oracle 1","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 2","expected":-1,"passed":false},{"actual":1,"check":"explicit oracle 3","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 4","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 5","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 6","expected":1,"passed":true},{"actual":1,"check":"explicit oracle 7","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": 1, \"expected\": -1, \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"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."}}