5

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$?

ryang
  • 38,879
  • 14
  • 81
  • 179
J. Doe
  • 51
  • 5
    I think it is due to the difference between "only if" and "if". – Element118 Oct 11 '15 at 06:20
  • 1
    Suppose there are 500 computer science majors who are not freshmen but only 1 of them is allowed to access the Internet from campus.Your first example is still a true sentence.For another example :A football team won the Super Bowl only if it made the playoffs. – DanielWainfleet Oct 11 '15 at 06:39
  • "if $A$, then $B$" and "$A$ only if $B$" are both sybolized with $A \to B$. See this post. – Mauro ALLEGRANZA Oct 11 '15 at 08:12
  • Set $P$: "You can access the Internet from campus", $Q$: "you are a computer science major", and $R$: "you are a freshman". The statement "You can access the Internet from campus only if you are a computer science major or you are not a freshman." could be read as $(P\implies Q)\lor\lnot R$ or it could be read as $P\implies(Q\lor\lnot R)$. However, since $S\implies T$ is equivalent to $\lnot S\lor T$, the first interpretation is $(\lnot P\lor Q)\lor\lnot R$, and the second interpretation is equivalent to $\lnot P\lor(Q\lor\lnot R)$. These are equivalent since $\lor$ associates with itself. – robjohn Mar 30 '22 at 13:16
  • There is a helpful mnemonic for remembering the relative position of sufficient and necessary condititions, but it requires you understand that the horseshoe $\supset$ is sometimes used in place of the arrow $\to$. With that being said, the mnemonic is SUN. If you rotate the "U," then you have S $\supset$ N, where the "S" and "U" denote the relative positions of sufficient and necessary conditions, respectively. – RyRy the Fly Guy Sep 08 '23 at 15:34

3 Answers3

3

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.

MJD
  • 65,394
  • 39
  • 298
  • 580
drhab
  • 151,093
  • So if we are dealing with necessary conditions, they go on the right side of the implication? It seems like in the roller coaster example those are also necessary conditions. – J. Doe Oct 11 '15 at 15:58
  • In short: if $p\implies q$ then $q$ is a necessary condition for $p$ ( $p$ can only be true if also $q$ is true) and conversely $p$ is a sufficient condition for $q$ (if $p$ is true then that is sufficient for $q$ to be true). – drhab Oct 11 '15 at 16:13
2

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.

ryang
  • 38,879
  • 14
  • 81
  • 179
1

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

Alex Mathers
  • 18,509
  • Wouldn't the second one end up being (not s) -> (r -> not q) ? Because of the placement of that "unless"? – Wildcard Oct 11 '15 at 06:31
  • Not quite. If Q is true and P is false, the "if P then Q" is true but "Q only if P" is no longer true. – fleablood Oct 11 '15 at 06:31
  • @fleablood can you direct me to a source for this? I wasn't aware at all of that, and now I'm questioning my own understanding of basic logic – Alex Mathers Oct 11 '15 at 06:33
  • @fleablood I just realized I had mistyped in my answer. Does it look right now? – Alex Mathers Oct 11 '15 at 06:34
  • Q only if P means "if not Q then not P", I think. – fleablood Oct 11 '15 at 06:34
  • P true, Q true: P => Q true: P true, Q false: P=>Q false. P false, Q true: P=>Q true: P false, Q false: P=>Q true. BUT P true Q true, Q only if P true; P true Q false; Q only if P true; P false Q true, Q only if P false; P false Q false, Q only if P, true. Very different. P=>Q is only false if P and not Q. Q only if P is only false if Q and not P. – fleablood Oct 11 '15 at 06:43
  • Hmm. It's late and I'm prone to errors but... P => Q is only false when Q isn't true but P is so P=>Q means whenever P is true Q also has to be true. P only if Q means whenever P is true Q is also true. Yes, those seem the same. If P isn't true both statements are true by default. But it's late and I'm prone to errors. – fleablood Oct 11 '15 at 06:50
  • @mathers101 I updated my question. I don't think my problem is because of the "only if" in this case (or maybe it is and I am misunderstanding). – J. Doe Oct 11 '15 at 15:38