FA-62671 / Tax bracket computation / Open access
The exclusion amount is subtracted from the tax as if it were a credit · case 01
Estates owe no tax far above the exclusion because 13.6 million of tax is forgiven.
ROOT CAUSE
The unified credit is set to the exclusion amount itself instead of the tax on it.
VERIFIED REPAIR
The unified credit is the tentative tax on the exclusion amount.
Unsuccessful approach: Multiplying the exclusion by the top 40% rate overstates the credit because lower slices are taxed below 40%.
Case contract
solve(estate, gifts, dsue): stipulated unified transfer tax in whole dollars. T is the progressive schedule 18% to 10000 rising to 40% above 1000000. The exclusion is 13610000 + dsue; the unified credit is T(exclusion). Tentative tax = T(estate + gifts). Gift credit = max(0, T(gifts) - unified credit). Tax = max(0, tentative - gift credit - unified credit), returned in integer cents.
Why this case matters
Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(estate, gifts, dsue):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
sched = [[10000, '18'], [20000, '20'], [40000, '22'], [60000, '24'], [80000, '26'], [100000, '28'], [150000, '30'], [250000, '32'], [500000, '34'], [750000, '37'], [1000000, '39'], [None, '40']]
T = lambda x: prog(x, sched)
credit = Fraction(13610000 + dsue)
tent = T(estate + gifts)
gift_credit = max(0, T(gifts) - credit)
return cents(max(0, tent - gift_credit - credit))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression credit-not-exclusion 1', (20000000, 0, 0), 255600000),
('regression credit-not-exclusion 2', (10000000, 5000000, 0), 55600000),
('control: under exclusion', (10000000, 0, 0), 0), ('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0)],
[('regression credit-not-exclusion 1', (20000000, 0, 5000000), 55600000),
('regression credit-not-exclusion 2', (5000000, 15000000, 0), 200000000),
('partial repair guard 2', (8632782, 5000000, 0), 911280), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000)],
[('regression credit-not-exclusion 1', (13610000, 15000000, 0), 544400000),
('regression credit-not-exclusion 2', (8632782, 5000000, 0), 911280),
('partial repair guard 1', (21431981, 500000, 0), 332879240),
('partial repair guard 2', (13610000, 500000, 0), 20000000), ('control: large estate', (20000000, 0, 0), 255600000),
('control: under exclusion', (10000000, 0, 0), 0), ('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)],
[('regression credit-not-exclusion 1', (788866, 18885032, 2000000), 31554640),
('regression credit-not-exclusion 2', (21431981, 500000, 0), 332879240),
('partial repair guard 1', (13610000, 5000000, 2000000), 120000000),
('partial repair guard 2', (13610000, 5703648, 0), 228145920),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression credit-not-exclusion 1', (13610000, 500000, 0), 20000000),
('regression credit-not-exclusion 2', (13610000, 5000000, 2000000), 120000000),
('partial repair guard 1', (27783445, 500000, 5000000), 386937800),
('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression credit-not-exclusion 1 | 0 | 255600000 | Failed |
| regression credit-not-exclusion 2 | 0 | 55600000 | Failed |
| control: under exclusion | 0 | 0 | Passed |
| control: ported exclusion | 0 | 55600000 | Failed |
| control: gifts above exclusion | 0 | 200000000 | Failed |
| control: modest | 0 | 0 | Passed |
SHA-256 / 8316e4ffc27200405446df23b13ba0ea7071416aeef7cb3b293bf6043a1429c3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(estate, gifts, dsue):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
sched = [[10000, '18'], [20000, '20'], [40000, '22'], [60000, '24'], [80000, '26'], [100000, '28'], [150000, '30'], [250000, '32'], [500000, '34'], [750000, '37'], [1000000, '39'], [None, '40']]
T = lambda x: prog(x, sched)
credit = Fraction(13610000 + dsue) * 40 / 100
tent = T(estate + gifts)
gift_credit = max(0, T(gifts) - credit)
return cents(max(0, tent - gift_credit - credit))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression credit-not-exclusion 1', (20000000, 0, 0), 255600000),
('regression credit-not-exclusion 2', (10000000, 5000000, 0), 55600000),
('control: under exclusion', (10000000, 0, 0), 0), ('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0)],
[('regression credit-not-exclusion 1', (20000000, 0, 5000000), 55600000),
('regression credit-not-exclusion 2', (5000000, 15000000, 0), 200000000),
('partial repair guard 2', (8632782, 5000000, 0), 911280), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000)],
[('regression credit-not-exclusion 1', (13610000, 15000000, 0), 544400000),
('regression credit-not-exclusion 2', (8632782, 5000000, 0), 911280),
('partial repair guard 1', (21431981, 500000, 0), 332879240),
('partial repair guard 2', (13610000, 500000, 0), 20000000), ('control: large estate', (20000000, 0, 0), 255600000),
('control: under exclusion', (10000000, 0, 0), 0), ('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)],
[('regression credit-not-exclusion 1', (788866, 18885032, 2000000), 31554640),
('regression credit-not-exclusion 2', (21431981, 500000, 0), 332879240),
('partial repair guard 1', (13610000, 5000000, 2000000), 120000000),
('partial repair guard 2', (13610000, 5703648, 0), 228145920),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression credit-not-exclusion 1', (13610000, 500000, 0), 20000000),
('regression credit-not-exclusion 2', (13610000, 5000000, 2000000), 120000000),
('partial repair guard 1', (27783445, 500000, 5000000), 386937800),
('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression credit-not-exclusion 1 | 250180000 | 255600000 | Failed |
| regression credit-not-exclusion 2 | 50180000 | 55600000 | Failed |
| control: under exclusion | 0 | 0 | Passed |
| control: ported exclusion | 50180000 | 55600000 | Failed |
| control: gifts above exclusion | 200000000 | 200000000 | Passed |
| control: modest | 0 | 0 | Passed |
SHA-256 / ff443dbfc968858094051fc4fa9d1a90af1f66d710ea241605199e57bd611989
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(estate, gifts, dsue):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
sched = [[10000, '18'], [20000, '20'], [40000, '22'], [60000, '24'], [80000, '26'], [100000, '28'], [150000, '30'], [250000, '32'], [500000, '34'], [750000, '37'], [1000000, '39'], [None, '40']]
T = lambda x: prog(x, sched)
credit = T(13610000 + dsue)
tent = T(estate + gifts)
gift_credit = max(0, T(gifts) - credit)
return cents(max(0, tent - gift_credit - credit))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression credit-not-exclusion 1', (20000000, 0, 0), 255600000),
('regression credit-not-exclusion 2', (10000000, 5000000, 0), 55600000),
('control: under exclusion', (10000000, 0, 0), 0), ('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0)],
[('regression credit-not-exclusion 1', (20000000, 0, 5000000), 55600000),
('regression credit-not-exclusion 2', (5000000, 15000000, 0), 200000000),
('partial repair guard 2', (8632782, 5000000, 0), 911280), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000)],
[('regression credit-not-exclusion 1', (13610000, 15000000, 0), 544400000),
('regression credit-not-exclusion 2', (8632782, 5000000, 0), 911280),
('partial repair guard 1', (21431981, 500000, 0), 332879240),
('partial repair guard 2', (13610000, 500000, 0), 20000000), ('control: large estate', (20000000, 0, 0), 255600000),
('control: under exclusion', (10000000, 0, 0), 0), ('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)],
[('regression credit-not-exclusion 1', (788866, 18885032, 2000000), 31554640),
('regression credit-not-exclusion 2', (21431981, 500000, 0), 332879240),
('partial repair guard 1', (13610000, 5000000, 2000000), 120000000),
('partial repair guard 2', (13610000, 5703648, 0), 228145920),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression credit-not-exclusion 1', (13610000, 500000, 0), 20000000),
('regression credit-not-exclusion 2', (13610000, 5000000, 2000000), 120000000),
('partial repair guard 1', (27783445, 500000, 5000000), 386937800),
('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 |
|---|---|---|---|
| regression credit-not-exclusion 1 | 255600000 | 255600000 | Passed |
| regression credit-not-exclusion 2 | 55600000 | 55600000 | Passed |
| control: under exclusion | 0 | 0 | Passed |
| control: ported exclusion | 55600000 | 55600000 | Passed |
| control: gifts above exclusion | 200000000 | 200000000 | Passed |
| control: modest | 0 | 0 | Passed |
SHA-256 / 70170e6d33f3036e2c0627420753e001e79948fd3fcf3577ca31d8ddbea93783
Verification & scope
A deterministic, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's rules. 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:47:06.704422+00:00.
Case digest / 7f3cbf9aa2d3527a048b8d57c33e0e8b444dbd00ee1c4a4ea24130d40ce5d696