Completed the proof of problem 31