FA-5551 / Number theory / Open access
Perfect number predicate · case 01
Self-divisors are included in the perfect-number equality.
ROOT CAUSE
Self-divisors are included in the perfect-number equality.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return n>0 and sum(d for d in range(1,n) if n%d==0)==n
Unsuccessful approach: Omitting the unit divisor prevents true perfect numbers from matching.
Case 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. Perfect number predicate. Exact operational definition: n>0 and sum(d for d in range(1,n) if n%d==0)==n
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Number theory results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(n):
return sum(d for d in range(1,n+1) if n%d==0)==n
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (6,)', solve(*(6,)), True)
check('fixture 2: (28,)', solve(*(28,)), True)
check('fixture 3: (1,)', solve(*(1,)), False)
check('fixture 4: (12,)', solve(*(12,)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (6,) | False | True | Failed |
| fixture 2: (28,) | False | True | Failed |
| fixture 3: (1,) | True | False | Failed |
| fixture 4: (12,) | False | False | Passed |
SHA-256 / ecaa7a229423576f4c23ac2f9814a7c3328319b08d282d63bcd61119e135870b
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(n):
return sum(d for d in range(2,n) if n%d==0)==n
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (6,)', solve(*(6,)), True)
check('fixture 2: (28,)', solve(*(28,)), True)
check('fixture 3: (1,)', solve(*(1,)), False)
check('fixture 4: (12,)', solve(*(12,)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (6,) | False | True | Failed |
| fixture 2: (28,) | False | True | Failed |
| fixture 3: (1,) | False | False | Passed |
| fixture 4: (12,) | False | False | Passed |
SHA-256 / d47ad3beeda93a034d1bb1bdd7f4f407285f1a43019b74b3ed3de2d04fb58e32
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(n):
return n>0 and sum(d for d in range(1,n) if n%d==0)==n
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (6,)', solve(*(6,)), True)
check('fixture 2: (28,)', solve(*(28,)), True)
check('fixture 3: (1,)', solve(*(1,)), False)
check('fixture 4: (12,)', solve(*(12,)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1: (6,) | True | True | Passed |
| fixture 2: (28,) | True | True | Passed |
| fixture 3: (1,) | False | False | Passed |
| fixture 4: (12,) | False | False | Passed |
SHA-256 / def562ddcba5f19084a037cd69d8c65a4b136626ce8cb29c7f1a7264f78cb70b
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:37:50.898273+00:00.
Case digest / f98f0fdad2a78e8bb25b76e1f96e985ea75dad3aeae5f6f70b19759efda6ffa2