An Investigation of the Laws of Thought