{"abstract":"A negative exponent is replaced with its magnitude.","category":"Number theory","checks":4,"contract":"Integer inputs; n is positive unless a zero or negative fixture explicitly extends that operation. A modulus is greater than one; p is prime; exponent k may be signed when an inverse exists. a may be signed, k integer, m>1, and gcd(a,m)=1 when k<0. Return a**k modulo m. Exact operational definition: pow(a,k,m)","evaluation_group":"model-3af60070bac9294f","failed_approach":"Returning zero for inverse powers violates the multiplicative group contract.","family":"xn-modular-negative-exponent","id":"FA-5546","implementations":{"attempt":{"sha256":"abede09983a2d9ab46ece8b01bb49640781a80b7233c13483179df0ea355983a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(a, k, m):\n    return pow(a,k,m) if k>=0 else 0\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (2, -1, 5)', solve(*(2, -1, 5)), 3)\ncheck('fixture 2: (2, -2, 5)', solve(*(2, -2, 5)), 4)\ncheck('fixture 3: (3, 0, 7)', solve(*(3, 0, 7)), 1)\ncheck('fixture 4: (3, 2, 7)', solve(*(3, 2, 7)), 2)\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":"4b386a4f852ae1630b02234554b3f5855a0c5d73035d8066411edf65e5de8e13","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(a, k, m):\n    return pow(a,abs(k),m)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (2, -1, 5)', solve(*(2, -1, 5)), 3)\ncheck('fixture 2: (2, -2, 5)', solve(*(2, -2, 5)), 4)\ncheck('fixture 3: (3, 0, 7)', solve(*(3, 0, 7)), 1)\ncheck('fixture 4: (3, 2, 7)', solve(*(3, 2, 7)), 2)\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":"93bacfb6342d2c18bb88f77b2a46d10296b6f3e1b350478aaf19850cc486c9d8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport calendar\nimport statistics\nimport itertools\nfrom fractions import Fraction\nfrom datetime import date, datetime, timedelta, timezone\nfrom decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR\n\nN = 1\nobservations = []\ndef solve(a, k, m):\n    return pow(a,k,m)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1: (2, -1, 5)', solve(*(2, -1, 5)), 3)\ncheck('fixture 2: (2, -2, 5)', solve(*(2, -2, 5)), 4)\ncheck('fixture 3: (3, 0, 7)', solve(*(3, 0, 7)), 1)\ncheck('fixture 4: (3, 2, 7)', solve(*(3, 2, 7)), 2)\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":" 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":"xn-modular-negative-exponent","generated_at":"2026-09-29T14:37:50.798170+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Number theory results depend on the stated convention.","repair":"Apply the specified mathematical contract directly, preserving all terms and boundary cases: return pow(a,k,m)","root_cause":"A negative exponent is replaced with its magnitude.","sha256":"1d1f3ec92036ac3bd1c52f40f76207dcdc340b386e1cd38b1eaaacc45c174c02","title":"Modular negative exponent · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":47.54,"exit_code":1,"observations":[{"actual":0,"check":"fixture 1: (2, -1, 5)","expected":3,"passed":false},{"actual":0,"check":"fixture 2: (2, -2, 5)","expected":4,"passed":false},{"actual":1,"check":"fixture 3: (3, 0, 7)","expected":1,"passed":true},{"actual":2,"check":"fixture 4: (3, 2, 7)","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (2, -1, 5)\", \"actual\": 0, \"expected\": 3, \"passed\": false}, {\"check\": \"fixture 2: (2, -2, 5)\", \"actual\": 0, \"expected\": 4, \"passed\": false}, {\"check\": \"fixture 3: (3, 0, 7)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 4: (3, 2, 7)\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.989,"exit_code":1,"observations":[{"actual":2,"check":"fixture 1: (2, -1, 5)","expected":3,"passed":false},{"actual":4,"check":"fixture 2: (2, -2, 5)","expected":4,"passed":true},{"actual":1,"check":"fixture 3: (3, 0, 7)","expected":1,"passed":true},{"actual":2,"check":"fixture 4: (3, 2, 7)","expected":2,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (2, -1, 5)\", \"actual\": 2, \"expected\": 3, \"passed\": false}, {\"check\": \"fixture 2: (2, -2, 5)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 3: (3, 0, 7)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 4: (3, 2, 7)\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.923,"exit_code":0,"observations":[{"actual":3,"check":"fixture 1: (2, -1, 5)","expected":3,"passed":true},{"actual":4,"check":"fixture 2: (2, -2, 5)","expected":4,"passed":true},{"actual":1,"check":"fixture 3: (3, 0, 7)","expected":1,"passed":true},{"actual":2,"check":"fixture 4: (3, 2, 7)","expected":2,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1: (2, -1, 5)\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"fixture 2: (2, -2, 5)\", \"actual\": 4, \"expected\": 4, \"passed\": true}, {\"check\": \"fixture 3: (3, 0, 7)\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"fixture 4: (3, 2, 7)\", \"actual\": 2, \"expected\": 2, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}