Source: https://cs.wellesley.edu/~cs235/fall10/lectures/32_decidable_and_undecidable-revised.pdf