01 · Opening Scenario: A Door That Stayed Closed
A campus access policy says: “If a card is valid, the door opens.” You observe that the door did not open. Can you conclude that the card was not valid?
Predict first. Under the stated logical rule, yes: if a valid card always leads to an open door, a closed door rules out a valid card. The two sentences “valid card → door opens” and “door closed → card invalid” make the same claim about allowed combinations. But if the real door could jam, the policy may not describe its actual behavior. Logic tells us what follows from the assumptions, not whether the assumptions are true of every physical event.
Reasoning Lens · questions for a short proof
- Assume: What facts or general rule are we allowed to use?
- Claim: What exactly must be established?
- Justify: Why does each step follow?
- Scope: Does the argument cover every case in the stated domain?
- Limit: Which assumptions would need checking in a real system?
Valid card → open door
Door did not open
Card not valid, under the rule
02 · Learning Objectives and Three-Hour Class Guide
By the end of Week 3, you should be able to:
- Distinguish an assumption, a claim, and a justified step in a short argument.
- Use a truth table to test whether two statements are logically equivalent.
- Recognize that P → Q and ¬Q → ¬P are equivalent, while the converse Q → P need not be.
- Write a short direct proof and a short proof by contraposition about even or odd integers.
- Explain the idea of proof by contradiction, and use a counterexample to disprove an “every” claim.
Class schedule (180 minutes): 25 minutes for reasoning; 40 for direct proof; 35 for equivalence and truth tables; 35 for contraposition; 30 for contradiction; 15 for feedback and an exit check.
Classroom essentials Sections 01–10, one proof strip, and the exit check. Self-study Extra practice and the optional Colab check. The workshop and proof-strip discussion are ungraded; a brief written proof assignment is the formal assessment.
03 · What Counts as a Mathematical Argument?
A mathematical argument begins with assumptions and reaches a claim through justified steps. A proof explains why the claim holds for every case covered by the assumptions. A correct example may help us discover a pattern, but it cannot by itself establish a universal claim.
From a rule to a general statement
Familiar: “If I submit before the deadline, the portal accepts my work” is a rule; one accepted submission does not prove the rule always works. System: Four successful test accounts provide useful evidence about software, but not a proof of a policy for every account. Mathematics: “For every even integer n, n² is even” requires an argument for arbitrary n, not a list such as 2²=4 and 4²=16.
04 · When Do Two Logical Statements Mean the Same Thing?
Let P mean “the card is valid” and Q mean “the door opens.” Two compound statements are logically equivalent when their truth values agree for every possible assignment to P and Q. We write A ≡ B. This is a statement about truth values across all cases, not merely similar sounding words.
The expression on the right is the contrapositive: reverse the direction and negate both parts. In the door scenario, it says, “If the door does not open, the card is not valid.” The rule Q → P is the converse: “If the door opens, the card is valid.” A staff override might open the door, so the converse is a different claim.
05 · A Truth Table Tests Equivalence
List the four possible pairs of truth values for P,Q. For an implication A → B, the only false case is A=T, B=F. Compare the completed columns:
| P | Q | ¬P | ¬Q | P → Q | ¬Q → ¬P | Q → P |
|---|---|---|---|---|---|---|
| T | T | F | F | T | T | T |
| T | F | F | T | F | F | T |
| F | T | T | F | T | T | F |
| F | F | T | T | T | T | T |
The P → Q and ¬Q → ¬P columns match in all four rows. The converse differs when P=F,Q=T: an open door does not prove a valid card.
Here P → Q=T because P is false. Also ¬Q=F, so ¬Q → ¬P=T. But Q → P=F: it begins with a true open-door observation and incorrectly requires a valid card. This row disproves equivalence of the original and the converse.
Small extension: The inverse ¬P → ¬Q is also not generally equivalent to P → Q. The same P=F,Q=T row makes the inverse false. We will use the original and its contrapositive for this week's proofs.
06 · Direct Proof: Begin with the Assumption
A direct proof of P → Q assumes P and derives Q. For integers, an even number has the form 2k for some integer k; an odd number has the form 2k+1. Those definitions give us a useful first step.
If an integer is even, its square is even
- Let n be an arbitrary even integer. Then n=2k for some integer k.
- Square the expression: n²=(2k)²=4k²=2(2k²).
- Since 2k² is an integer, n² is twice an integer. Therefore n² is even.
The calculation is not a sample value: k can be any integer. That is why it proves the implication for every even integer.
07 · Proof by Contraposition
Sometimes the conclusion is hard to derive directly from the assumption. Since P → Q is equivalent to ¬Q → ¬P, we may prove the contrapositive instead. We must negate and reverse both parts, and we must say which statement we actually proved.
If n² is even, then n is even
Target: n² even → n even. Contrapositive: n odd → n² odd.
- Assume n is odd, so n=2k+1 for an integer k.
- Then n²=(2k+1)²=4k²+4k+1=2(2k²+2k)+1.
- The quantity 2k²+2k is an integer. Thus n² is odd. We proved the contrapositive, hence the original implication.
08 · Proof by Contradiction: Reach an Impossible Result
To prove a claim by contradiction, temporarily assume its opposite. If that assumption leads to something impossible while the mathematical definitions remain valid, the opposite assumption must be false. This week, a very short example is enough; long formal derivations are not needed.
Can there be a largest even integer?
- Suppose, for contradiction, that L is the largest even integer.
- Because L is even, L+2 is also even. But L+2>L.
- This contradicts “largest.” Therefore there is no largest even integer.
The conflicting statements are explicit: “L is largest” and “there is a larger even integer.” The argument applies no matter which even integer someone proposes as L.
09 · A Counterexample Can Disprove “Every”
To show “every object has property R” is false, find one object in the stated domain without R. This is a counterexample. By contrast, several agreeing examples do not prove a universal claim.
“Every even integer is divisible by 4”
The integer 2 is even but is not divisible by 4. This single example disproves the universal claim. Checking 4,8,12 would support a guess but would not prove it for every even integer.
A logical truth-table row can also be a counterexample: P=F,Q=T makes P → Q true but Q → P false, disproving the claim that the two formulas are equivalent.
10 · Equivalence Workshop: Predict → Test → Explain
Ungraded interaction Predict the three rule values for each input pair. Toggle the two observations to test your prediction. Then explain which two expressions always match, and find a row that separates the converse.
Compare three rules in a single case
Try all four cases. A single row of disagreement disproves equivalence.
Paper Equivalence Workshop
Predict: Complete the blank columns without looking at Section 05. Test: Compare them to that table. Explain: Which columns match in all four rows? Which row separates the converse?
| P | Q | P → Q | ¬Q → ¬P | Q → P |
|---|---|---|---|---|
| T | T | ____ | ____ | ____ |
| T | F | ____ | ____ | ____ |
| F | T | ____ | ____ | ____ |
| F | F | ____ | ____ | ____ |
One claim · one counterexample
“Every even integer is divisible by 4.” Which response settles the claim?
11 · What This Means for a Computing System
Suppose a written policy says P → Q: a valid card must open the door. A program that treats Q → P as the same policy might accept a green/open indication as proof of a valid card, even though an override could produce that indication. A truth table can expose this change of direction before the rule is implemented.
Proof is useful for checking a logical specification. Testing is still needed to see whether software and physical devices behave as specified. Neither a small set of successful tests nor a mathematical argument about an inaccurate rule guarantees a reliable real system.
12 · Optional Google Colab Check
Self-study / optional Complete the hand truth table first. Week 1 introduced Boolean values and not/or. In Python, P → Q can be checked with (not p) or q. Set one pair of input values, predict the outputs, then run the cell. No loops or new packages are needed.
Predict → Test → Explain one row
Start with P=F,Q=T. Predict original, contrapositive, and converse before running:
p = False
q = True
original = (not p) or q
contrapositive = q or (not p) # (not (not q)) or (not p)
converse = (not q) or p
print(original, contrapositive, converse)Expected output: True True False. The contrapositive expression simplifies to q or (not p). For a second row, change only p and q; explain what the output means in terms of the rule. Python checks chosen rows, while the complete truth table establishes equivalence for all four possible rows.
13 · Practice and Brief Written Assessment
Answer 1–4 as classroom practice. Questions 5–6 extend the chapter. The instructor may collect a short proof from Question 3 or 4 as a formal assignment; the workshop remains ungraded.
- Let P mean “a request is authenticated” and Q mean “it is accepted.” Translate P → Q, its contrapositive, and its converse in words. Which two are equivalent?
- Fill the row P=F,Q=T for P → Q, ¬Q → ¬P, and Q → P. What does this row prove?
- Prove directly: If n is an even integer, then n+6 is even.
- Use contraposition: If n² is odd, then n is odd. State the contrapositive first, then use a result from Section 06.
- Explain in two or three steps why there is no largest multiple of 5. Make the contradictory assumption explicit.
- Disprove “every odd integer is prime” by one counterexample. Explain why three prime examples would not prove it.
Proof planning space: Assumption: ____________________ Definition or rule: ____________________
Conclusion and justification: __________________________________________
14 · Common Mistakes
| Misstep | Correction |
|---|---|
| Several examples establish “for every.” | Examples suggest a claim; a proof must cover every case. One counterexample can refute it. |
| Switch P → Q to Q → P. | That is the converse. Test a separating truth-table row before treating it as equivalent. |
| Negate only one side for a contrapositive. | Reverse and negate both: ¬Q → ¬P. |
| Call a calculation a proof without explaining its integer form. | Show that n²=2m with an explicitly integer m. |
| In a contradiction argument, never identify the conflict. | Name the original assumption and the incompatible derived statement. |
| Treat a valid derivation as proof that a sensor works. | Logic is conditional on the stated facts and model. |
15 · Summary
Equivalent formulas agree in every truth-table row. An implication and its contrapositive are equivalent; its converse need not be. A direct proof starts from the assumption and derives the claim. A contrapositive proof proves an equivalent statement. A contradiction proof assumes the opposite and reaches an impossibility. A counterexample disproves a universal claim, while a few successful examples cannot prove it.
16 · Concept Map
17 · Key Terms
| Term | Working meaning |
|---|---|
| Logical equivalence | Two expressions agree in truth value for every assignment. |
| Contrapositive | ¬Q → ¬P for P → Q; logically equivalent. |
| Converse | Q → P; a different statement unless separately established. |
| Direct proof | Assume the premise; justify the conclusion. |
| Contradiction | Assume the opposite and derive an impossibility. |
| Counterexample | One object in the domain that disproves a universal claim. |
18 · What Comes Next
Week 4 will introduce mathematical induction: a method for proving a statement across a sequence of positive integers. The distinction between checking a few cases and proving every case will matter again. For now, write one sentence explaining which proof method you found clearest and why.
Selected Solutions and Explanations
Equivalence Workshop: In row order TT,TF,FT,FF, both P → Q and ¬Q → ¬P are T,F,T,T; the converse is T,T,F,T. Row FT separates the original from its converse. The counterexample to “every even integer is divisible by 4” is 2.
Proof strip: “Let n be arbitrary even” → “n=2k for integer k” → “n²=2(2k²)” → “n² is even.”
Practice 1–2: The contrapositive is “not accepted → not authenticated”; the converse is “accepted → authenticated.” The original and contrapositive are equivalent. For P=F,Q=T, the values are T,T,F; this one row disproves equivalence to the converse.
Practice 3: Let n=2k for an integer k. Then n+6=2(k+3), and k+3 is an integer; so n+6 is even. Practice 4: The contrapositive is “if n is even, then n² is even.” Section 06 proves this, so the original “n² odd → n odd” follows.
Practice 5: Assume L is the largest multiple of 5. Then L+5 is also a multiple of 5 and exceeds L, a contradiction. Practice 6: 9 is odd but not prime because 9=3·3. Positive examples such as 3,5,7 cannot cover all odd integers.