Deductions & credits

the tax law says that if either parent can claim, then thethe following rule applies

IRC Sec 152(c)(4)

(B)More than 1 parent claiming qualifying child
If the parents claiming any qualifying child do not file a joint return together, such child shall be treated as the qualifying child of—
(i)the parent with whom the child resided for the longest period of time during the taxable year, or
(ii)if the child resides with both parents for the same amount of time during such taxable year, the parent with the highest adjusted gross income.