Translate the following inference to logic notation: If John sleeps, then Charles is a janitor. Joseph is a poet or John is sleeping. Joseph is a poet if and only if Charles is a janitor. Therefore Charles is a janitor.
p -> q. r or p. r <-> q. Therefore q.