Translate the following inference to logic notation: If Robert sleeps, then Barbara is poor. If Robert doesn't sleep, then John is happy. Jessica is not cooking. If Barbara were poor, then Robert is sleeping. Barbara is poor if and only if Jessica is cooking. Therefore John is happy.
p -> q. ~p -> r. ~s. q -> p. q <-> s. Therefore r.