Propositional Logic – Comprehensive Study Notes

Propositions

  • Declarative sentences that are unequivocally TRUE (T) or FALSE (F) – never both.
    • Examples judged as propositions
    • “Kuala Lumpur is the capital of Malaysia.” → TT
    • “Superman can fly.” → truth‐value context–dependent; formally treated as a proposition.
    • 1+5=91+5=9 → FF
    • “Tuesday is the day after Wednesday.” → FF
    • Non-propositions (commands, open statements, questions, etc.)
    • “Please sit down.” (imperative)
    • “x+1=2x+1=2” (contains free variable)
    • “What time is it?” (question)
  • Truth‐value operator
    • Notation [[p]][[p]] returns the truth value of proposition pp.
    • TT abbreviates TRUE, FF abbreviates FALSE.

Truth Values & Notation

  • Long propositions are symbolised by lowercase letters p,q,r,s,…p,q,r,s,\dots
    • Example: pp: “CMA6124 is a compulsory subject for Finance majors at MMU.”
    • qq: “You are sitting in this class to learn mathematical logic.”
    • We write [[p]][[p]], [[q]][[q]] for their truth values.

Compound Propositions & Logical Connectives

Compound proposition = combination of ≥2 simple propositions using logical operators.

  • Four fundamental connectives + two derived ones
    1. Negation ¬\lnot (“not”)
    2. Conjunction ∧\land (“and”)
    3. Disjunction ∨\lor (“or”, inclusive)
    4. Implication →\rightarrow (“if … then”)
    5. Biconditional ↔\leftrightarrow (“iff”, derived)
    6. Exclusive–or ⊕\oplus (derived)
  • Truth tables precisely describe how truth values propagate through connectives.

Negation (¬)

  • Truth table
    • pp ¬p\lnot p
    • T      FT\;\;\;F
    • F      TF\;\;\;T
  • Example
    • pp: “It is sunny.”
    • ¬p\lnot p: “It is not sunny.” — true exactly when pp is false.

Conjunction (∧)

  • Truth table

    \begin{array}{|c|c|c|}
    \hline p&q&p\land q\\hline
    T&T&T\ T&F&F\ F&T&F\ F&F&F\\hline
    \end{array}
  • Example: pp: “Today is Tuesday”, qq: “It is raining today”
    • p∧qp\land q: “Today is Tuesday and it is raining today.” Truth only when both clauses are true.

Disjunction (∨)

  • Truth table

    \begin{array}{|c|c|c|}\hline
    p&q&p\lor q\\hline
    T&T&T\ T&F&T\ F&T&T\ F&F&F\\hline
    \end{array}
  • Example: pp: “Mary likes jogging.” qq: “Mary likes dancing.”
    • p∨qp\lor q: “Mary likes jogging or dancing.” False only if Mary likes neither.

Implication (→)

  • Truth table

    \begin{array}{|c|c|c|}\hline
    p&q&p\rightarrow q\\hline
    T&T&T\ T&F&F\ F&T&T\ F&F&T\\hline
    \end{array}
  • Linguistic equivalents: “pp implies qq”, “pp only if qq”, “pp sufficient for qq”, “qq necessary for pp”, “qq when/whenever pp”.
  • Example: pp: “It is sunny.”, qq: “We go to the beach.”
    • Statement false only in the scenario p=T,q=Fp=T,q=F (sunny but we do not go).

Biconditional (↔) & Exclusive–or (⊕)

  • Definitions
    • p↔q≡(p→q)∧(q→p)p\leftrightarrow q\equiv (p\rightarrow q)\land(q\rightarrow p)
    • p⊕q≡¬(p↔q)p\oplus q\equiv \lnot(p\leftrightarrow q)
  • Truth table snippet

    \begin{array}{|c|c|c|c|}\hline
    p&q&p\leftrightarrow q&p\oplus q\\hline
    T&T&T&F\ T&F&F&T\ F&T&F&T\ F&F&T&F\\hline
    \end{array}
  • English for p↔qp\leftrightarrow q: “pp iff qq”, “pp is necessary and sufficient for qq”.

Translating English ↔ Propositional Logic

  • Given example block (rain/sun/clouds):
    • pp: It is raining; qq: The sun is shining; rr: There are clouds.
    • a) “If it is raining, then the sun is not shining and there are clouds.” → p→(¬q∧r)p\rightarrow(\lnot q\land r)
    • b) “If the sun is shining or there are no clouds, then it is not raining.” → (q∨¬r)→¬p(q\lor\lnot r)\rightarrow \lnot p
    • c) “The sun is shining iff it is not raining.” → q↔¬pq\leftrightarrow \lnot p
    • d) “If there are no clouds, then it is not raining and the sun is shining.” → ¬r→(¬p∧q)\lnot r\rightarrow(\lnot p\land q)
  • Reverse translation example (Monday / raining / hot):
    • ¬p→(q∨r)\lnot p\rightarrow(q\lor r) → “If today is not Monday, then it is raining or hot.”
    • ¬(p∨q)↔r\lnot(p\lor q)\leftrightarrow r → “It is not the case that today is Monday or raining iff it is hot.”
    • p∧(q∨r)→r∨(q∨p)p\land(q\lor r)\rightarrow r\lor(q\lor p) → “Today is Monday and (raining or hot) implies that it is hot or raining or today is Monday.”

Truth Tables

  • Mechanical method to compute full semantics of a compound formula.
  • Example truth table for (p→q)∧(r∨¬q)(p\rightarrow q)\land(r\lor\lnot q) shown on slide 14.
  • Precedence rules (highest → lowest):
    1. Parentheses ( )(\ )
    2. Negation ¬\lnot
    3. Conjunction ∧\land
    4. Disjunction ∨\lor
    5. Implication →\rightarrow
    6. Biconditional ↔\leftrightarrow
    • Exercise: add parentheses to p↔q∧¬r∨sp\leftrightarrow q\land\lnot r\lor s ⇒ p↔((q∧¬r)∨s)p\leftrightarrow((q\land\lnot r)\lor s)

Converse, Inverse, Contrapositive

Given p→qp\rightarrow q

  • Converse: q→pq\rightarrow p
  • Inverse: ¬p→¬q\lnot p\rightarrow \lnot q
  • Contrapositive: ¬q→¬p\lnot q\rightarrow \lnot p
  • Truth‐table property: p→qp\rightarrow q is logically equivalent to its contrapositive, but not to its inverse or converse.

Tautology, Contradiction, Contingency

  • Tautology: always TT (e.g. p∨¬pp\lor\lnot p).
  • Contradiction: always FF (e.g. p∧¬pp\land\lnot p).
  • Contingency: sometimes TT, sometimes FF (e.g. p∨qp\lor q).
  • Slide 19 provides illustrative truth tables.

Logical Equivalence

  • pp and qq are logically equivalent if p↔qp\leftrightarrow q is a tautology.
    • Denoted p≡qp\equiv q, p⇔qp\Leftrightarrow q, or p⟺qp\Longleftrightarrow q.
  • Demonstrations
    • Truth-table method (slide 22): (p∨q)∧q≡q(p\lor q)\land q \equiv q.
    • Algebraic method using equivalence laws (slide 23): ¬(p∨q)∨(¬p∧q)≡¬p\lnot(p\lor q)\lor(\lnot p\land q)\equiv\lnot p.

Catalogue of Equivalence Laws (slide 24)

  • Identity, Domination, Idempotent, Double-negation, Commutative, Associative, Distributive, De Morgan, Implication conversion, Biconditional conversion, Contrapositive, Absorption, Negation.
  • Emphasises ability to transform complex statements systematically.

Worked Law-Based Proofs

  • Prove p→(q→r)≡q→(p→r)p\rightarrow(q\rightarrow r)\equiv q\rightarrow(p\rightarrow r) via chain of replacements (slide 25).
  • Show tautology of p∧(¬p∨q)↔(p∧q)p\land(\lnot p\lor q)\leftrightarrow(p\land q) (slide 26) – critical for simplifying logical conditions in programming/specification.

Summary of Lecture Concepts

  • Definition & examples of propositions.
  • Compound propositions and six logical connectives.
  • Construction & interpretation of truth tables.
  • Translation between natural language and propositional formulas.
  • Converse, inverse, contrapositive notions and their equivalence relations.
  • Classification into tautology / contradiction / contingency.
  • Operator precedence conventions.
  • Logical equivalence, truth-table verification, and algebraic proof using equivalence laws.

Supplementary Exercises (selected)

  • Syntax check: identify malformed formulas, e.g. “(p → q)(→ r ∨ ¬q)” lacks connective between parenthetical groups.
  • Truth-value evaluation given [[p]]=T,[[q]]=F,[[r]]=T[[p]]=T, [[q]]=F, [[r]]=T: compute
    1. [[p∧(q∨r)]][[p\land(q\lor r)]]
    2. [[¬(p⊕q)→(p↔q)]][[\lnot(p\oplus q)\rightarrow(p\leftrightarrow q)]]
    3. [[¬p∧q]][[\lnot p\land q]]
  • Construct the full truth table for p→q∧r∨¬qp\rightarrow q\land r\lor\lnot q (be mindful of precedence).
  • Translation & manipulation with health/wealth/wise predicates; derive converse/inverse/contrapositive.
  • Classify each formula as tautology/contingency/contradiction.
  • Fill-in-the-blanks to recall specific laws (conversion, De Morgan, distributive, contrapositive, etc.).
  • Prove [¬(¬p→q)∨p]≡p∨¬q[\lnot(\lnot p\rightarrow q)\lor p]\equiv p\lor\lnot q by (a) truth table & (b) equivalence laws.

Practical/Real-World Relevance

  • Digital circuit design: conjunction ↔ AND-gate, disjunction ↔ OR-gate, negation ↔ NOT-gate.
  • Software specification & verification: implications capture pre-/post-conditions; tautologies assure invariant truths.
  • Database query optimisation: equivalence laws parallel relational algebra rewrites.
  • AI rule systems: contrapositive allows backward chaining; exclusive-or models mutually-exclusive conditions.
  • Ethical reasoning: clear separation of truth values prevents equivocation; helps analyse argument validity.

Foundational Connections

  • Forms basis for Predicate Logic (next topic) by adding quantifiers ∀,∃\forall,\exists.
  • Probability & discrete structures: logical events correspond to sets; ∨\lor maps to union, ∧\land to intersection, ¬\lnot to complement.
  • Set identities mirror logical equivalences (De Morgan between sets & logic).

Operator Precedence Reference (re-listed)

()  >  ¬  >  ∧  >  ∨  >  →  >  ↔( )\;>\;\lnot\;>\;\land\;>\;\lor\;>\;\rightarrow\;>\;\leftrightarrow

Key Takeaways

  • Master truth tables for mechanical certainty.
  • Learn key equivalence laws – they dramatically shorten proofs and simplify conditions.
  • Remember: implication ≡ contrapositive; biconditional captures equality of truth.
  • Evaluate real English statements carefully: OR is inclusive unless explicitly exclusive.
  • Practise translating both directions to reinforce comprehension.