Knaph

If, by Table10 of 243 min read

Only If, in Letters

A sign at the pool says: "You can swim only if a lifeguard is there." Another says: "You can swim if a lifeguard is there." One small word changes the arrow. Which way does it point?

If and only if are different

Key: P = A lifeguard is there. Q = You can swim.

"Q if P" means: if P, then Q. The word after if is the if part. So "You can swim if a lifeguard is there" is P → Q.

"Q only if P" means: Q cannot happen without P. If you swim, a lifeguard is there. So "You can swim only if a lifeguard is there" is Q → P.

Two signs at a swimming pool. The first says swim if a lifeguard is there, with the arrow from P to Q. The second says swim only if a lifeguard is there, with the arrow from Q to P.

Unless

"The match is cancelled unless it stops raining." Key: P = The match is cancelled. Q = It stops raining.

"P unless Q" means: if Q does not happen, then P. In letters, ¬Q → P. Check it by table.

PQ¬Q → PP ∨ Q
TTTT
TFTT
FTTT
FFFF

The two columns match in every row, so "P unless Q" says the same as P ∨ Q.

A truth table with columns P, Q, not Q arrow P, and P or Q. The last row is circled in amber. In that row both of the last two columns show a red F, and the other rows show a green T.

Needed and enough

Take the claim: if a shape is a square, it has four sides. That is P → Q, with P = It is a square and Q = It has four sides.

Being a square is enough for having four sides: it settles the matter. Having four sides is needed for being a square: a shape without four sides cannot be a square.

Every arrow P → Q says both things. P is enough for Q, and Q is needed for P. The arrow starts at the enough thing and ends at the needed thing.

Careful

"If" and "only if" are not twins. "You can swim if a lifeguard is there" does not say a lifeguard is needed. Only "only if" says that.

Try it at home

  1. Write one sentence with if and one with only if about something at home, such as stairs or a door.
  2. Give each a key, then write each as an arrow.
  3. Say which part is needed and which is enough.
  4. Swap the two parts of one arrow. Does the sentence still say the same thing?

Words to know

  • only if - the word after it is needed: Q only if P is Q → P
  • unless - P unless Q is ¬Q → P, the same as P ∨ Q
  • needed - you cannot do without it
  • enough - it settles the matter by itself

Big idea

"Q if P" is P → Q, and "Q only if P" is Q → P. "P unless Q" is ¬Q → P, the same as P ∨ Q.

Test your understanding

Sign in to test your understanding of this lesson and track your progress.