You're conflating determination of factual and legal questions (out of scope) with modeling the decision tree (in scope and useful).
The function you ask about would be "getDeductiblePercentage()," and the unit tests would return various hard coded numbers. Actually determining that value for a real taxpayer is still hard.
Being able to show how information flows through the US tax code would be useful, even if it doesn't solve all the problems that arise from its intricacy.
Or a unit test that determines whether the discussion during a meal with a customer was "substantially about business matters".