Translate the following inference to logic notation: It is late. If it is overcast, then Linda is sleeping. If Linda sleeps, then it is overcast. Linda is not sleeping. Therefore it is not overcast and it is late.
p. q -> r. r -> q. ~r. Therefore ~q and p.