A lot of law is based around subjective gray lines. “How would a reasonable person behave in this unique situation?” Is at the root of a lot of legal situations.
Write a function for that, keeping in mind that “this situation” needs to be modeled with potentially infinite variables. Then try to define a “reasonable person”.
Hell, the reason most trials happen is because there is huge grey area, and the written laws are not obvious as to what the outcome should be.