FAILURE MAP
← Case archive

FA-5486 / Number theory / Open access

Least common multiple sign · case 01

Multiplication retains shared factors twice.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Multiplication retains shared factors twice.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return math.lcm(a,b)

Unsuccessful approach: Removing shared factors without magnitude normalization yields negative LCMs.

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. a and b may be signed or zero; LCM is nonnegative and is zero if either input is zero. Exact operational definition: math.lcm(a,b)

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(a, b):
    return a*b
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (4, 6)', solve(*(4, 6)), 12)
check('fixture 2: (-4, 6)', solve(*(-4, 6)), 12)
check('fixture 3: (0, 7)', solve(*(0, 7)), 0)
check('fixture 4: (-3, -5)', solve(*(-3, -5)), 15)
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 fixtureActualExpectedOutcome
fixture 1: (4, 6)2412Failed
fixture 2: (-4, 6)-2412Failed
fixture 3: (0, 7)00Passed
fixture 4: (-3, -5)1515Passed

SHA-256 / c67897d0b1a3c437b90c1b97a03e06d490d3f1c9c966f925d8110c629f9e031e

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(a, b):
    return a*b//math.gcd(a,b) if a and b else 0
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (4, 6)', solve(*(4, 6)), 12)
check('fixture 2: (-4, 6)', solve(*(-4, 6)), 12)
check('fixture 3: (0, 7)', solve(*(0, 7)), 0)
check('fixture 4: (-3, -5)', solve(*(-3, -5)), 15)
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 fixtureActualExpectedOutcome
fixture 1: (4, 6)1212Passed
fixture 2: (-4, 6)-1212Failed
fixture 3: (0, 7)00Passed
fixture 4: (-3, -5)1515Passed

SHA-256 / 29684dacd137abff659ff4b68f5de58875fe4988d6117800d54d9af13c3e379e

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(a, b):
    return math.lcm(a,b)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (4, 6)', solve(*(4, 6)), 12)
check('fixture 2: (-4, 6)', solve(*(-4, 6)), 12)
check('fixture 3: (0, 7)', solve(*(0, 7)), 0)
check('fixture 4: (-3, -5)', solve(*(-3, -5)), 15)
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 fixtureActualExpectedOutcome
fixture 1: (4, 6)1212Passed
fixture 2: (-4, 6)1212Passed
fixture 3: (0, 7)00Passed
fixture 4: (-3, -5)1515Passed

SHA-256 / e344478650f0f044783152927463fe99b532518706b6b1a90b739d57a9ae0ce1

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.126851+00:00.

Case digest / adfec7f601d910927649a6ba1c96ae19fda36fcc73b3e2c994e2a44768497636