Let p,q, and r be the propositions,
p: Grizzly bears have been seen in the area.
q: Hiking is safe on the trail.
r: Berries are ripe along the trail.
Then in the book Discrete Mathematics And Its Applications by Kenneth H Rosen the following sentence,
For hiking on the trail to be safe, it is necessary but not sufficient that berries not be ripe along the trail and for grizzly bears not to have been seen in the area
is translated into propositional logic is (q -> (~r ^ ~p)) ^ ~((~r ^ ~p) -> q).
But, in my logical thinking it has to be only the first part of the above expression (q -> (~r ^ ~p)).
So, what's wrong with my thinking?