01 · Opening Scenario
You enter a campus study room. A lamp is controlled by a motion sensor. The posted rule says: “If motion is detected, the lamp turns on.” You walk in and see the lamp on. Can you conclude that motion was detected?
Pause before reading on. The lamp may have been switched on manually. Seeing the lamp on does not, by itself, tell us why it is on. But if the sensor detected motion and the posted rule is operating as stated, then the lamp must be on. This difference between a rule and what can be concluded from an observation is the start of mathematical reasoning.
Reasoning Lens · five questions to reuse all semester
- GIVEN: The posted rule says that detected motion requires the lamp to turn on; we observe the lamp on.
- DECIDE: Does the observation establish that motion occurred?
- REPRESENT: Let P mean motion was detected and Q mean the lamp is on. The rule is P → Q; the observation is Q.
- FOLLOWS: If P were also known, the rule would require Q. The observation is consistent with the rule.
- DOES NOT FOLLOW: We cannot infer P from Q alone. A manual switch is a possible alternative.
We will reuse these five questions for proofs, sets, counting, graphs, and trees.
02 · Why This Matters
Mathematical reasoning asks: What do we know? What follows from it? What remains uncertain? Many systems make decisions from explicit conditions: a gate opens when an authorized card is present, a reminder is sent when an appointment is due, or an application displays a warning when two conditions occur together. Logic lets us describe and inspect such conditions precisely.
Later in this course we will prove statements, count possible cases, and study networks. Each task depends on distinguishing a statement from a question, interpreting the word “if,” and checking every possible truth-value case. These are skills you can learn without previous computing experience.
03 · Learning Objectives
By the end of Week 1, you should be able to:
- Explain mathematical reasoning as drawing justified conclusions from stated information.
- Decide whether a sentence is a proposition, and explain why.
- Represent statements with letters such as P and Q.
- Interpret ¬P, P ∧ Q, P ∨ Q, and P → Q.
- Complete a two-proposition truth table and explain the false row of an implication.
- Compare a logical expression with a small Boolean experiment in Colab.
Three-hour class guide: about 50 minutes for the scenario, reasoning, and proposition sorting; 65 minutes for connectives and truth tables; 45 minutes for worked systems, activities, and a short Colab demonstration; 20 minutes for practice feedback and an exit check.
Core classroom material Opening scenario through the combined truth table, selected worked examples, the Logic Playground, and one Colab cell. Self-study / extension The three-input worked table, further practice, and the ungraded mini mission can be completed after class. Begin every experiment by predicting; test; then explain the result in words.
04 · Intuitive Introduction
Consider four sentences: (a) “The study room lamp is on.” (b) “Please turn on the lamp.” (c) “Is the lamp on?” (d) “The room has 27 chairs.” Sentences (a) and (d) can be true or false in a specified situation, even if we do not yet know which. Sentence (b) is a request; (c) is a question. A request and a question are not true or false in the required sense.
We can combine ordinary statements. If P means “motion is detected” and Q means “the lamp is on,” then “motion is detected and the lamp is on” needs both parts; “motion is detected or the lamp is on” needs at least one part. The conditional “if motion is detected, then the lamp is on” imposes a requirement only when motion is detected.
False proposition: “8 is an odd number” is a statement with a definite truth value, and that value is false. It is still a proposition. Non-proposition: “Please open the door” is a request; “Is the server active?” is a question. Neither asserts something true or false. Open statement: x > 5 depends on an unspecified x, so it has no definite truth value yet. Specifying x=7 would make a true proposition. Week 2 will develop statements with variables further.
05 · Mathematical Concepts
Reasoning from stated information
Begin by writing the rule and the observation separately. In the opening scenario the rule is P → Q. If we also know P, we may expect Q. If we know only Q, the rule does not tell us whether P occurred. In Week 2, we will use facts and rules to decide what conclusions actually follow; for now, focus on careful interpretation.
Four basic ways to combine propositions
The cards above are a preview. Work through each short journey below before using the full table in Section 07.
A · Negation: one claim, reversed truth value
Meaning and scenario: Let P be “the study room is occupied at noon.” Its negation says “the study room is not occupied at noon.”
Notation: ¬P. Keep the same time and meaning when negating; do not change “at noon” into “never.”
| P | ¬P |
|---|---|
| T | F |
| F | T |
Worked: If the room is occupied, P=T, hence ¬P=F. Misconception: Negation does not add a stronger claim about every day. Quick check: If P=F, what is ¬P? Predict, then
Reveal explanation
It is T: the original claim is false, so its negation is true.
B · Conjunction: both conditions must hold
Meaning and scenario: Access needs an authorized card A and opening hours H. The combined condition is A ∧ H.
Notation and worked case: With A=T and H=F, access conditions are not both met, so A ∧ H=F.
| A | H | A ∧ H |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
Misconception: One true input is not enough. Quick check: Card invalid but room open: can A ∧ H be true?
Reveal explanation
No. The conjunction is false because A is false.
C · Disjunction: at least one condition holds
Meaning and scenario: A message arrives by email E or SMS S. The goal “at least one succeeds” is E ∨ S.
Worked: If both arrive, E=T and S=T, the goal is still met: E ∨ S=T.
| E | S | E ∨ S |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
Misconception: Mathematical ∨ does not mean “exactly one.” Quick check: Both channels fail. What is E ∨ S?
Reveal explanation
False: neither channel succeeds.
D · Implication: a conditional promise
Imagine a clear promise: “If you submit the assignment by Friday, a confirmation will be sent.” Let P mean submitted by Friday and Q mean confirmation sent. The promise is P → Q. It is broken precisely when the student submits on time but receives no confirmation: P=T, Q=F.
If the student does not submit on time, the promise does not specify whether a confirmation can be sent for another reason. For this promise, either value of Q is consistent when P=F. This is why the two false-premise rows count as true for the conditional statement; they do not claim that the system actually sent anything.
| P | Q | P → Q | Promise status |
|---|---|---|---|
| T | T | T | Kept |
| T | F | F | Broken |
| F | T | T | No requirement on Q |
| F | F | T | No requirement on Q |
Misconception: Receiving a confirmation does not prove timely submission. That would require the converse, Q → P, a different rule. Quick check: Submission is late, confirmation is sent. Is the stated promise broken?
Reveal explanation
No. The original promise only commits to what happens after a timely submission.
When more than one connective appears, parentheses tell us what is grouped: (P ∧ Q) → R is a rule about both P and Q together. Do not silently change the grouping.
06 · Formal Definitions and Notation
A proposition is a declarative statement that, in a specified context, is either true or false. We may not know its truth value, but it still has one. The value of a compound proposition depends on the values of its components.
| Symbol | Name | When true | Plain-language reading |
|---|---|---|---|
| ¬P | Negation | When P is false | Not P |
| P ∧ Q | Conjunction | Both are true | P and Q |
| P ∨ Q | Inclusive disjunction | At least one is true | P or Q, possibly both |
| P → Q | Implication | Every case except P=T, Q=F | If P, then Q |
07 · Visual Explanation
Think of a truth table as a complete list of possible situations. With two propositions there are four input combinations. The columns below show how each connective behaves.
| P | Q | ¬P | P ∧ Q | P ∨ Q | P → Q |
|---|---|---|---|---|---|
| T | T | F | T | T | T |
| T | F | F | F | T | F |
| F | T | T | F | T | T |
| F | F | T | F | F | T |
08 · Step-by-Step Worked Examples
Is each sentence a proposition?
“7 is an odd number” has a truth value (true). “Please write 7” is a command and has no truth value. “The number x is odd” has an unspecified variable; its truth value depends on a chosen value of x, so it is not yet a proposition in this context. “The number 8 is odd” is a proposition (false).
Reasoning: The test is whether the sentence can be assigned a truth value, not whether we already know or like that value.
Is the lab open?
Understand: The timetable states, “The lab is open at 2 p.m. on Tuesday.” Represent: Call this proposition L; its negation is ¬L. Solve: If the timetable says the lab is closed at that time, then L=F and ¬L=T. Interpret: The lab could be open at other times. The negation says nothing about them.
Campus room access
Let A mean “the card is authorized” and B mean “the room is within opening hours.” The policy permits entry only if both conditions hold: A ∧ B.
- If the card is authorized (A=T) but the building is closed (B=F), then A ∧ B=F.
- If both are true, A ∧ B=T.
- “Not authorized” is ¬A; it is true exactly when A=F.
Interpretation: The notation makes the access rule testable in all four possible input cases.
Compare AND and OR: If either an authorized card or a staff override can admit a person, let S mean “staff override is active.” Then the alternative entry condition is A ∨ S; when both are true, the inclusive OR remains true. The two policies answer different questions.
Does a lamp rule work in every observed case?
Let P mean “sensor detected motion” and Q mean “lamp is on.” The rule is P → Q. Suppose a log has these four entries:
| Log | Motion P | Lamp Q | Rule P → Q | Reason |
|---|---|---|---|---|
| 1 | T | T | T | Required lamp state occurs. |
| 2 | T | F | F | Motion occurred, but lamp stayed off. |
| 3 | F | T | T | Manual switching is possible. This rule places no requirement on Q in this case. |
| 4 | F | F | T | This rule places no requirement on Q in this case. |
Reasoning: Check the premise first. If it is true, the conclusion must be true. This does not assert that a physically faulty lamp “makes the rule true”; the false row identifies a violation of the stated rule.
Converse check: Q → P would say that every time the lamp is on, motion was detected. Log 3, with Q=T, P=F, refutes that converse while satisfying the original rule. Our question is always what the given rule actually says.
When should a reminder appear?
Understand: “If an appointment is tomorrow and reminders are enabled, show a reminder.” Represent: A means appointment tomorrow; E means reminders enabled; R means reminder shown. The full rule is (A ∧ E) → R. Solve: For A=T, E=T, R=F, the premise A ∧ E=T, so the rule is false. Interpret: The system failed the stated requirement in that case. If E=F, the rule does not require a reminder.
Complete a three-input truth table
Let P mean “a request arrived,” Q mean “the device is connected,” and R mean “an acknowledgement was sent.” The rule is (P ∧ Q) → R. Understand: Both request and connection must occur before an acknowledgement is required. Represent: Calculate the parenthesized column first. Solve: Only when P=T, Q=T, R=F is the implication false.
| P | Q | R | P ∧ Q | (P ∧ Q) → R |
|---|---|---|---|---|
| T | T | T | T | T |
| T | T | F | T | F |
| T | F | T | F | T |
| T | F | F | F | T |
| F | T | T | F | T |
| F | T | F | F | T |
| F | F | T | F | T |
| F | F | F | F | T |
Interpret: The table checks the rule under all eight combinations. As a self-study test, cover the last two columns and fill them yourself.
09 · Real-System Scenario Examples
Scheduling two conditions
Let R mean “a classroom is free” and I mean “the instructor is free.” A meeting can proceed only if R ∧ I. If either condition fails, the combined condition is false. This illustrates why “and” is stricter than “or.”
Two ways to receive a message
Let E mean “email delivery succeeds” and S mean “SMS delivery succeeds.” “At least one channel succeeds” is E ∨ S. It remains true if both succeed. If a contract says “exactly one,” that is a different requirement.
A condition is not its converse
“If the alarm test button is pressed, a sound plays” is T → S. “If a sound plays, the test button was pressed” is S → T. An actual alarm can sound for other reasons, so the second statement need not follow from the first.
10 · AI/Computing Connection
A rule-based decision system evaluates clearly stated conditions. For example, “If the user has requested an accessible route and an accessible route exists, then display it” can be written using propositions about the request, availability, and display. Logic helps us inspect which combinations of input conditions a rule addresses and where information is missing.
This is one simple kind of decision logic, not a description of how every AI system works. Data-driven systems can also contain Boolean checks and stated policies, but a truth table does not by itself make a program intelligent or ensure that its inputs are accurate. In Week 2 we will ask whether conclusions actually follow from multiple rules and facts.
Authorized card A=T
Opening hours H=T
A ∧ H = T
Access allowed under this rule
This is a simple rule-based decision. Modern AI systems can use much more complex methods, while Boolean checks remain useful in software and decision systems around them. The rule still depends on accurate inputs and a clearly stated policy.
11 · Python / Google Colab Exploration
Mathematics first, Python second. Predict each result by hand. The table translates notation, not the meaning of the scenario.
| Mathematics | English | Python |
|---|---|---|
| T | True | True |
| F | False | False |
| ¬P | not P | not p |
| P ∧ Q | P and Q | p and q |
| P ∨ Q | P or Q, possibly both | p or q |
Open a blank Google Colab notebook. A cell is a space where you can enter code. Type the first block and press its Run button. The words True and False are Python’s Boolean truth values. print(...) displays a result; the parentheses enclose what to display. The signs = assign a value to a name. Here the names p and q stand for our propositions.
Experiment 1 · two Boolean values
Before running — predict: What two values should be displayed? Why?
p = True
q = False
print(p)
print(q)After running — explain: The first value says P is true and the second says Q is false. Change each value and rerun; describe the new mathematical situation.
Python writes logical conjunction as and, disjunction as or, and negation as not. Each line below is an independent experiment using the values already assigned.
Experiment 2 · compare connectives
Before running — predict: With p=True and q=False, which lines produce True? Work from the small truth tables first.
print(not p) # negation of p
print(p and q) # conjunction: both
print(p or q) # inclusive disjunction: at least oneAfter running — explain: The three outputs are False, False, True: P is true, so ¬P is false; Q is false, so AND fails; P is true, so OR succeeds. The text after # is a comment that Python ignores. Change q to True, predict again, and rerun.
For a first check of an implication, reuse known operations: P → Q has the same truth values as ¬P ∨ Q. This identity is used here to inspect a small table; its formal justification through logical equivalence comes in Week 3.
Experiment 3 · check the conditional
Before running — predict: For motion detected but lamp off, should the rule hold?
p = True
q = False
print((not p) or q)After running — explain: The output False matches the broken lamp promise. Try the other three assignments by changing only the first two lines. For each, predict first, rerun, then write why the stated rule holds or fails.
12 · Logic Playground and Interactive Activities
Practice / ungraded Try an answer, read the feedback, and revise it. Predict a result before touching a control; test it; then explain why. In the classroom, use cards and paper first, then compare with the screen.
Logic Playground · see four operations change together
Predict: With no motion but the lamp on, what is P → Q? Say why before using the switches.
Explain: Why is the conditional not false when there is no motion? Now predict what changes if you switch P to TRUE and Q to FALSE.
Paper Logic Playground · predict → test → explain
For each input pair, complete the four output columns. Circle the only case where the lamp rule is violated. Add one sentence explaining the row P=F, Q=T.
| P motion | Q lamp | ¬P | P ∧ Q | P ∨ Q | P → Q |
|---|---|---|---|---|---|
| T | T | ____ | ____ | ____ | ____ |
| T | F | ____ | ____ | ____ | ____ |
| F | T | ____ | ____ | ____ | ____ |
| F | F | ____ | ____ | ____ | ____ |
My prediction for P=F, Q=T: ______. My explanation: ____________________________________
Activity A · classify the sentence
Choose Proposition, Non-proposition, or Open statement. A false statement can still be a proposition.
Paper activity A · sort and explain
Mark each P (proposition), N (non-proposition), or O (open statement). Give a reason for one answer in each category.
| Sentence | P / N / O | Why? |
|---|---|---|
| 8 is an odd number. | _____ | ________________ |
| Please open the door. | _____ | ________________ |
| Is the server active? | _____ | ________________ |
| x > 5 (x unspecified). | _____ | ________________ |
Activity B · build a truth table
Choose T or F for each blank. Work from the values of P and Q; then check all rows. A blank cell counts as unanswered.
| P | Q | ¬P | P ∧ Q | P ∨ Q | P → Q |
|---|
Paper activity B · complete the conditional
Cover the worked table in Section 07. Fill the blank cells; explain in words why row 2 differs from rows 3 and 4.
| P | Q | ¬P | P ∧ Q | P → Q |
|---|---|---|---|---|
| T | T | F | ____ | ____ |
| T | F | F | ____ | ____ |
| F | T | ____ | F | ____ |
| F | F | ____ | F | ____ |
Explanation: ___________________________________________________________________
Activity C · test the lamp rule
Set the motion sensor and lamp, then check whether the observation satisfies the stated rule.
Paper activity C · scenario decision
Predict: A lamp is on although no motion occurred. Is the rule broken? ______. Check: Find P=F, Q=T in your table. Explain: Which input would actually break the rule? ______________________________
13 · Check Your Understanding
- Can a proposition be false? Give an example.
- When are P ∧ Q and P ∨ Q different?
- What is the only false case of P → Q?
- If the lamp is on, does P → Q alone prove that motion was detected?
Reveal concise answers
1. Yes: “8 is odd” is a false proposition. 2. When exactly one of P,Q is true; then the conjunction is false and the disjunction true. 3. P true, Q false. 4. No; the converse is a different rule.
14 · Common Mistakes
| Misstep | Correction |
|---|---|
| “I do not know whether it is true, so it is not a proposition.” | Unknown to you is different from having no truth value. |
| Reading P ∨ Q as “one but not both.” | Logical ∨ is true if both are true. |
| Reading P → Q as Q → P. | Write the premise first, then the conclusion; test the converse separately. |
| Calling the false-premise rows violations. | The conditional puts a requirement on Q only when P is true. |
| Equating a working truth table with a working real sensor. | A logical model assumes the stated input values; hardware observations can be inaccurate. |
15 · Practice Problems
Do Problems 1–5 by hand. Problems 6–8 extend the ideas. Use Colab only after you can explain an answer.
- Classify: “12 is divisible by 3”; “Find the nearest room”; “Is the server on?”; “The campus bus departed at 8:00 today.”
- Let P mean “it is raining.” Write ¬P in words. Does ¬P mean “it will never rain”?
- If P=T, Q=F, determine ¬P, P ∧ Q, P ∨ Q, and P → Q.
- A notification is sent when an assignment is submitted and notifications are enabled. Choose two propositions and write the condition symbolically.
- Write the complete truth table for ¬P ∧ Q. Show the intermediate ¬P column.
- An entry gate rule says: “If an authorized card is scanned, the green light appears.” The green light appears. What can you conclude from this rule alone? Give a possible alternative cause.
- Let P mean “a route exists,” Q mean “the device has power.” Translate “a route exists and the device has power” and “a route exists or the device has power.” Compare their truth values when P=F, Q=T.
- Write one compound proposition about a classroom rule and explain what each letter represents. Identify one observation that would make your rule false.
Check selected solutions
1. Propositions: first and fourth; command and question are not. 2. “It is not raining” at the stated time; no claim about all future times. 3. F, F, T, F. 4. If S=submitted and N=enabled, S ∧ N. 5. For (T,T),(T,F),(F,T),(F,F), the column ¬P∧Q is F,F,T,F. 6. The green light alone does not establish that a card was scanned; a maintenance test could also activate it. 7. P∧Q and P∨Q; values F and T.
16 · Week 1 Mini Mission: Design a Smart Rule
Self-study / ungraded Choose a simple smart classroom, library or parking gate, reminder application, notification system, study-room access rule, or a similarly familiar system. This is a small personal practice task, not a major semester case study.
- Write two statements about your system that can each be true or false.
- Assign a symbol, such as P or Q, to each.
- Write one rule using ¬, ∧, ∨, or →.
- Make a four-row truth table for your rule.
- If your rule is an implication, identify its violating input pair.
- Use one Python Boolean operation from this chapter to test one row.
- Explain your result to someone in one or two ordinary-language sentences.
Try a prediction first: Which row do you expect to be most informative? Test it; then explain what your rule does and does not say.
Planning space: My system: ____________________ P: ____________________ Q: ____________________ Rule: ____________________
Prediction: ____________________ Truth-table result: ____________________
One Python line: ____________________ Interpretation: ____________________
17 · Challenge Problem
A smart lock uses two rules: “If the card is valid, the indicator turns green” and “If the indicator is green, the door unlocks.” Let V, G, and U stand for these three statements. Translate both rules. If a log records V=T, G=T, U=F, identify which rule is violated. If the log only records U=T, can you infer that the card was valid?
Reveal a reasoned solution
Rules: V→G and G→U. With V=T,G=T,U=F, V→G is true and G→U is false. From U=T alone, V need not be true; some other unlocking mechanism may exist. The two rules do not assert their converses.
18 · Summary
A proposition has a truth value even when that value is unknown to us. Negation reverses a truth value. Conjunction requires both inputs; inclusive disjunction requires at least one. An implication P → Q is false only when its premise is true and its conclusion false. Truth tables list all input combinations and expose invalid interpretations such as silently reversing a conditional.
In mathematical reasoning, state what is known, translate the rule accurately, check relevant cases, and explain what does or does not follow.
19 · Concept Map
Reflection: Which step would be missed if you wrote code before deciding what the real-world statements mean?
20 · Key Terms
| Term | Working meaning |
|---|---|
| Mathematical reasoning | Drawing conclusions with explicit justification. |
| Proposition | A declarative statement that, in a specified context, is either true or false. |
| Truth value | True or false. |
| Compound proposition | A proposition formed using one or more logical connectives. |
| Negation, conjunction, disjunction | Not, and, inclusive or. |
| Implication | An if–then statement with one false truth-table row. |
| Premise and conclusion | The condition after “if” and the statement after “then.” |
| Truth table | A systematic list of possible truth-value combinations. |
21 · What Comes Next
Next week, statements will gain variables and quantifiers such as “every” and “some.” You will combine facts and rules in the major case study Can the System Conclude This? For now, choose one rule you encounter in everyday life. Write its premise and conclusion, find the observation that would violate it, and ask whether its converse must be true.
Exit reflection: “I once thought an if–then statement meant ______. Now I understand ______.”
Selected Answers and Explanations
Use these after attempting the workbook activities. The complete worked truth table in Section 07 is available for another check.
Paper proposition sort: “8 is odd” is P (false); “Please open” is N (request); “Is the server active?” is N (question); “x > 5” is O (x unspecified).
Quick checks: ¬P=T if P=F; A∧H=F if the card is invalid; E∨S=F if both message channels fail; a late submission with confirmation does not break the stated promise.
Logic Playground rows (¬P, P∧Q, P∨Q, P→Q): TT → F,T,T,T; TF → F,F,T,F; FT → T,F,T,T; FF → T,F,F,T. For FT, the rule is not broken because no motion occurred, so this rule places no requirement on Q in this case.
Activity B: The conditional column is T,F,T,T in standard row order. It is false only when motion occurs and the lamp is off.
Self-check: (1) Yes, “8 is odd” is a false proposition. (2) AND and OR differ when exactly one input is true. (3) P=T, Q=F. (4) Lamp on alone does not prove motion.
Selected practice: (1) First and fourth are propositions. (2) Not raining at the stated time, not “never.” (3) F,F,T,F. (4) S∧N. (5) ¬P∧Q: F,F,T,F. (6) The light might be activated by maintenance. (7) P∧Q=F, P∨Q=T.
Challenge: V→G and G→U. The second rule is violated by V=T, G=T, U=F. U=T alone does not establish V=T.