📘 Lecture 1 — Introduction
📖 Overview: This lecture introduces the fundamental concepts of logic, which serves as the foundation for discrete mathematics. It explains what statements are, how to form compound statements using logical connectives, and how to construct truth tables to determine the truth values of compound propositions.
🗂️ Topics Covered
The lecture covers the definition of logic and discrete mathematics, the concept of simple and compound statements, logical connectives (negation, conjunction, and disjunction), symbolic representation of statements, translating between English and symbolic forms, and constructing truth tables for basic logical operations.
📝 Lecture Summary
MAIN TOPICS:
This course covers Logic, Sets & Operations on sets, Relations & Their Properties, Functions, and Sequences & Series. The set of integers includes ... -3, -2, -1, 0, 1, 2... and the set of real numbers includes all numbers on the number line. Discrete Mathematics concerns processes that consist of a sequence of individual steps.
Logic is the study of the principles and methods that distinguishes between a valid and an invalid argument.
SIMPLE STATEMENT:
A statement (also called a proposition) is a declarative sentence that is either true or false but not both. If a proposition is true, its truth value is "true"; if false, its truth value is "false". Truth values are denoted by T and F.
🔑 Definition — Statement: A declarative sentence that is either true or false but not both.
📌 Examples: "Grass is green", "4 + 2 = 6", "4 + 2 = 7", "There are four fingers in a hand" are all propositions.
Not propositions include: "Close the door" (command), "x is greater than 2" (variable not specified), "He is very rich" (pronoun reference unclear).
Rule: If the sentence is preceded by other sentences that make the pronoun or variable reference clear, then the sentence is a statement.
📌 Example: When x = 1, "x > 2" is a statement with truth-value FALSE. 📌 Example: "Bill Gates is an American" followed by "He is very rich" makes "He is very rich" a statement with truth-value TRUE.
📌 More examples: "x + 2 is positive" → Not a statement; "May I come in?" → Not a statement; "Logic is interesting" → A statement; "It is hot today" → A statement; "-1 > 0" → A statement; "x + y = 12" → Not a statement.
COMPOUND STATEMENT:
Simple statements can be used to build a compound statement using logical connectives.
📌 Examples:
- "3 + 2 = 5" and "Lahore is a city in Pakistan"
- "The grass is green" or "It is hot today"
- "Discrete Mathematics is not difficult to me"
AND, OR, NOT are called LOGICAL CONNECTIVES.
SYMBOLIC REPRESENTATION:
Statements are symbolically represented by letters such as p, q, r, ...
📌 Examples: p = "Islamabad is the capital of Pakistan" q = "17 is divisible by 3"
| Connective | Meaning | Symbol | Called |
|---|---|---|---|
| Negation | not | ~ | Tilde |
| Conjunction | and | ∧ | Hat |
| Disjunction | or | ∨ | Vel |
| Conditional | if...then... | → | Arrow |
| Biconditional | if and only if | ↔ | Double arrow |
📌 Examples using p and q above: p ∧ q = "Islamabad is the capital of Pakistan and 17 is divisible by 3" p ∨ q = "Islamabad is the capital of Pakistan or 17 is divisible by 3" ~p = "It is not the case that Islamabad is the capital of Pakistan" or simply "Islamabad is not the capital of Pakistan"
TRANSLATING FROM ENGLISH TO SYMBOLS:
Let p = "It is hot", and q = "It is sunny"
| Sentence | Symbolic Form |
|---|---|
| It is not hot | ~ p |
| It is hot and sunny | p ∧ q |
| It is hot or sunny | p ∨ q |
| It is not hot but sunny | ~ p ∧ q |
| It is neither hot nor sunny | ~ p ∧ ~ q |
📌 Example: Let h = "Zia is healthy", w = "Zia is wealthy", s = "Zia is wise"
- "Zia is healthy and wealthy but not wise" → (h ∧ w) ∧ (~s)
- "Zia is not wealthy but he is healthy and wise" → ~w ∧ (h ∧ s)
- "Zia is neither healthy, wealthy nor wise" → ~h ∧ ~w ∧ ~s
TRANSLATING FROM SYMBOLS TO ENGLISH:
Let m = "Ali is good in Mathematics", c = "Ali is a Computer Science student"
| Symbolic Form | English Translation |
|---|---|
| ~ c | Ali is not a Computer Science student |
| c ∨ m | Ali is a Computer Science student or good in Maths |
| m ∧ ~c | Ali is good in Maths but not a Computer Science student |
A convenient method for analyzing a compound statement is to make a truth table for it. A truth table specifies the truth value of a compound proposition for all possible truth values of its constituent propositions.
NEGATION (~):
If p is a statement variable, then negation of p, "not p", is denoted as "~p". It has opposite truth value from p: if p is true, ~p is false; if p is false, ~p is true.
TRUTH TABLE FOR ~p:
| p | ~p |
|---|---|
| T | F |
| F | T |
CONJUNCTION (∧):
If p and q are statements, then the conjunction of p and q is "p and q", denoted as "p ∧ q". It is true when, and only when, both p and q are true. If either p or q is false, or if both are false, p ∧ q is false.
TRUTH TABLE FOR p ∧ q:
| p | q | p ∧ q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
Note that in the table T is only in that row where both p and q have T and all other values are F. Thus for finding out the truth values for the conjunction of two statements we will only first search out where both statements are true and write down the T in the corresponding row in the column of p ∧ q and in all other rows we will write F.
💡 Why this matters: Conjunction requires ALL components to be true for the compound statement to be true.
DISJUNCTION (∨) or INCLUSIVE OR:
If p and q are statements, then the disjunction of p and q is "p or q", denoted as "p ∨ q". It is true when at least one of p or q is true and is false only when both p and q are false.
TRUTH TABLE FOR p ∨ q:
| p | q | p ∨ q |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
Note that in the table F is only in that row where both p and q have F and all other values are T. Thus for finding out the truth values for the disjunction of two statements we will only first search out where both statements are false and write down the F in the corresponding row in the column of p ∨ q and in all other rows we will write T.
💡 Why this matters: Disjunction requires only ONE component to be true for the compound statement to be true.
Remark: For conjunction of two statements we find the T in both the statements. But in disjunction we find F in both the statements. In other words, we fill T first in the column of conjunction and F in the column of disjunction.
⭐ Key Takeaways
A statement must be a declarative sentence with a definite truth value (true or false), and sentences with unclear references or variables are not statements. Compound statements are built from simple statements using logical connectives: negation (~), conjunction (∧), and disjunction (∨), each with specific truth table rules. Negation flips the truth value, conjunction is true only when both parts are true, and disjunction is false only when both parts are false. Translating between English and symbolic notation requires careful attention to connectives and the structure of the sentence. Truth tables provide a systematic method for determining the truth value of any compound proposition for all possible combinations of its components.
🧠 Quick Revision Questions
- Why is "He is very rich" not always considered a statement? When can it become a statement?
- What is the difference between the truth table pattern for conjunction (∧) and disjunction (∨)?
- Translate into symbolic form: "It is not hot but it is sunny" using p = "It is hot" and q = "It is sunny".
- If p is false and q is true, what is the truth value of ~p ∧ q?
- What is the only condition under which a disjunction (p ∨ q) is false?
📘 Lecture 2 — Truth Tables
📖 Overview: This lecture introduces the construction and interpretation of truth tables for compound statements involving multiple logical operators. It demonstrates how to systematically evaluate truth values for expressions with negation, conjunction, disjunction, and their combinations, and covers foundational logical equivalences including De Morgan’s Laws, the double negative property, and the concept of tautology.
🗂️ Topics Covered
The lecture covers truth tables for three statement forms: ~p ∧ q, ~p ∧ (q ∨ ~r), and (p∨q) ∧ ~(p∧q). It then explains the double negative property ~(~p) ≡ p through an example, demonstrates that ~(p∧q) and ~p ∧ ~q are not logically equivalent, introduces De Morgan’s Laws for negating conjunctions and disjunctions, applies them to inequalities and real-world statements, and concludes with the definition of tautology and the example p ∨ ~p.
📝 Lecture Summary
Truth table for the statement form ~ p q
A truth table for the expression ~p ∧ q is constructed by listing all possible truth values for p and q, then determining ~p, and finally the conjunction of ~p with q. The result is true only when p is false and q is true.
🔑 Truth table: A table that shows all possible truth values for statement variables and the resulting truth value of a compound statement.
| p | q | ~p | ~p ∧ q |
|---|---|---|---|
| T | T | F | F |
| T | F | F | F |
| F | T | T | T |
| F | F | T | F |
📌 Example: For row 3, p = F, q = T, so ~p = T, and T ∧ T = T.
Truth table for ~ p (q ~ r)
This truth table involves three variables (p, q, r), requiring 8 rows. The intermediate columns compute ~r, then q ∨ ~r, then ~p, and finally the conjunction of ~p with (q ∨ ~r).
🔑 ~r: Negation of r.
| p | q | r | ~r | q ∨ ~r | ~p | ~p ∧ (q ∨ ~r) |
|---|---|---|---|---|---|---|
| T | T | T | F | T | F | F |
| T | T | F | T | T | F | F |
| T | F | T | F | F | F | F |
| T | F | F | T | T | F | F |
| F | T | T | F | T | T | T |
| F | T | F | T | T | T | T |
| F | F | T | F | F | T | F |
| F | F | F | T | T | T | T |
📌 Example: In row 6 (p=F, q=T, r=F), ~r = T, so q ∨ ~r = T ∨ T = T, ~p = T, so final result is T ∧ T = T.
Truth table for (pq) ~ (pq)
This table computes p∨q, p∧q, its negation ~(p∧q), and then the conjunction of p∨q with ~(p∧q). This expression is true when p and q have different truth values.
| p | q | p∨q | p∧q | ~(p∧q) | (p∨q) ∧ ~(p∧q) |
|---|---|---|---|---|---|
| T | T | T | T | F | F |
| T | F | T | F | T | T |
| F | T | T | F | T | T |
| F | F | F | F | T | F |
📌 Example: For p=T, q=F, p∨q = T, p∧q = F, ~(p∧q) = T, final result: T ∧ T = T.
Double Negative Property ~(~p) º p
The double negative property states that negating a negation returns the original proposition. The truth table confirms ~(~p) has the same truth value as p.
| p | ~p | ~(~p) |
|---|---|---|
| T | F | T |
| F | T | F |
📌 Example: “It is not true that I am not happy” is equivalent to “I am happy.” Let p = “I am happy”, then ~p = “I am not happy”, and ~(~p) = “It is not true that I am not happy”. Since ~(~p) ≡ p, the given statement means “I am happy”.
💡 Why this matters: The double negative property confirms that two negations cancel each other logically, which is essential for simplifying statements.
~(pq) and ~p ~q are not logically equivalent
The truth table shows that ~(p∧q) and ~p ∧ ~q have different truth values in rows 2 and 3, proving they are not logically equivalent.
| p | q | ~p | ~q | p∧q | ~(p∧q) | ~p ∧ ~q |
|---|---|---|---|---|---|---|
| T | T | F | F | T | F | F |
| T | F | F | T | F | T | F |
| F | T | T | F | F | T | F |
| F | F | T | T | F | T | T |
🔑 Logically equivalent: Two statement forms that have identical truth values for all possible truth values of their variables.
📌 Example: In row 2 (p=T, q=F), ~(p∧q) = T but ~p ∧ ~q = F, so they differ.
De Morgan’s Laws
De Morgan’s Laws provide rules for negating compound statements:
- ~(p ∧ q) ≡ ~p ∨ ~q — the negation of an “and” statement is an “or” of the negations.
- ~(p ∨ q) ≡ ~p ∧ ~q — the negation of an “or” statement is an “and” of the negations.
Truth table for ~(p ∨ q) ≡ ~p ∧ ~q confirms the equivalence:
| p | q | ~p | ~q | p ∨ q | ~(p ∨ q) | ~p ∧ ~q |
|---|---|---|---|---|---|---|
| T | T | F | F | T | F | F |
| T | F | F | T | T | F | F |
| F | T | T | F | T | F | F |
| F | F | T | T | F | T | T |
All truth values match, confirming the equivalence.
📌 Application: Negate the statement “The fan is slow or it is very hot.” Using De Morgan’s Law: ~(p ∨ q) ≡ ~p ∧ ~q, so the negation is “The fan is not slow and it is not very hot.”
📌 Application: Negate “Akram is unfit and Saleem is injured.” Using De Morgan’s Law: ~(p ∧ q) ≡ ~p ∨ ~q, so the negation is “Akram is not unfit or Saleem is not injured.”
Inequalities and De Morgan’s Laws
De Morgan’s Laws apply to inequalities. For the compound inequality -1 < x ≤ 4, which means x > -1 and x ≤ 4, the negation using De Morgan’s Law is: x > -1 or x ≤ 4 is false. Equivalently: x ≤ -1 or x > 4.
📌 Example: For the inequality -1 < x ≤ 4, write as (x > -1) ∧ (x ≤ 4). Negation: ~(x > -1) ∨ ~(x ≤ 4) = (x ≤ -1) ∨ (x > 4).
Exercise
- (p ∧ q) ∧ r ≡ p ∧ (q ∧ r) — This is the associative law for conjunction, which is logically equivalent.
- Are (p∧q)∨r and p ∧ (q ∨ r) logically equivalent? — They are not logically equivalent because the parentheses change the grouping; (p∧q)∨r is a disjunction, while p∧(q∨r) is a conjunction.
🔑 Associative law: (p ∧ q) ∧ r ≡ p ∧ (q ∧ r), meaning grouping does not affect the truth value.
Tautology
A tautology is a statement form that is always true regardless of the truth values of the statement variables. It is represented by the symbol t.
📌 Example: The statement form p ∨ ~p is a tautology because:
| p | ~p | p ∨ ~p |
|---|---|---|
| T | F | T |
| F | T | T |
Both rows yield T, so p ∨ ~p ≡ t.
💡 Why this matters: Tautologies are always true statements, forming the basis of logical reasoning and valid arguments.
⭐ Key Takeaways
The most critical concepts from this lecture are the systematic construction of truth tables for compound statements with up to three variables, the double negative property which allows cancellation of two negations, and De Morgan’s Laws which provide a method for negating conjunctions and disjunctions by distributing negation and flipping the operator. It is essential to remember that ~(p∧q) is not equivalent to ~p∧~q; instead it is ~p∨~q. The concept of tautology identifies statements that are always true, such as p ∨ ~p. Understanding truth tables is fundamental for verifying logical equivalences and analyzing logical arguments.
🧠 Quick Revision Questions
- Construct the truth table for ~p ∧ q and identify in which row(s) the result is true.
- Using De Morgan’s Laws, what is the negation of the statement “The fan is slow or it is very hot”?
- Are the statements ~(p ∧ q) and ~p ∧ ~q logically equivalent? Explain why or why not.
- What is a tautology? Give one example from this lecture.
- Write the negation of the inequality -1 < x ≤ 4 using De Morgan’s Laws.
📘 Lecture 3 — Applying Laws of Logic
📖 Overview: This lecture introduces the application of logical laws to simplify statement forms and verify logical equivalences. It then transitions to conditional statements (implications), covering their truth tables, alternative expressions, translations between English and symbolic form, and related concepts like negation, inverse, converse, and contrapositive.
🗂️ Topics Covered
The lecture begins by applying DeMorgan’s, Double Negative, Associative, Idempotent, Distributive, Negation, and Identity laws to simplify logical expressions and verify equivalences. It then defines conditional statements, provides their truth table, and explores alternative phrasings. The lecture continues with exercises on translating English sentences to symbolic propositions and vice versa, establishing a hierarchy of logical operations, and constructing truth tables for complex statements. Finally, it covers the logical equivalence involving implication (including Implication Law), the negation of a conditional statement, and the definitions and distinctions between the inverse, converse, and contrapositive of a conditional statement.
📝 Lecture Summary
Laws of Logic
Using law of logic, simplify the statement form p ∨ [~(~p ∧ q)]. The solution begins with DeMorgan’s Law to get p ∨ [~(~p) ∨ (~q)], then applies the Double Negative Law to become p ∨ [p ∨ (~q)], uses the Associative Law for ∨ to get [p ∨ p] ∨ (~q), and finally applies the Idempotent Law to arrive at the simplified form p ∨ (~q).
🔑 Definition — DeMorgan’s Law: ~(p ∧ q) ≡ ~p ∨ ~q and ~(p ∨ q) ≡ ~p ∧ ~q.
🔑 Definition — Double Negative Law: ~(~p) ≡ p.
🔑 Definition — Associative Law: (p ∨ q) ∨ r ≡ p ∨ (q ∨ r) and (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).
🔑 Definition — Idempotent Law: p ∨ p ≡ p and p ∧ p ≡ p.
📌 Example: Using Laws of Logic, verify the logical equivalence ~ (~ p ∧ q) ∧ (p ∨ q) ≡ p. The steps are: ~(p ∧ q) ∧ (p ∨ q) ≡ ((~p) ∨ ~q) ∧ (p ∨ q) (DeMorgan’s) ≡ (p ∨ ~q) ∧ (p ∨ q) (Double Negative) ≡ p ∨ (~q ∧ q) (Distributive Law) ≡ p ∨ c (Negation Law) ≡ p (Identity Law). This verifies the equivalence. 💡 Why this matters: These laws provide a systematic method for simplifying complex logical statements without constructing extensive truth tables.
Simplifying a Statement
The lecture shows how to rephrase a complex condition more simply using logical equivalences. The statement is: “You will get an A if you are hardworking and the sun shines, or you are hardworking and it rains.” Let p = “You are hardworking”, q = “The sun shines”, r = “It rains”. The condition is (p ∧ q) ∨ (p ∧ r). Using the Distributive Law in reverse, (p ∧ q) ∨ (p ∧ r) ≡ p ∧ (q ∨ r). Translating back to English gives: “You will get an A if you are hardworking and the sun shines or it rains.”
Conditional Statements or Implications
If p and q are statement variables, the conditional of q by p is “If p then q” or “p implies q” and is denoted p → q. It is false when p is true and q is false; otherwise it is true. In p → q, p is called the hypothesis (or antecedent) and q is called the conclusion (or consequent).
🔑 Definition — Conditional Statement (p → q): A logical statement that is false only when the hypothesis (p) is true and the conclusion (q) is false; it is true in all other cases. 📐 Truth Table for p → q:
| p | q | p → q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
📌 Example: Determine the truth value of “If 1 = 1, then 3 = 3.” Since both p (1=1) is true and q (3=3) is true, the conditional is TRUE.
Alternative Ways of Expressing Implications
The implication p → q can be expressed in many alternative ways: “if p then q”, “p implies q”, “if p, q”, “p only if q”, “p is sufficient for q”, “not p unless q”, “q follows from p”, “q if p”, “q whenever p”, and “q is necessary for p”.
📌 Example: Write “Your guarantee is good only if you bought your CD less than 90 days ago” in the form “if p, then q”. Let p = “your guarantee is good” and q = “you bought your CD less than 90 days ago”. The rephrased statement is: If your guarantee is good, then you must have bought your CD player less than 90 days ago.
Translating English Sentences to Symbols
Let p = “you get an A on the final exam”, q = “you do every exercise in this book”, r = “you get an A in this class”. The translation uses the logical connectives: → for implication, ∧ for conjunction, and ∨ for disjunction.
📌 Example: “Getting an A on the final and doing every exercise in this book is sufficient for getting an A in this class.” The symbolic translation is p ∧ q → r.
Hierarchy of Operations for Logical Connectives
The order of precedence for logical connectives is: ~ (negation) has highest priority, then ∧ (conjunction) and ∨ (disjunction) have equal priority, and finally → (conditional) has the lowest priority.
📌 Example: Construct a truth table for the statement form p ∨ ~ q → ~ p. According to the hierarchy, the negation (~) is evaluated first, then disjunction (∨), and finally conditional (→). The result shows that the statement is false when p is true and q is either true or false, and true when p is false.
Logical Equivalence Involving Implication
A conditional statement and its contrapositive are logically equivalent. Symbolically, p → q ≡ ~q → ~p.
🔑 Definition — Implication Law: p → q ≡ ~p ∨ q. This law expresses a conditional as a disjunction.
📌 Example: Use truth table to show p → q ≡ ~q → ~p. The truth tables for both expressions have the same truth values for all combinations of p and q (T, F, T, T), confirming their logical equivalence.
Negation of a Conditional Statement
Since p → q ≡ p ∨ q, the negation is ~ (p → q) ≡ ~ ( p ∨ q) ≡ ~(~p) ∧ (~q) (by De Morgan’s law) ≡ p ∧ ~q (by Double Negative law). Thus, the negation of “if p then q” is logically equivalent to “p and not q”.
📌 Example: Write the negation of “If Ali lives in Pakistan then he lives in Lahore.” The negation is: Ali lives in Pakistan and he does not live in Lahore.
Inverse, Converse, and Contrapositive of a Conditional Statement
The inverse of p → q is ~p → ~q. A conditional and its inverse are not logically equivalent. The converse of p → q is q → p. A conditional and its converse are not equivalent. The contrapositive of p → q is ~q → ~p. A conditional and its contrapositive are logically equivalent.
🔑 Definition — Inverse: The statement formed by negating both the hypothesis and conclusion of a conditional statement. 🔑 Definition — Converse: The statement formed by swapping the hypothesis and conclusion of a conditional statement. 🔑 Definition — Contrapositive: The statement formed by both swapping and negating the hypothesis and conclusion of a conditional statement; it is logically equivalent to the original conditional.
📌 Example: For “If today is Friday, then 2 + 3 = 5”: Inverse: “If today is not Friday, then 2 + 3 ≠ 5.” Converse: “If 2 + 3 = 5, then today is Friday.” Contrapositive: “If 2 + 3 ≠ 5, then today is not Friday.”
⭐ Key Takeaways
The most critical concepts from this lecture are: (1) logical laws like DeMorgan’s, Double Negative, Distributive, and Imputation laws are powerful tools for simplifying complex logical statements and verifying equivalences without constructing full truth tables. (2) A conditional statement (p → q) is false only when the hypothesis is true and the conclusion is false, and it can be expressed in many equivalent English phrases. (3) The negation of a conditional is logically equivalent to “p and not q” (p ∧ ~q), not another “if-then” statement. (4) A conditional statement is logically equivalent to its contrapositive (~q → ~p) but not to its inverse (~p → ~q) or its converse (q → p). (5) The hierarchy of logical operations (negation first, then conjunction/disjunction, then conditional) is essential for correctly interpreting and constructing truth tables for compound statements.
🧠 Quick Revision Questions
- Using the laws of logic, simplify the statement form: ~(~p ∧ q) ∧ (p ∨ q). What is the final simplified form?
- What is the truth value of the conditional statement “If 1 = 0, then 3 = 3”?
- Write the statement “It is necessary to walk 8 miles to get to the top of the Peak” in the form “if p, then q”.
- State the negation of the conditional statement: “If n is divisible by 6, then n is divisible by 2 and n is divisible by 3.”
- Identify whether each of the following is logically equivalent to the original conditional statement p → q: (a) its inverse, (b) its converse, (c) its contrapositive, (d) ~p ∨ q.
📘 Lecture 4 — Biconditional operator
📖 Overview: This lecture introduces the biconditional operator (iff) as a logical connective that combines two conditional statements. It covers truth tables, logical equivalences involving biconditionals, and several laws of logic used to simplify or rewrite statement forms, with applications for rewriting without implication or biconditional symbols.
🗂️ Topics Covered
The lecture begins with the definition and truth table of the biconditional operator pq, including examples of true/false statements. It then rephrases biconditional in English and covers truth tables for complex statements like (pq)(qp) and (pq)(rq). Logical equivalence involving biconditional is demonstrated, followed by several laws of logic (commutative, implication, exportation, equivalence, reductio ad absurdum). Applications show how to rewrite statements without or using only ~ and , and how to prove a tautology without truth tables.
📝 Lecture Summary
Biconditional operator
If p and q are statement variables, the biconditional of p and q is “p if, and only if, q” and is denoted pq. “if and only if” abbreviated iff. The double headed arrow "" is the biconditional operator.
🔑 Definition — Biconditional: pq is true when p and q have the same truth value (both true or both false), and false otherwise.
📐 Truth Table: pq is true only when p and q are both T or both F; false otherwise.
| p | q | pq |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
📌 Example: True or false?
- “1+1 = 3 if and only if earth is flat” → TRUE (both false)
- “Sky is blue iff 1 = 0” → FALSE (one true, one false)
- “Milk is white iff birds lay eggs” → TRUE (both true)
- “33 is divisible by 4 if and only if horse has four legs” → FALSE (one false, one true)
- “x > 5 iff x² > 25” → FALSE (e.g., x = -5 gives x² > 25 true but x > 5 false)
Equivalence: pq ≡ (pq) ∧ (qp)
The biconditional is logically equivalent to the conjunction of two conditionals.
📐 Truth table showing same truth values:
| p | q | pq | pq | qp | (pq)∧(qp) |
|---|---|---|---|---|---|
| T | T | T | T | T | T |
| T | F | F | F | T | F |
| F | T | F | T | F | F |
| F | F | T | T | T | T |
Rephrasing Biconditional
pq is also expressed as:
- “p is necessary and sufficient for q”
- “if p then q, and conversely”
- “p is equivalent to q”
📌 Example: “If it is hot outside you buy an ice cream cone, and if you buy an ice cream cone it is hot outside.” → “You buy an ice cream cone if and only if it is hot outside.”
Truth Table for (pq) (qp)
| p | q | pq | ~q | ~p | (pq)( | |
|---|---|---|---|---|---|---|
| T | T | T | F | F | T | T |
| T | F | F | T | F | F | T |
| F | T | T | F | T | T | T |
| F | F | T | T | T | T | T |
This is always true — a tautology.
Truth Table for (pq)(rq)
| p | q | r | pq | rq | (pq)(rq) |
|---|---|---|---|---|---|
| T | T | T | T | T | T |
| T | T | F | T | F | F |
| T | F | T | F | F | T |
| T | F | F | F | T | F |
| F | T | T | F | T | F |
| F | T | F | F | F | T |
| F | F | T | T | F | F |
| F | F | F | T | T | T |
Truth Table for p ∧ ~r q ∨ r (where p∧~r q∨r means (p ∧ (~r)) (q ∨ r))
| p | q | r | ~r | p∧~r | q∨r | p∧~r q∨r |
|---|---|---|---|---|---|---|
| T | T | T | F | F | T | F |
| T | T | F | T | T | T | T |
| T | F | T | F | F | T | F |
| T | F | F | T | T | F | F |
| F | T | T | F | F | T | F |
| F | T | F | T | F | T | F |
| F | F | T | F | F | T | F |
| F | F | F | T | F | F | T |
Logical Equivalence Involving Biconditional
Show that ~p q and p ~q are logically equivalent.
| p | q | ~p | ~q | ~pq | p~q |
|---|---|---|---|---|---|
| T | T | F | F | F | F |
| T | F | F | T | T | T |
| F | T | T | F | T | T |
| F | F | T | T | F | F |
Same truth values → logically equivalent.
Show ~(p ⊕ q) and p q are logically equivalent
| p | q | p⊕q | ~(p⊕q) | pq |
|---|---|---|---|---|
| T | T | F | T | T |
| T | F | T | F | F |
| F | T | T | F | F |
| F | F | F | T | T |
Same truth values → logically equivalent.
Laws of Logic
- Commutative Law: p q ≡ q p
- Implication Laws: p q ≡ ~p ∨ q ; also ≡ ~(p ∧ ~q)
- Exportation Law: (p ∧ q) r ≡ p (q r)
- Equivalence: p q ≡ (p q) ∧ (q p)
- Reductio ad absurdum: p q ≡ (p ∧ ~q) c (where c is a contradiction)
Application: Rewrite without or
- p ∧ ~q r → Using order of operations: (p ∧ ~q) r ≡ ~(p ∧ ~q) ∨ r (implication law)
- (p r) (q r) → ≡ (~p ∨ r) (~q ∨ r) (implication law) → then ≡ [(~p ∨ r) (~q ∨ r)] ∧ [(~q ∨ r) (
p ∨ r)] → then ≡ [(~p ∨ r) ∨ (q ∨ r)] ∧ [(~q ∨ r) ∨ (~p ∨ r)]
Application: Rewrite using only ~ and ∧
Rewrite ~p ∨ q r ∨ ~q to a logically equivalent form using only ~ and ∧.
- Given: ~p ∨ q r ∨ ~q
- ≡ (~p ∨ q) (r ∨ ~q) [order of operations]
- ≡ ~[(~p ∨ q) ∧ ~(r ∨ ~q)] [implication law pq ≡ ~(p∧~q)]
- ≡
[(p ∧ ~q) ∧ (~r ∧ q)] [De Morgan’s law]
Show ~(pq) p is a tautology without truth tables
| Statement | Reason |
|---|---|
| ~(pq) p | Given |
| ≡ | Implication law pq ≡ ~(p∧~q) |
| ≡ (p ∧ ~q) p | Double negation law |
| ≡ ~(p ∧ ~q) ∨ p | Implication law pq ≡ ~p∨q |
| ≡ (~p ∨ q) ∨ p | De Morgan’s law |
| ≡ (q ∨ ~p) ∨ p | Commutative law of ∨ |
| ≡ q ∨ (~p ∨ p) | Associative law of ∨ |
| ≡ q ∨ t | Negation law |
| ≡ t | Universal bound law |
Thus, it is a tautology (always true).
Exercise: Find truth values when pq is false
Given: pq is false. This happens only when p is true and q is false.
- ~p q: ~p is false, so false q (false) → TRUE (conditional with false antecedent is true)
- p ∨ q: true ∨ false → TRUE
- q p: false true → FALSE (different truth values)
⭐ Key Takeaways
The biconditional pq is true only when both statements have the same truth value. It is logically equivalent to (pq) ∧ (qp), which connects it to the conditional operator. The key laws to remember for manipulating biconditionals include the equivalence law, implication laws (pq ≡ ~p∨q ≡ ~(p∧~q)), and De Morgan’s laws. You must also know the rephrasing “necessary and sufficient” and “if and only if”. For test preparation, be comfortable building truth tables for compound statements with biconditionals and applying the laws to rewrite or simplify logical statements without using or .
🧠 Quick Revision Questions
- What is the truth value of pq when p is true and q is false?
- Show that pq is logically equivalent to which conjunction of conditionals?
- Rewrite p q using only ~ and ∧.
- If pq is false, what are the truth values of p and q?
- What does the phrase “p is necessary and sufficient for q” mean in terms of the biconditional operator?
📘 Lecture 5 — Arguments
📖 Overview: This lecture introduces the fundamental concept of logical arguments, distinguishing between valid and invalid forms. It explains how to determine argument validity using truth tables, which is crucial for constructing and evaluating logical reasoning in mathematics and computer science.
🗂️ Topics Covered
The lecture defines what constitutes an argument, including premises and conclusion. It then establishes the criteria for valid versus invalid arguments, using truth tables as the primary tool for evaluation. Two detailed examples demonstrate the process of testing argument forms for validity, followed by an exercise applying these methods.
📝 Lecture Summary
Argument
An argument is a list of statements called premises (or assumptions or hypotheses) followed by a statement called the conclusion. The symbol "∴", read "therefore," is normally placed just before the conclusion.
🔑 Definition — Argument: A list of statements (premises) followed by a conclusion. 📐 Structure: P₁, P₂, P₃, ..., Pₙ ∴ C (where P are premises and C is conclusion) 📌 Example: "An interesting teacher keeps me awake. I stay awake in Discrete Mathematics class. Therefore, my Discrete Mathematics teacher is interesting." Here, the first two statements are premises, and the last statement is the conclusion.
Valid and Invalid Argument
An argument is valid if the conclusion is true when all the premises are true. Alternatively, an argument is valid if the conjunction of its premises implies the conclusion, meaning (P₁ ∧ P₂ ∧ P₃ ∧ ... ∧ Pₙ) → C is a tautology. An argument is invalid if the conclusion is false when all the premises are true, or if the conjunction of its premises does not imply the conclusion.
🔑 Definition — Valid Argument: An argument where the conclusion must be true whenever all premises are true. 🔑 Definition — Invalid Argument: An argument where it is possible for all premises to be true while the conclusion is false. 📐 Formula for validity: (P₁ ∧ P₂ ∧ ... ∧ Pₙ) → C must be a tautology. 💡 Why this matters: Validity ensures that if you accept the premises, you logically must accept the conclusion. Invalid arguments represent logical fallacies.
Example: Valid Argument Form
Show that the argument form p → q, p ∴ q is valid.
| p | q | p → q | p | q |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | T | F |
| F | T | T | F | T |
| F | F | T | F | F |
📌 Example: The critical rows are those where all premises (p → q and p) are true. Only the first row has both premises true (T, T), and in that row the conclusion (q) is also true (T). Therefore, the argument form is valid.
Example: Invalid Argument Form
Show that the argument form p → q, q ∴ p is invalid.
| p | q | p → q | q | p |
|---|---|---|---|---|
| T | T | T | T | T |
| T | F | F | F | T |
| F | T | T | T | F |
| F | F | T | F | F |
📌 Example: The critical rows are those where all premises (p → q and q) are true: row 1 and row 3. In row 3, both premises are true (T, T), but the conclusion (p) is false (F). Therefore, the argument form is invalid.
Exercise: Determining Validity
Use a truth table to determine if the argument form p ∨ q, p → ~q, p → r ∴ r is valid or invalid.
| p | q | r | p ∨ q | p → ~q | p → r | r | |---|---|-------|--------|-------|---| | T | T | T | T | F | T | T | | T | T | F | T | F | F | F | | T | F | T | T | T | T | T | | T | F | F | T | T | F | F | | F | T | T | T | T | T | T | | F | T | F | T | T | T | F | | F | F | T | F | T | T | T | | F | F | F | F | T | T | F |
📌 Example: Critical rows are those where all three premises (p ∨ q, p → ~q, p → r) are true. These are rows 3, 5, 6, 7, and 8. In row 6, all premises are true (T, T, T), but the conclusion (r) is false (F). Therefore, the argument form is invalid.
⭐ Key Takeaways
The most critical concept is understanding that argument validity depends entirely on the logical structure, not the truth of individual statements. A valid argument guarantees the conclusion is true whenever all premises are true, while an invalid argument has at least one scenario where premises are true but the conclusion is false. The truth table method systematically tests this by identifying critical rows where all premises are true and checking if the conclusion is always true in those rows. Students must remember that the argument form p → q, p ∴ q is valid (modus ponens), while p → q, q ∴ p is invalid (fallacy of affirming the consequent). Always look for at least one critical row with a false conclusion to prove invalidity.
🧠 Quick Revision Questions
- What is the formal definition of a valid argument in terms of propositional logic?
- For the argument form p → q, ~q ∴ ~p, use a truth table to determine if it is valid or invalid.
- What distinguishes a critical row in a truth table used for testing argument validity?
- Why is the argument "If it rains, the ground gets wet. The ground is wet. Therefore, it rained" considered invalid?
- How many premises must be true for a row to be considered critical when testing argument validity?
📘 Lecture 6 — Sets
📖 Overview: This lecture introduces the fundamental concept of sets, which are well-defined collections of distinct objects. It covers the core definitions of set membership, various ways to represent sets, important number sets, and the foundational relationships between sets such as subset, proper subset, equality, and the null set. These concepts are essential for all of mathematics and logic.
🗂️ Topics Covered
The lecture begins by defining a set and its elements, then explains the three standard forms for representing sets: Tabular, Descriptive, and Set Builder Form. It lists the common sets of numbers (Natural, Whole, Integer, etc.), defines the critical concepts of Subset and Proper Subset, and covers Equal Sets, the Null Set, the Universal Set, and Venn Diagrams. Finally, it distinguishes between Finite and Infinite Sets and introduces the Membership Table.
📝 Lecture Summary
Sets
A set is defined as a well defined collection of {distinct} objects. The objects are called the elements or members of the set. Sets are denoted by capital letters (A, B, C…), while their elements are represented by lower case letters (a, b, c…). If an object x is a member of a set A, we write x ∈ A, which reads “x belongs to A”. Otherwise, we write x ∉ A, which reads “x does not belong to A”.
Tabular Form
This form lists all the elements of a set, separated by commas and enclosed within braces or curly brackets {}. The symbol “...” called an ellipsis, is a short for “and so forth.”
📌 Examples:
- A = {1, 2, 3, 4, 5} is the set of first five Natural Numbers.
- B = {2, 4, 6, 8, ..., 50} is the set of Even numbers up to 50.
- C = {1, 3, 5, 7, 9 ...} is the set of positive odd numbers.
Descriptive Form
This form states the elements of a set in words.
📌 Examples:
- A = set of first five Natural Numbers.
- B = set of positive even integers less or equal to fifty.
- C = set of positive odd integers.
Set Builder Form
This form writes the common characteristics shared by all the elements of the set in symbolic form.
📌 Examples:
- A = {x ∈ N / x ≤ 5}
- B = {x ∈ E / 0 < x ≤ 50}
- C = {x ∈ O / 0 < x}
Where N, E, O represent the sets of natural, even, and odd numbers respectively.
Sets of Numbers
The lecture defines the following common sets of numbers:
- Set of Natural Numbers (N): N = {1, 2, 3, ...}
- Set of Whole Numbers (W): W = {0, 1, 2, 3, ...}
- Set of Integers (Z): Z = {..., -3, -2, -1, 0, +1, +2, +3, ...}. “Z” stands for the first letter of the German word for integer: Zahlen.
- Set of Even Integers (E): E = {0, ± 2, ± 4, ± 6, ...}
- Set of Odd Integers (O): O = {± 1, ± 3, ± 5, ...}
- Set of Prime Numbers (P): P = {2, 3, 5, 7, 11, 13, 17, 19, ...}
- Set of Rational Numbers (Q): Q = {x | x = p/q; p, q ∈ Z, q ≠ 0}
- Set of Irrational Numbers (Q̅): Q̅ = Qᶜ = { x | x is not rational}. For example, √2, √3, π, e, etc.
- Set of Real Numbers (R): R = Q ∪ Q̅
- Set of Complex Numbers (C): C = {z | z = x + iy; x, y ∈ R}
Subset
If A and B are two sets, A is called a subset of B, written A ⊆ B, if, and only if, any element of A is also an element of B. Symbolically: A ⊆ B ⇔ if x ∈ A then x ∈ B.
- Remark: When A ⊆ B, B is called a superset of A.
- Remark: When A is not a subset of B, then there exists at least one x ∈ A such that x ∉ B.
- Remark: Every set is a subset of itself.
📌 Example: Let A = {1, 3, 5}, B = {1, 2, 3, 4, 5}, C = {1, 2, 3, 4}, D = {3, 1, 5}.
- A ⊆ B (every element of A is in B)
- C ⊆ B (every element of C is also an element of B)
- A ⊆ D (every element of A is also an element of D, and also note that every element of D is in A so D ⊆ A)
- A is not a subset of C (because element 5 of A is not in C).
📌 Example: The set of integers “Z” is a subset of the set of Rational Number “Q”, since every integer ‘n’ could be written as: n = n/1 ∈ Q. Hence Z ⊆ Q.
Proper Subset
Let A and B be sets. A is a proper subset of B, if, and only if, every element of A is in B but there is at least one element of B that is not in A, and is denoted as A ⊂ B.
📌 Example: Let A = {1, 3, 5}, B = {1, 2, 3, 5}. Then A ⊂ B (because there is an element 2 of B which is not in A).
Equal Sets
Two sets A and B are equal if, and only if, every element of A is in B and every element of B is in A, and is denoted A = B. Symbolically: A = B iff A ⊆ B and B ⊆ A.
📌 Example: Let A = {1, 2, 3, 6}, B = the set of positive divisors of 6, C = {3, 1, 6, 2}, D = {1, 2, 2, 3, 6, 6, 6}. Then A, B, C, and D are all equal sets.
Null Set
A set which contains no element is called a null set, or an empty set or a void set. It is denoted by the Greek letter ∅ (phi) or { }.
📌 Example: A = {x | x is a person taller than 10 feet} = ∅ 📌 Example: B = {x | x² = 4, x is odd} = ∅
🔑 Definition — Null Set: A set with no elements. Remark: ∅ is regarded as a subset of every set.
Exercise: Determining Truth of Statements
Determine whether each of the following statements is true or false.
- x ∈ {x} → TRUE (x is the member of the singleton set {x})
- {x} ⊆ {x} → TRUE (Every set is the subset of itself. Note that every set has necessarily two subsets: ∅ and the set itself. These are known as Improper subsets; any other subset is called a Proper Subset.)
- {x} ∈ {x} → FALSE ( {x} is not the member of {x} because the only member is x)
- {x} ∈ {{x}} → TRUE
- ∅ ⊆ {x} → TRUE
- ∅ ∈ {x} → FALSE
Universal Set
The set of all elements under consideration is called the Universal Set. The Universal Set is usually denoted by U.
Venn Diagram
A Venn diagram is a graphical representation of sets by regions in the plane. The Universal Set is represented by the interior of a rectangle, and the other sets are represented by disks lying within the rectangle.
Finite and Infinite Sets
A set S is said to be finite if it contains exactly m distinct elements where m denotes some non-negative integer. In such case we write |S| = m or n(S) = m. A set is said to be infinite if it is not finite.
📌 Examples:
- The set S of letters of English alphabets is finite and |S| = 26
- The null set ∅ has no elements, is finite and |∅| = 0
- The set of positive integers {1, 2, 3,...} is infinite.
Membership Table
A membership table is a table displaying the membership of elements in sets. To indicate that an element is in a set, a 1 is used; to indicate that an element is not in a set, a 0 is used. Membership tables can be used to prove set identities.
The table below is the Membership table for the Complement of A (Aᶜ).
| A | Aᶜ |
|---|---|
| 1 | 0 |
| 0 | 1 |
If an element is the member of A, then it cannot be the member of Aᶜ; thus where the table has 1 for A, in that row it has 0 in Aᶜ.
⭐ Key Takeaways
A set is a well-defined collection of distinct objects, and its elements can be described using Tabular, Descriptive, or Set Builder forms. A subset (A⊆B) means every element of A is in B, while a proper subset (A⊂B) requires at least one extra element in B. For two sets to be equal, each must be a subset of the other (A=B iff A⊆B and B⊆A). The null set (∅) is a universal subset, contained within every set, and the Universal Set (U) contains all elements under consideration.
🧠 Quick Revision Questions
- What are the three forms used to represent a set, and how do they differ?
- Give the formal definition and symbolic representation of a subset.
- How do you determine if two sets A and B are equal?
- Why is the Empty Set (∅) considered a subset of every set?
- What is the difference between a finite set and an infinite set? Provide one example of each.