Source: https://www.cs.ubc.ca/~kevinlb/teaching/cs322 - 2009-10/Lectures/Logic2.pdf