That's a common fantasy of developers who haven't touched grass in a while.
It's a rehashing of Leibniz's "Calculemus!".
It's not a fully stupid idea, many rules can be automated and indeed have already been. The things that courts still have to decide manually are the leftovers that require more human judgment.
Why is it a fantasy to have a fair system with no room for interpretation?