[Math] Solving rules of inference questions from Discrete Maths Rosen and I am confused on a step

discrete mathematicspropositional-calculus

So the question is,

Show that the premises “It is not sunny this afternoon and it is colder than yesterday,”

“We will go swimming only if it is sunny,”

“If we do not go swimming, then we will take a canoe trip,” and

“If we take a canoe trip, then we will be home by sunset”

lead to the conclusion

“We will be home by sunset.”

The first part of given solution states,

Let p be the proposition “It is sunny this afternoon,”

q the proposition “It is colder than yesterday,”

r the proposition “We will go swimming,”

s the proposition “We will take a canoe trip,” and

t the proposition “We will be home by sunset.” Then the premises become ¬p∧q,r →p,¬r →s, and s →t. The conclusion is simply t.

I am unable to figure out how the premise of statement,

We will go swimming only if it is sunny

became,

$r \Rightarrow p$

Shouldn't it be,

$p \Rightarrow r$

The way I am thinking is,

The statement "We will go swimming only if it is sunny" can also be written as,

If it is sunny, then we will go swimming.
.'. $p \Rightarrow r$

Please help me figure out what should be correct approach of turning the statement "We will go swimming only if it sunny" into proposition.

Thanks.

Best Answer

You are confusing "Swimming only if Sunny" with "Swimming if Sunny".

The former is meant by the problem poser to mean "If it is Sunny, we might or might not go Swimming, by we won't go Swimming if it is not Sunny".

The latter, which is how you interpreted it, means "If it is Sunny, we certainly go Swimming; I am saying nothing about what happens if it is not Sunny."

You therefore had the implicatoin in the opposite direction of what was intended.

This matter is further complicated by the fact that $A \mbox{ only if } B$ is often used in math texts to mean $A$ if and only if $B$, as in

"An even number is perfect only if it is of the form $2^{n-1}(2^n-1)$ with $(2^n-1)$ prime."

If you take "only if" to have that meaning, then your confusion is at least half justified.