“You cannot... unless...” and “You can... only if...”

1.1k Views Asked by At

I am having a hard time translating implications from English to logic. It seems that a lot of the time, $P {\implies}Q$ is the same as $Q {\implies}P.$

“You cannot ride the roller coaster if you are under $4$ feet tall unless you are older than $16$ years old.” Let $X, Y,$ and $Z$ represent “You can ride the roller coaster,” “You are under $4$ feet tall,” and “You are older than $16$ years old,” respectively. Then the sentence can be translated to

$(Y \wedge \neg Z) \implies ¬X$

“You can access the Internet from campus only if you are a computer science major or you are not a freshman.” We let $A, C,$ and $F$ represent “You can access the Internet from campus,” “You are a computer science major,” and “You are a freshman,” respectively. Noting that “only if” is one way a conditional statement can be expressed, this sentence can be represented as

$A \implies (C \vee \neg F )$.

Why can't we say $(C \vee \neg F ) \implies A$? These English sentences both seem to say "you can/cannot access a particular thing if you meet / don't meet certain requirements", yet the goal $A$ is on the left hand side for the first example while the goal $\neg X$ is on the right hand side for the second example. I have looked around for answers but nothing has seemed to clear this up for me. It seems like you could reverse the implications. How do I know that it is $P {\implies}Q$ instead of $Q {\implies}P$?

3

There are 3 best solutions below

8
On

This is, as Element118 has said, due to the difference between "if" and "only if" which is annoying to wrap your head around at first, but makes sense once you get it. The point is that the sentences

if $P$ then $Q$

and

$P$ only if $Q$

are two ways of representing the same thing. They both can be expressed as

$P\implies Q$

so it's really just a subtlety of the language used. If I misunderstood and that's not where your problem lies, just let me know and I'll update this answer

2
On

If "you can access the internet from the campus only if you are a computer science major or a freshman" is a true sentence then also the following sentence is true: "you can access the internet from the campus only if you are a computer science major".

You are dealing with necessary conditions. They do not have to be sufficient.

However, in daily language mostly all necessary conditions are mentioned (or are supposed to be mentioned).

That makes the "bundle of conditions" sufficient after all.

The fact that we tend to expect that is the source of confusion.

1
On

Your actual confusion is not over the direction of implication, but due to ‘unless’ and ‘only if’ being particularly tricky to translate, which is in turn because the colloquial meaning of each tends to be loose.

For the following points, please note that $$\big(A → B\big)\equiv\big((\text{not }A) ∨ B\big)\equiv\big((\text{not }B) \to (\text{not }A)\big).$$


  1. Strictly speaking, ‘$P$ unless $Q$’, ‘$P$ if not $Q$’ and ‘$P$ or $Q$’ all have the same literal meaning. In particular, satisfying condition $Q$ technically does not preclude $P$ from nonetheless holding (for example, the directive “don't compliment unless you mean it” does not suggest that one should offer a compliment whenever one means it).

    Side note: ‘$P$ unless $Q$’ in practice frequently additionally connotes/implicates ‘not $P$ if $Q$’, in which case ‘$P$ unless $Q$’ means ‘(not $P$) if and only if $Q$’, that is, ‘$P$ or $Q$ but not both’, in other words, ‘$P$ exclusive-or $Q$’.

    Summing up:

    • $P$ unless $Q$’ literally means P ∨ Q, though it is frequently meant to convey P exclusive-or Q.
  2. In the absence of an appropriately-placed comma that would have disambiguated the statement, we instead rely on real-world context and interpret

      You cannot ride the roller coaster if you are under $4$ feet tall unless you are older than $16$ years old

    as

      (You cannot ride the roller coaster if you are under $4$ feet tall) unless you are older than $16$ years old
      (You cannot ride the roller coaster if you are under $4$ feet tall) if you are not older than $16$ years old

    that is, $$\text{Age}\leq16 \;→\; \big(\text{Height}<4 \;→\; \text{Can't Ride}\big)\\ \text{Age}>16 \;∨\; \big(\text{Height}\geq4 \;∨\; \text{Can't Ride}\big)\\ \big(\text{Height}<4 \;\land\; \text{Age}\le16 \big) \;→\; \text{Can't Ride},$$ as required.


  1. While it is tempting to interpret $P$ only if $Q$ as ‘$P$ if $Q;$ otherwise, not $P$’ (i.e., ‘$P$ if and only if $Q$’), it technically just means P ⟹ Q (where satisfying condition $Q$ does not guarantee that $P$ holds).

  2. We disambiguate

      You can access the Internet from campus only if you are a computer science major or you are not a freshman

    as

      You can access the Internet from campus only if (you are a computer science major or you are not a freshman)
      If you can access the Internet from campus, then (you are a computer science major or you are not a freshman),

    that is, $$\text{Can Internet} \;→\; \big(\text{Is CS Major} \;∨\; \text{Isn't Freshman}\big),$$ as required.