Calculate the integral of dqrev / T for each of the 4 steps in the Carnot cycle of, and sum them to prove that their sum equals zero. This turns out to also be true for any cyclic process that returns the system to its original state. This is what suggested that dqrev / T is the derivative of some new state function (entropy)