criminal law recognizes that a defendant may not be responsible for a criminal act if his mental state was impaired by