# Trouble with "only if"

This is from pg. 45 of Discrete Mathematics with Applications by Epp:

I'm having trouble understanding the last sentence. If we say that $p$ is John breaking the world's record and $q$ is John running the mile in under four minutes, doesn't $q \Longrightarrow p$ say that if John runs the mile under four minutes, he will break the world record? It seems like she meant to say that "His time could be over four minutes and still break the record." regarding the case where $p$ is true and $q$ is false.

• This is about necessary but insufficient condition. $p$: Natural number $a$ is prime. $q$: $a=2$ or $a$ is odd. In this case "$p$ only if $q$" is true, but "$p$ if $q$" is not true. In your case: maybe the current record is 3 minutes. Then claim "John will break the record only if it will run faster than 4 minutes" is correct. But this is insufficient condition. That's why claim "John will break the record if it will run faster than 4 minutes" is not correct. Mar 16 at 15:06
• Because oddly enough, the word "only" actually has some semantic meaning and is not just some kind of filler word like "um". Have you ever heard someone say "if and only if"? Did you think they just meant "if and if"? Mar 17 at 3:02
• @DavidK No but now I'm wondering why they couldn't just say "only if"... why the extra two words added at the beginning? Mar 17 at 5:20
• Again, because "if" is different from "only if". Mar 17 at 11:45

Perhaps John's sub four minute mile doesn't break the record because there was a tailwind, or because he tested positive for drugs, or because the actual record is in fact 3 minutes 47 seconds. He still covered the distance in four minutes but did not break the record.

The four minute finishing time is a necessary condition for breaking the record. If he was slower, then of course the record is unbroken. But it is not sufficient.

• Or the record is actually at 3’55’’ but you still need to be under 4’ if you want to beat it. Mar 16 at 14:44
• @Mindlack Indeed. But the OP is asking about the logic, not whether John was faster than Roger Bannister's most recent successor. But I will edit my answer to take this into account. Mar 16 at 14:47
• The text explicitly says that being under 4 minutes might still not be fast enough. Mar 16 at 14:49
• @Ethan Bolker: I was thinking in terms of logic. My suggestion is still imo an important (and common) possibility. You replace a more complicated condition with a weaker, simpler one – and you have to check that one first. Mar 16 at 14:49
• @Mindlack Ha. For a second I was wondering why you had to be under 4 feet tall to beat a slightly slower record and was wondering if there was a separate category for kids or something... Mar 17 at 5:22

As counter intuitive as it may seem but "$$p$$ only if $$q$$" actually is represented as $$p \rightarrow q$$. Hear me out !

"$$p$$ only if $$q$$" means that $$q$$ is necessary for $$p$$ i.e. it is necessary for john to run under 4 minutes to break the world record. But it is not sufficient.

"$$p$$ if $$q$$" on the other hand means that $$q$$ is sufficient for $$p$$ to happen, in logic represented as $$q \rightarrow p$$, which would be true if the present world record holder had a timing of more than 4 minutes, in that case it is sufficient for john to run under 4 minutes to break the world record. But notice that it is not necessary. Because the world record could be 5 minutes.

1. $$A$$ if $$B$$” means “$$B$$ implies $$A$$”.

2. On the other hand, “$$A$$ only if $$B$$” generally means “$$A$$ implies $$B$$”.

$$A$$ only if $$B$$” generally does not mean “$$A$$ if $$B;$$ otherwise, not $$A$$”.

3. It is “$$A$$ if only if $$B$$” that actually means “$$A$$ if $$B;$$ otherwise, not $$A$$”.

$P=$ John will break the world's record

$Q=$ he runs the mile in under four minutes

$Q$ is only a necessary condition, it could be that the world record is $3:30$, in which case if John does not run at least a $4$-minute mile, i.e he will not break the world record. This written formally is $\neg Q \implies \neg P$ or $P \implies Q$ where $P$ may be false while $Q$ is true.

$Q$ is not a sufficient condition, in that if he runs $3:45$ he will satisfy $Q$, but may not satisfy $P$. So in this sense, $Q$ does not imply $P$.

Maybe a different example would be clearer. The statement "It's Pi day only if it's the 14th" is a true statement. However, just because it's the 14th doesn't mean it's Pi day: it could be the 14th of April, or of June, etc. So, "It's Pi day if it's the 14th" is false.

In your example, suppose that the world record mile run is actually 3 minutes. Then running a mile in under 4 minutes may still not be enough to break the world record; for example, you might run the mile in 3:30. But, if you want to break the world record, your time needs to be under 4 minutes (since it needs to be under 3 minutes!). Therefore, "John will break the world record only if his time is under 4 minutes" is a true statement.

In my opinion, this "only if" language is a bit confusing. You may prefer to think of "A only if B" as just being logically equivalent to "A implies B", or maybe "if A then B"; the latter two are generally less ambiguous sounding. In your example, it becomes "If John breaks the world record, then his time is under 4 minutes".

The statement ["$$p$$ if $$q$$"] is equivalent to saying that
$$q$$ implies $$p$$.

The statement ["$$p$$ if $$q$$ is false"] is equivalent to saying that it is not the case that $$q$$ implies $$p$$.

Here, you have to distinguish between the real world interpretation, and the interpretation of a logician.

In the real world, the statement ["$$p$$ if $$q$$ is false"] means that there is no compelling causative effect in the event $$q$$ which would force the event $$p$$ to also occur.

However, a logician sees it differently. To a logician, the only way that the statement ["$$p$$ if $$q$$"] is false is if the following equivalent statement is false : ["$$q$$ implies $$p$$"]. Further, to a logician, the only way that this staement can be false is if both of the following events occur:

• $$q$$
• Not $$p$$.

The statement ["$$p$$ only if $$q$$"] is similarly ambiguous. In the real world, this generally means that both of the following statements are true:

• If not $$q$$, then not $$p$$. This is equivalent to saying that $$p$$ implies $$q$$.
• If $$q$$ then $$p$$.

Therefore, in the real world, the statment is interpreted as $$p$$ if and only if $$q$$.

However, a logician would only interpret the statement to mean that $$p$$ implies $$q$$. The logician would not (also) interpret the statement as signifying that $$q$$ implies $$p$$.

So, look at the first sentence of the posted excerpt. As discussed:

• ["$$p$$ if $$q$$ is false"] may be construed to signify that $$q$$ does not imply $$p$$.
• ["$$p$$ only if $$q$$"] may be construed to signify that $$p$$ implies $$q$$.

The two construances above are not contradictory. That is, in general, you can have two statements $$p$$ and $$q$$ such that $$p$$ implies $$q$$ but $$q$$ does not imply $$p$$.

• Hmm I see what you're getting at, but I would tend to interpret "P only if Q" in the real world as "Q is a necessity for P" rather than as "Q is necessary and sufficient for P", though I guess approach to this might vary.
– DRF
Mar 17 at 8:42
• I think saying "$p$ if $q$ is false" is ambiguous, it can mean either $\lnot(q\to p)$ or $(\lnot q)\to p$. Mar 17 at 12:27
• @MarcvanLeeuwen In hindsight, I agree with you. However, the original posting indicated: "p if q" is false, which would seem to preclude your 2nd interpretation. Then, it becomes my fault for taking literary license to interpret this as "p if q is false" for the sake of a smooth exposition. Mar 17 at 14:22

$$p \ \text{only if} \ q$$ is the same as $p \implies q$.

$$p \ \text{if} \ q$$ is the same as $q \implies p$.

I think your mistake was that you thought $p \ \text{only if} \ q$ meant $q \implies p$.

• I second this as the probable confusion +1 Apr 28, 2016 at 20:19
• It doesn't seem "$p \ \text{only if} \ q$ is the same as $p \implies q$." That would mean, for example: "$\text{The sidewalk is wet} \ \text{only if} \ \text{it rains}$" is the same as "$\text{It rains} \implies \text{the sidewalk is wet}$.", which isn't true. It would seem "only if" = "iff". Feb 8, 2018 at 16:02
• No, the statement "The sidewalk is wet only if it rains" is equivalent to "The sidewalk is wet $\implies$ it rains". This is because the sidewalk is wet only when it rains, so the sidewalk can not be wet without rain. Thus, if the sidewalk is wet, then one knows it must have rained. Mar 28, 2018 at 0:29

"p if q" says that "q and not p" is impossible, while "p and q", "not p and not q" and "p and not q", may be possible.

"p only if q" says that "p and not q" is impossible, while "p and q", "not p and not q" and "q and not p" may be possible.

If "q and not p" is possible, but "p and not q" is impossible, then "p only if q" is true, but "p if q" is false.

The current world record (March 2022) for the mile seems to be $$3$$ minutes $$43.13$$ seconds.

Clearly if John's time is over four minutes he will not break the record. But he won't break the record automatically if he runs under four minutes - he actually has to beat the record.

Running under four minutes is (as Ethan Baker notes) a necessary condition, but it is not sufficient.

The word "only" is not equivalent to the double implication "if and only if" - it is a one-wy condition and not a two-way one.

In case any of this helps you to crystallise your thinking.

You will win the lottery only if you buy a ticket. This is true, but does not mean that everybody who buys a ticket will win.

I think the wording, while not outright wrong, is at least sub-optimal. I'd turn

Note that it is possible for "p only if q" to be true at the same time that "p if q" is false. For instance, to say that John will break the world's record only if he runs the mile in under four minutes does not mean that John will break the world's record if he runs the mile in under four minutes. His time could be under four minutes but still not be fast enough to break the record.

into

Note that it is possible for "p only if q" to be true at the same time that "p if q" is false. For instance, to say that John can break the world's record only if he runs the mile in under four minutes does not mean that John will break the world's record if he runs the mile in under four minutes. His time could be under four minutes but still not be fast enough to break the record.

• Your rephrasing makes the sentence easier to understand, but ironically obscures the logic-lesson point: that the completion time being under 4 minutes is merely a necessary condition for John to break the record (based on the intended meaning, the original phrasing wasn't wrong). Mar 17 at 12:55
• @ryang It either obscures or emphasizes the logic-lesson point, whichever way you wanna see it.
– MaxD
Mar 18 at 13:05

Your basic confusion is because you are interpreting the statement like this: "John will break the world's record if he ONLY runs the mile in under four minutes."

First of all, you should find the use of the phrase 'only if' odd in normal use of the English language. How often do we hear things like 'I'll pass the test only if I study well'?

This should let you then look at the phrase 'only if' as a special logic operator that may not mean much in the normal English.

So what does p 'only if' q mean? It means that for it to be true, it has to be that whenever q is true, p is also true. So it basically is like this: q has happened so p must have happened. It cannot be that q happened but p did not happen. Particularly, it is false when p is false and q is true, otherwise, remains true.

In our context, if we say that John will break the world's record ONLY IF he runs the mile in under four minutes and John then does run under four minutes then we do not know if that was enough to break the world's record. We know only that if he had broken the world record then he had run the mile under less than four minutes. Otherwise, maybe he ran under three minutes while Tracy ran under two minutes and broke the record before him. Or before he could have broken the record, he suddenly woke up from his dream.