Skip to content

Lesson 5: If, only if, unless: necessary and sufficient conditions (intermediate, 15 min)

“If”, “only if”, “if and only if” and “unless” each translate to an implication that points a particular way. This intermediate lesson, about fifteen minutes, uses a boarding rule and an alarm to make the four translations stick.

Level: intermediate15 min14 claims in this lesson were confirmed by the exact checker at build time

Translate “if”, “only if”, “if and only if”, and “unless” into implications that point the right way, and never assume the converse.

The first step reads ticket -> board as “if you have a ticket, you may board”, FALSE in exactly one situation, and shows it equivalent to NOT ticket OR board. The second step contrasts “if” with “only if”: ticket -> board makes the ticket sufficient, board -> ticket makes it necessary, and the two differ on two rows. The third step states both directions at once, board <-> ticket, and proves it equal to the conjunction of the two implications. The fourth translates “the alarm rings unless it is disarmed” as NOT disarmed -> rings, equivalent to disarmed OR rings.

Every equivalence in the lesson is a verified claim, re-checked by the engine at build time. The exercises run an argument through the validity checker, ask for the formula of “you may board only if you have a ticket”, hunt for a situation that respects “if” but breaks “only if”, and predict the alarm's value from the “unless” formula.

This is the lesson most useful to analysts and lawyers, because requirements are written in exactly these words. The pitfall pages on the converse and on necessary versus sufficient conditions are the short form, and the comparison of implication and biconditional sets the three formulas on one table.

Do this lesson interactively in the app

Steps

1. `->` means “if … then”

ticket -> board claims: if you have a ticket, then you may board. It is FALSE in exactly one situation: a ticket but no boarding. It is equivalent to NOT ticket OR board.

Without a ticket the claim is never broken, whatever happens: the rule simply says nothing about that case.

claim := ticket -> board · outputsame := NOT ticket OR board · output

ticket: the person has a ticket; board: the person may board;

`->` means “if … then”
#ticketboardclaimsame
0FALSEFALSETRUETRUE
1FALSETRUETRUETRUE
2TRUEFALSEFALSEFALSE
3TRUETRUETRUETRUE

Find the only assignment that makes claim FALSE.

equivalent claim / same · holds

2. “If” versus “only if”

“You may board if you have a ticket” makes the ticket sufficient: ticket -> board.

“You may board only if you have a ticket” makes the ticket necessary: board -> ticket. Without a ticket there is no boarding, but a ticket alone does not guarantee boarding (a passport check might still fail).

Each is the converse of the other, and they are not equivalent.

if_rule := ticket -> board · outputonly_if_rule := board -> ticket · output

ticket: the person has a ticket; board: the person may board;

“If” versus “only if”
#ticketboardif_ruleonly_if_rule
0FALSEFALSETRUETRUE
1FALSETRUETRUEFALSE
2TRUEFALSEFALSETRUE
3TRUETRUETRUETRUE

Set ticket=FALSE, board=TRUE: if_rule holds, but only_if_rule is broken.

not-equivalent if_rule / only_if_rule · holds

3. “If and only if”: both directions

“You may board if and only if you have a ticket” states both directions at once: board <-> ticket, which is equivalent to (ticket -> board) AND (board -> ticket).

Now the ticket is necessary and sufficient: whenever the rule holds, the two inputs have the same value.

both_ways := (ticket -> board) AND (board -> ticket) · outputiff_rule := board <-> ticket · output

ticket: the person has a ticket; board: the person may board;

“If and only if”: both directions
#ticketboardboth_waysiff_rule
0FALSEFALSETRUETRUE
1FALSETRUEFALSEFALSE
2TRUEFALSEFALSEFALSE
3TRUETRUETRUETRUE

Compare both_ways with iff_rule: the checker proves them equivalent.

equivalent both_ways / iff_rule · holds

4. “Unless” means “if not”

“The alarm rings unless it is disarmed” says: if it is not disarmed, it rings: NOT disarmed -> rings, which is equivalent to disarmed OR rings.

It says nothing about what happens when the alarm is disarmed. Reading “unless” as “exactly when not” adds a second rule (disarmed -> NOT rings) that the sentence does not state. If you mean that too, write it explicitly or confirm it as an assumption.

claim := NOT disarmed -> rings · outputsame := disarmed OR rings · output

disarmed: the alarm is disarmed; rings: the alarm rings;

“Unless” means “if not”
#disarmedringsclaimsame
0FALSEFALSEFALSEFALSE
1FALSETRUETRUETRUE
2TRUEFALSETRUETRUE
3TRUETRUETRUETRUE

Set disarmed=TRUE, rings=TRUE: the claim still holds.

equivalent claim / same · holds

Exercises

  1. Premises: “You may board only if you have a ticket” (board -> ticket) and “You have a ticket” (ticket). Conclusion: board. Is the argument valid? (argument-validity)
  2. Write “You may board only if you have a ticket” as a formula over board and ticket. (write-equivalent)
  3. Find a situation that respects the “if” rule but breaks the “only if” rule. (find-assignment)
  4. “The alarm rings unless it is disarmed” is modelled as claim := NOT disarmed -> rings. The alarm is disarmed and rings anyway. Is claim TRUE or FALSE? (predict-output)

Do this lesson interactively in the app

Questions

Why is ticket -> board TRUE when there is no ticket?

Because the rule promised nothing about that case. An implication is broken only by its antecedent holding and its consequent failing, and the first step's table shows that single FALSE row.

Is “unless” an AND or an OR?

As a claim, “A unless B” is NOT B -> A, which is B OR A. As an admission rule, the cases that pass are A AND NOT B. The lesson's fourth step covers the claim; the pitfall page on “unless” covers the rule.

Related

Guides

Laws

Tools

Practice

See also

Lessons

Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.