FA-5776 / Planar geometry / Open access
Rectangle union area · case 01
Overlapping area is counted twice.
ROOT CAUSE
Overlapping area is counted twice.
THE FAILURE
Overlapping area is counted twice.
Unsuccessful approach: The bounding rectangle includes uncovered space.
Case contract
Integer coordinates and lengths, with exact arithmetic except for indicated division results. Lengths are nonnegative. Rectangles are (xmin,ymin,xmax,ymax) with ordered bounds; coordinate vectors have matching dimensions. Rectangle union area. Exact operational definition: (a[2]-a[0])*(a[3]-a[1])+(b[2]-b[0])*(b[3]-b[1])-max(0,min(a[2],b[2])-max(a[0],b[0]))*max(0,min(a[3],b[3])-max(a[1],b[1]))
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Planar geometry 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[2]-a[0])*(a[3]-a[1])+(b[2]-b[0])*(b[3]-b[1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((0, 0, 2, 2), (1, 1, 3, 3))', solve(*((0, 0, 2, 2), (1, 1, 3, 3))), 7)
check('fixture 2: ((0, 0, 1, 1), (2, 2, 3, 3))', solve(*((0, 0, 1, 1), (2, 2, 3, 3))), 2)
check('fixture 3: ((0, 0, 2, 2), (0, 0, 2, 2))', solve(*((0, 0, 2, 2), (0, 0, 2, 2))), 4)
check('fixture 4: ((0, 0, 4, 4), (1, 1, 2, 2))', solve(*((0, 0, 4, 4), (1, 1, 2, 2))), 16)
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: ((0, 0, 2, 2), (1, 1, 3, 3)) | 8 | 7 | Failed |
| fixture 2: ((0, 0, 1, 1), (2, 2, 3, 3)) | 2 | 2 | Passed |
| fixture 3: ((0, 0, 2, 2), (0, 0, 2, 2)) | 8 | 4 | Failed |
| fixture 4: ((0, 0, 4, 4), (1, 1, 2, 2)) | 17 | 16 | Failed |
SHA-256 / afa240c10371f01d100558ffecdbc5050866da07f429d39a5f9b3c0ab15da405
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 (max(a[2],b[2])-min(a[0],b[0]))*(max(a[3],b[3])-min(a[1],b[1]))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ((0, 0, 2, 2), (1, 1, 3, 3))', solve(*((0, 0, 2, 2), (1, 1, 3, 3))), 7)
check('fixture 2: ((0, 0, 1, 1), (2, 2, 3, 3))', solve(*((0, 0, 1, 1), (2, 2, 3, 3))), 2)
check('fixture 3: ((0, 0, 2, 2), (0, 0, 2, 2))', solve(*((0, 0, 2, 2), (0, 0, 2, 2))), 4)
check('fixture 4: ((0, 0, 4, 4), (1, 1, 2, 2))', solve(*((0, 0, 4, 4), (1, 1, 2, 2))), 16)
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: ((0, 0, 2, 2), (1, 1, 3, 3)) | 9 | 7 | Failed |
| fixture 2: ((0, 0, 1, 1), (2, 2, 3, 3)) | 9 | 2 | Failed |
| fixture 3: ((0, 0, 2, 2), (0, 0, 2, 2)) | 4 | 4 | Passed |
| fixture 4: ((0, 0, 4, 4), (1, 1, 2, 2)) | 16 | 16 | Passed |
SHA-256 / 36fa408e7e9456e6532f3c1c6b86e506a9acccf61b7d3edc0fdc3a986cca5f0b
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 4 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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:53.590630+00:00.
Case digest / acadca15372b47dd95285eb4f2df8bf2507210041d4a769db55a04627dc77138