Translate the following inference to logic notation: Robert is a janitor. Thomas is a soldier if and only if David is a nurse. If Robert were a janitor, then Thomas is a soldier. Therefore David is a nurse.
p. q <-> r. p -> q. Therefore r.