Life is made of special cases and it isn't an ideal mathematical model that you can describe with a beautiful one liner.
Write solid tests, write meaningful comments, don't over engineer things and you should be good.
Most projects like this fail because they don't practice TDD. They have pages of code and no single proof that it works as expected apart from feedback from people testing it which is prone to errors.
6000 pages of rules is not a problem. You can implement anything but if you don't care to prove you implemented it correctly then that will almost never work.