Try the code and the simulations beside the lesson.
What you will be able to do
give the truth value of an if-then statement and an if-and-only-if statement;
read the many ways of saying "if p then q";
write the negation of a conditional correctly.
When is a promise broken?
A parent says: "If you finish your homework, you can go to the park." Think of four evenings.
You finish the homework and you go to the park. The promise is kept.
You finish the homework and you are not allowed to go. The promise is broken.
You do not finish, and you still go. The promise said nothing about this case. It is not broken.
You do not finish, and you do not go. Not broken either.
Only one evening breaks the promise. That is exactly how logic treats "if ... then".
The conditional
For statements p and q, "if p then q" is the conditional, written p⇒q. Here p is the hypothesis (or antecedent) and q is the conclusion (or consequent).
p⇒q is false only when p is true and q is false.
p, q
p⇒q
∼p∨q
T, T
T
T
T, F
F
F
F, T
T
T
F, F
T
T
The last column agrees in every row. So
p⇒q≡∼p∨q.
When p is false, the conditional is true whatever q is. People say it is vacuously true. "If 2+2=5, then the Moon is made of glass" is a true statement.
Many exam papers and university books write p→q for the same thing. NCERT and IB use ⇒.
Many ways to say "if p then q"
All of these mean p⇒q:
if p, then q;
p implies q;
q if p;
p only if q;
p is sufficient for q;
q is necessary for p;
q whenever p.
"Only if" is the one that trips people up. "You may board only if you have a ticket" says: boarding needs a ticket. So "you board ⇒ you have a ticket". It does not promise that a ticket gets you on board.
"Unless" means "if not". "The match is played unless it rains" says ∼r⇒p, where r is "it rains" and p is "the match is played". That is equivalent to p∨r.
The negation of a conditional
When is "if you finish, you go to the park" false? Only on evening 2: you finish, and you do not go. So
∼(p⇒q)≡p∧∼q.
The negation of an if-then is an "and", not another if-then. A common wrong answer is "if you finish, you do not go". Check it on evening 4. Both the promise and that sentence are true there. A negation cannot agree with its statement, so that answer is wrong.
The biconditional
"A triangle is equilateral if and only if its three angles are equal." This says two things: equilateral implies equal angles, and equal angles imply equilateral.
The biconditionalp⇔q means (p⇒q)∧(q⇒p). It is true when p and q have the same truth value.
p, q
p⇔q
T, T
T
T, F
F
F, T
F
F, F
T
Other ways to say it: "p is necessary and sufficient for q", "p iff q". Its negation is true when exactly one part is true:
∼(p⇔q)≡p⇔∼q.
That is the exclusive or of the last course.
Practise with new numbers
Try it in Python
Python has no symbol for "implies", so the program writes it as (not p) or q. It prints the table of p⇒q and of p⇔q, and checks that the negation of p⇒q is p∧∼q.
Common mistakes
Thinking a false hypothesis makes the conditional false. It makes it true.
Reversing "only if". "p only if q" is p⇒q, not q⇒p.
Negating an if-then with an if-then. The negation of p⇒q is p∧∼q.
Treating "if" as "if and only if". A conditional says nothing about the case when the hypothesis fails.
Remember these
p⇒q is false only for p T and q F.
p⇒q≡∼p∨q and ∼(p⇒q)≡p∧∼q.
"p only if q" and "q is necessary for p" both mean p⇒q.
p⇔q is true when p and q agree.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Give the truth value of "If 3 is even, then 3 is greater than 10".
Write "A number is divisible by 4 only if it is even" in if-then form.
Write the negation of "If the shop is open, then the lights are on".
Is "x2=4 if and only if x=2" true for real numbers x?
Rewrite "The road is closed unless the snow is cleared" as an if-then statement.
References
NCERT, Mathematics Textbook for Class XI (edition before 2023), Chapter 14, section 14.5.
OpenStax, Contemporary Mathematics, Chapter 2, section on the conditional and biconditional.
Enroll free in Conditionals, Contrapositives and Quantifiers
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.