Which of these is a proposition?
- It is false, but it is still a declarative sentence with a truth value.
Propositions and connectives, truth tables, implication and its converse / inverse / contrapositive, translating English, consistent specifications, logical equivalences and De Morgan, satisfiability, predicates and quantifiers (and negating them), nested quantifiers, and the rules of inference including resolution.
Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.
Tip p → q is FALSE only when p is true and q is false. Same as ¬p ∨ q, and as its contrapositive ¬q → ¬p.
A proposition is a declarative sentence that is either true or false, not both. Questions, commands and "x + 1 = 2" (x unknown) are NOT propositions.
Which of these is a proposition?
p ∧ q (and) is true only when both are true.
p ∨ q (inclusive or) is false only when both are false.
p ⊕ q is true when:
p → q is FALSE only when p is true and q is false. Same as ¬p ∨ q, and as its contrapositive ¬q → ¬p.
Readings: "if p then q", "p only if q", "q whenever p", "q is necessary for p", "p is sufficient for q".
Trap "p only if q" is p → q, NOT q → p.
When is p → q false?
If p is false, p → q is true no matter what q is.
From p → q: converse q → p, inverse ¬p → ¬q, contrapositive ¬q → ¬p.
Only the contrapositive is equivalent to the original; the converse and inverse are equivalent to each other.
Memory trick CONtrapositive = CONverse + inverse together (swap AND negate).
The contrapositive of "If it rains, then I stay home" is:
An implication is logically equivalent to its converse.
p ↔ q is true when p and q have the SAME truth value ("if and only if", "necessary and sufficient").
p ↔ q is equivalent to:
p ↔ q is the negation of p ⊕ q.
How many rows does the truth table of a proposition with 4 variables have?
Precedence: ¬ first, then ∧, then ∨, then →, then ↔. So p ∨ q → ¬r means (p ∨ q) → (¬r).
p ∧ q ∨ r is read as:
Translate: pick atomic propositions, then join them with connectives. "You can access the Internet only if you are a CS major or not a freshman" → a → (c ∨ ¬f).
A set of specifications is consistent if ONE assignment of truth values makes all of them true at the same time.
How do you check that a list of system specifications is consistent?
Translate each into propositional logic and look for one truth assignment (a row of the truth table) that makes every specification true at once. If such a row exists the specs are consistent; if none exists they are inconsistent.
Logic gates: inverter (¬), AND (∧), OR (∨); circuits compute compound propositions.
p ∨ ¬p is a:
(p → q) ∧ p ∧ ¬q is a:
p ≡ q (logically equivalent) when p ↔ q is a tautology: same truth value in every row.
De Morgan: ¬(p ∧ q) ≡ ¬p ∨ ¬q and ¬(p ∨ q) ≡ ¬p ∧ ¬q.
Memory trick Negate each part and FLIP the operator.
¬(p ∨ q) is equivalent to:
Implication laws: p → q ≡ ¬p ∨ q ≡ ¬q → ¬p; p ↔ q ≡ (p → q) ∧ (q → p).
Equivalence proof: rewrite step by step, naming the law used at each step (no truth table).
Show that ¬(p → q) ≡ p ∧ ¬q without a truth table.
¬(p → q) ≡ ¬(¬p ∨ q) (implication law) ≡ ¬¬p ∧ ¬q (De Morgan) ≡ p ∧ ¬q (double negation).
A compound proposition is unsatisfiable exactly when its negation is a tautology.
∀x P(x): true when P(x) holds for EVERY x in the domain. ∃x P(x): true when it holds for AT LEAST ONE.
One counterexample makes ∀x P(x) false.
Domain: all integers. ∀x (x² ≥ x) is:
∃x P(x) is false only when P(x) is false for every x. Over an empty domain ∃ is false and ∀ is true.
∀ and ∃ bind tighter than all connectives: ∀x P(x) ∨ Q(x) means (∀x P(x)) ∨ Q(x).
Trap ∀ pairs with →, ∃ pairs with ∧. ∃x (S(x) → C(x)) is true as soon as one x is not a student.
Domain: all people. "Some students are lazy" is:
¬∀x P(x) ≡ ∃x ¬P(x) and ¬∃x P(x) ≡ ∀x ¬P(x) (De Morgan for quantifiers).
Memory trick Push ¬ inside and flip ∀ ↔ ∃.
¬∀x (x > 0) is equivalent to:
Nested quantifiers: order matters when they differ. ∀x ∃y (x + y = 0) is true over the integers; ∃y ∀x (x + y = 0) is false.
Domain: integers. Which is TRUE?
∀x∀y and ∃x∃y can be swapped freely; ∀x∃y and ∃y∀x cannot.
An argument is valid if the conclusion must be true whenever all premises are true (the conditional (p₁ ∧ … ∧ pₙ) → q is a tautology).
"If it snows, school closes. It snows. Therefore school closes." uses:
Trap p → q, q ∴ p is the fallacy of affirming the conclusion; p → q, ¬p ∴ ¬q is denying the hypothesis. Neither is valid.
From p → q and ¬q we may conclude:
"Either the file is corrupt or the disk is full. The disk is not full. So the file is corrupt." uses:
Addition: p ∴ p ∨ q.
Simplification: p ∧ q ∴ p.
Conjunction: p, q ∴ p ∧ q.
Resolution: p ∨ q, ¬p ∨ r ∴ q ∨ r (the clashing literal p cancels).
From p ∨ q and ¬p ∨ r, resolution gives:
Build an argument as a numbered list of steps, each a premise or a rule applied to earlier steps.
Premises: p → q, q → r, p. Show r with rules of inference.
1. p → q (premise) 2. q → r (premise) 3. p → r (hypothetical syllogism 1, 2) 4. p (premise) 5. r (modus ponens 3, 4).