Translate the following inference to logic notation: Mary is a scientist. If it rains, then Robert is driving a car. If Robert drives a car, then it is raining. It is not raining. Therefore Robert is not driving a car and Mary is a scientist.
p. q -> r. r -> q. ~q. Therefore ~r and p.