Translate the following inference to logic notation: If Thomas were an astronaut, then it is cold. If Thomas were an astronaut, then David is cooking. If it is cold, then David is cooking. If David cooks, then Thomas is an astronaut. Therefore it is cold if and only if Thomas is an astronaut.
p -> q. p -> r. q -> r. r -> p. Therefore q <-> p.