Translate the following inference to logic notation: If James were a soldier, then it is cloudy. If it is cloudy, then Mary is an electrician. It is windy. If Mary were an electrician, then it is not windy. Therefore James is not a soldier.
p -> q. q -> r. s. r -> ~s. Therefore ~p.