Repository navigation
Conversation
IRC 213(a) allows medical expenses the taxpayer paid. Premium inputs sit on the person who paid (#10055), so a dependent's own premium payments are not the filers' expenses. The federal subtotal now sums premiums over the head and spouse only and keeps every member's other medical expenses, which the CPS ASEC records on the person cared for. - New Jersey drops its per-dependent exclusion, which the federal base no longer needs, and counts only the filers' payroll premiums. - North Dakota's renter refund adds the dependents' premiums back: NDCC 57-02-08.1(5)(c) counts medical expenses the applicant's dependent paid. - Montana's 2021-2023 line 1 takes out only the filers' premiums. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add YAML cases for the federal subtotal, New Mexico's deduction, credit and exemption, New Jersey, North Dakota and Montana, each with the head and spouse labels both ways, plus Hypothesis properties: the filers' amounts do not depend on a dependent's own premiums, moving premiums from a filer to a dependent never raises them and moving back restores them, labels do not matter, and North Dakota keeps both payers' premiums. Update cases that expected a dependent's own premiums in Schedule A: two federal, nine Idaho federal expectations (Idaho's own outputs are unchanged), two New Jersey, and a Montana supplied subtotal that included the dependent's payment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
fix-schedule-a-dependent-paid-premiums
branch
from
October 19, 2026 12:52
8d657b8 to
b837849
Compare
Idaho's federal-first provenance test expected the dependent's own premiums in the federal deduction. It now gives the dependent other costs instead, which the federal subtotal counts and Idaho's claimant worksheet does not, so it still separates the two amounts. Montana's line 1 invariant subtracts only the filers' premiums, which are all the federal subtotal holds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
force-pushed
the
fix-schedule-a-dependent-paid-premiums
branch
from
October 19, 2026 12:58
e5a6cb7 to
b3c256b
Compare
This was referenced Oct 19, 2026
- Changelog: a dependent's own premiums leave New Jersey's general medical base (Worksheet F line 1); line 5 still carries a dependent's derived SE deduction. - North Dakota documentation: a supplied subtotal infers no exclusion, but the dependents' premiums are still added. - New Mexico: a parent-paid control for the general deduction (25% of 2,200 = 550), and the PIT-ADJ quote cited at PDF pages 5-6. - Property test docstring: the moved-back row checks determinism, and the file covers the named readers, not every reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Federal Schedule A medical expenses counted every tax-unit member's health insurance premiums, including premiums a dependent paid. IRC 213(a) allows "the expenses paid during the taxable year ... for medical care of the taxpayer, his spouse, or a dependent", and premium inputs record the person who paid them (#10055: "A parent-paid dependent policy belongs on the parent"). So a dependent's own payments are not the filers' expenses. This PR counts only the head's and spouse's premiums, and fixes the state bases that read the federal subtotal. The US + core hub's methodology review of #9947 found the bug.
Law and input contract
other_medical_expensesnow documents this.What changes
itemized_medical_expensessumsmedical_expense_health_insurance_premiumsover the head and spouse withtax_unit_non_dep_sum, the label-free helper. Everything else in the formula is unchanged: the §162(l)(3) exclusion (already bounded to the filers' premiums) and every member'sother_medical_expenses.Readers of the subtotal
medical_expense_deductionand the federal itemized totals, and through them taxable income, the itemized limitation, QBID, the shared state tax dispatcher, the state formulas that read them (CA, CO, DC, GA, IA, ID, KS, LA, MA, MD, ME, MN, MO, MS, MT from 2024, NC, NE, NM, OK, OR, SC, UT, VA, VT, WI), three reforms (CRFB senior deduction, MA dependent exemption, MN Walz) and the TAXSIM emulatorHousehold before and after
mainf9b55fc: a 2024 joint couple aged 70 and 68 with $20,000 of wages. A 19-year-old student dependent pays $1,200 of their own premiums; the filers pay none.itemized_medical_expensesnm_medical_care_expense_deductionnj_medical_expense_deductionnd_renters_refund_incomemt_medical_expense_deduction_joint(2022)Invariants
These hold for every input that follows the payer contract:
Dependent invariance. None of these depends on a dependent's own premium input:
NJ's total deduction can still rise when a premium moves to a self-employed dependent, because line 5 adds that dependent's derived SE deduction. Review r1's case: parent wages $30,000 and a dependent with $10,000 of SE earnings. A $1,000 premium paid by the parent gives $200 ($1,000 − 2% of $40,000). The same premium paid by the dependent gives $1,000, all on line 5.
Payer move. Moving premiums from a filer's input to a dependent's never raises any of those amounts, with the SE deductions held fixed. A moved-back row repeats the drawn inputs, so it checks determinism (each return depends only on its own inputs), not an undo.
Labels. Exchanging the head and spouse labels changes none of them, nor North Dakota's renter refund income.
Conservation. Schedule A premium use plus the SE deduction equals the filers' paid premiums, when the deduction is within that pool. Every member's other medical expenses stay in the subtotal.
Bounds.
itemized_medical_expenses.itemized_medical_expenses≤ filer premiums + every member's other medical expenses.North Dakota. The paid-cost base is invariant to who paid, and equals every member's premiums plus other medical expenses on the computed path.
Differential.
itemized_medical_expensesequals an independent oracle, max(0, filer premiums − SE deduction) + every member's other medical expenses.Tests
mainf9b55fc and pass at this head. The four parent-paid controls (federal; NM deduction, credit and exemption) pass on both.tests/core/test_schedule_a_payer_attribution_properties.py(Hypothesis) checks invariants 1, 2, 3, 6 and 7 for the readers named there, with a supplied tax-unit SE deduction, in one vectorized simulation per year. It does not cover every reader of the subtotal. Onmain, the filer test fails and the North Dakota test passes, as it should.test_medical_expense_premium_conservation.pynow checks conservation over the filers' paid premiums (invariants 4 and 5). Its NJ property now checks that the dependents' own premiums never enter line 1. Its ND/NM oracle now adds the dependents' premiums only for ND. Onmain, all five fail.medical_expense_deductionanditemized_taxable_income_deductionsmoved; every Idaho output is unchanged.test_id_health_insurance_premiums.py, the deletion-provenance test moves the dependent's $500 from premiums to other costs. That keeps its federal and Idaho amounts apart ($1,250 against $750), so it still catches the provenance defect.tests/unit/test_mt_medical_premium_deduction_invariants.py, invariant 6 (line 1 base) subtracts only the filers' premiums from the federal subtotal, since those are all it holds.coregroup.Known gaps (not changed here)
other_medical_expenses. Fix Idaho health insurance premium subtraction #10023 treated them as recorded on the payer, but the CPS asks them by the person cared for. In the Idaho case "Claimant medical overlap includes spouse expenses and excludes dependent expenses", the dependent's $4,000 of bills is in the federal subtotal but not in Idaho's overlap.mt_medical_expense_deduction_indiv) counts each spouse's ownother_medical_expenses, so a dependent's bills reach neither spouse.itemized_medical_expenses, adding eligible long-term care premiums recorded on the insured person. It needs the same payer decision for a dependent's policy, and whichever lands second rebases.nj_agiand their SE deductions on line 5 (pre-existing).Impact
The US + core hub runs the microsimulation impact.
axiom: us/statute/26/213, TheAxiomFoundation/rulespec-us#1654 queued (payer-scope extension: targets, verbatim law, required outputs, review_finding and 10 companion cases. rulespec-us's §213 module takes the taxpayer's paid expenses as a tax-unit input, so it has no person-level sum to get wrong; #1654's §162(l) amendment and its NM 7-2-37/7-2-5.9/7-2-18.13, NJ 54A:3-3 and ND 57-02-08.1(5)(c) slices carry the scope.)
🤖 Generated with Claude Code