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.
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;
| # | ticket | board | claim | same |
|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | TRUE |
| 1 | FALSE | TRUE | TRUE | TRUE |
| 2 | TRUE | FALSE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE | TRUE |
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;
| # | ticket | board | if_rule | only_if_rule |
|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | TRUE |
| 1 | FALSE | TRUE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE | TRUE |
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;
| # | ticket | board | both_ways | iff_rule |
|---|---|---|---|---|
| 0 | FALSE | FALSE | TRUE | TRUE |
| 1 | FALSE | TRUE | FALSE | FALSE |
| 2 | TRUE | FALSE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE | TRUE |
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;
| # | disarmed | rings | claim | same |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE | TRUE |
| 3 | TRUE | TRUE | TRUE | TRUE |
Set disarmed=TRUE, rings=TRUE: the claim still holds.
equivalent claim / same · holds
Exercises
- 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) - Write “You may board only if you have a ticket” as a formula over
boardandticket. (write-equivalent) - Find a situation that respects the “if” rule but breaks the “only if” rule. (find-assignment)
- “The alarm rings unless it is disarmed” is modelled as
claim := NOT disarmed -> rings. The alarm is disarmed and rings anyway. IsclaimTRUE 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
- Implication elimination: A → B = NOT A OR B, and the →E rule
- Biconditional elimination: the A ↔ B rewrite and the ↔E rule
Tools
Practice
See also
- Implication (→, if–then): truth table and why a false antecedent makes it true
- Biconditional (↔, if and only if): truth table and examples
- Necessary vs sufficient: “only if” is not “if”
- A → B does not give B → A
- “Unless” in a rule: AND NOT, not OR
- Implication vs biconditional
- Implication elimination: A → B = NOT A OR B, and the →E rule
- Lesson 8: Arguments and validity (intermediate, 15 min)
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.