Discrete Mathematics: Logical Equivalence and Laws of Logic

Foundations of Propositional Logic: Logical Equivalence and Laws of Logic

  • Prepared by: Randy O. Bosquillos
  • Course Context: Discrete Mathematics - Foundations of Propositional Logic
  • Core Learning Objectives:
    • Understand Logical Equivalence: Define logical equivalence and recognize when two propositions have identical truth values across all truth value assignments.
    • Apply Laws of Logic: Identify and correctly apply fundamental laws of logic, including De Morgan's, Distributive, and Identity laws.
    • Simplify Logical Expressions: Utilize laws of logic to transform and simplify complex logical expressions into equivalent, simpler forms.

Logical Equivalence: Definition and Core Concepts

  • Definition: Two propositions pp and qq are logically equivalent if they possess identical truth values under every possible truth assignment for their constituent variables. This relation is written as pqp \equiv q or pqp \Leftrightarrow q.
  • Truth Value Consistency: When pqp \equiv q, regardless of the truth values assigned to the variable inputs, both logical expressions yield the exact same output.
  • Biconditional Tautology Relationship: pqp \equiv q if and only if the biconditional statement pqp \leftrightarrow q is a tautology (an expression that evaluates to TRUE in all possible cases).
  • Fundamental Example:
    • Conditional expression: pqp \rightarrow q
    • Disjunctive expression: ¬pq\neg p \vee q
    • Logical equivalence: pq¬pqp \rightarrow q \equiv \neg p \vee q
  • Practical Applications: Logical equivalence provides the foundation for simplifying complex logical expressions, optimizing digital circuit designs, writing efficient algorithms, and constructing formal mathematical proofs in discrete mathematics.

Truth Table Verification and Conditional Statements

  • Conditional Statement (pqp \rightarrow q):
    • Statement form: "If pp, then qq".
    • Evaluation rule: Evaluates to FALSE if and only if pp is TRUE and qq is FALSE. Evaluates to TRUE in all other cases.
    • Truth evaluation breakdown:
    • When p=TRUEp = \text{TRUE} and q=TRUEq = \text{TRUE}, pq=TRUEp \rightarrow q = \text{TRUE}.
    • When p=TRUEp = \text{TRUE} and q=FALSEq = \text{FALSE}, pq=FALSEp \rightarrow q = \text{FALSE}.
    • When p=FALSEp = \text{FALSE} and q=TRUEq = \text{TRUE}, pq=TRUEp \rightarrow q = \text{TRUE}.
    • When p=FALSEp = \text{FALSE} and q=FALSEq = \text{FALSE}, pq=TRUEp \rightarrow q = \text{TRUE}.
  • Disjunction Form (¬pq\neg p \vee q):
    • Statement form: "not pp or qq".
    • Evaluation rule: Evaluates to FALSE if and only if ¬p\neg p is FALSE and qq is FALSE (which occurs when p=TRUEp = \text{TRUE} and q=FALSEq = \text{FALSE}).
    • Truth evaluation breakdown:
    • When p=TRUEp = \text{TRUE} and q=TRUEq = \text{TRUE}, ¬pq=TRUE\neg p \vee q = \text{TRUE}.
    • When p=TRUEp = \text{TRUE} and q=FALSEq = \text{FALSE}, ¬pq=FALSE\neg p \vee q = \text{FALSE}.
    • When p=FALSEp = \text{FALSE} and q=TRUEq = \text{TRUE}, ¬pq=TRUE\neg p \vee q = \text{TRUE}.
    • When p=FALSEp = \text{FALSE} and q=FALSEq = \text{FALSE}, ¬pq=TRUE\neg p \vee q = \text{TRUE}.
  • Row-by-Row Truth Table Comparison (pq¬pqp \rightarrow q \equiv \neg p \vee q):
    • Row 1: p=TRUE,q=TRUE    pq=TRUE,¬pq=TRUEp = \text{TRUE}, q = \text{TRUE} \implies p \rightarrow q = \text{TRUE}, \neg p \vee q = \text{TRUE} (Matched)
    • Row 2: p=TRUE,q=FALSE    pq=FALSE,¬pq=FALSEp = \text{TRUE}, q = \text{FALSE} \implies p \rightarrow q = \text{FALSE}, \neg p \vee q = \text{FALSE} (Matched)
    • Row 3: p=FALSE,q=TRUE    pq=TRUE,¬pq=TRUEp = \text{FALSE}, q = \text{TRUE} \implies p \rightarrow q = \text{TRUE}, \neg p \vee q = \text{TRUE} (Matched)
    • Row 4: p=FALSE,q=FALSE    pq=TRUE,¬pq=TRUEp = \text{FALSE}, q = \text{FALSE} \implies p \rightarrow q = \text{TRUE}, \neg p \vee q = \text{TRUE} (Matched)

Fundamental Laws of Logic

  • Overview: Laws of Logic are fundamental rules governing the manipulation and simplification of logical expressions using connectives such as \wedge (AND), \vee (OR), ¬\neg (NOT), and \rightarrow (Implication).
  • Identity Laws:
    • Conjunction Identity: pTpp \wedge T \equiv p
    • ANDing any proposition pp with TRUE (TT) always results in pp itself.
    • Example: "It is raining" T\wedge T \equiv "It is raining".
    • TT serves as the identity element for the AND (\wedge) operation.
    • Disjunction Identity: pFpp \vee F \equiv p
    • ORing any proposition pp with FALSE (FF) always results in pp itself.
    • Example: "It is raining" F\vee F \equiv "It is raining".
    • FF serves as the identity element for the OR (\vee) operation.
  • Domination Laws:
    • OR Domination: pTTp \vee T \equiv T
    • ORing any proposition pp with TRUE (TT) yields TRUE, regardless of pp's truth value.
    • When p=TRUEp = \text{TRUE}, TT=TRUET \vee T = \text{TRUE}.
    • When p=FALSEp = \text{FALSE}, FT=TRUEF \vee T = \text{TRUE}.
    • Truth dominates in disjunction.
    • AND Domination: pFFp \wedge F \equiv F
    • ANDing any proposition pp with FALSE (FF) yields FALSE, regardless of pp's truth value.
    • When p=TRUEp = \text{TRUE}, TF=FALSET \wedge F = \text{FALSE}.
    • When p=FALSEp = \text{FALSE}, FF=FALSEF \wedge F = \text{FALSE}.
    • Falsehood dominates in conjunction.
  • Idempotent Laws:
    • OR Idempotent Law: pppp \vee p \equiv p
    • A proposition OR-ed with itself returns the original proposition.
    • Example: "It is raining OR it is raining" \equiv "It is raining".
    • Verification: If p=TRUEp = \text{TRUE}, TT=TRUET \vee T = \text{TRUE}; if p=FALSEp = \text{FALSE}, FF=FALSEF \vee F = \text{FALSE}.
    • AND Idempotent Law: pppp \wedge p \equiv p
    • A proposition AND-ed with itself returns the original proposition.
    • Example: "It is raining AND it is raining" \equiv "It is raining".
    • Verification: If p=TRUEp = \text{TRUE}, TT=TRUET \wedge T = \text{TRUE}; if p=FALSEp = \text{FALSE}, FF=FALSEF \wedge F = \text{FALSE}.
  • Double Negation Law:
    • Formulation: ¬(¬p)p\neg(\neg p) \equiv p
    • Principle: Negating a proposition twice cancels the negation and returns the original proposition.
    • Truth Table Verification:
    • When p=TRUEp = \text{TRUE}, ¬p=FALSE\neg p = \text{FALSE}, leading to ¬(¬p)=TRUE\neg(\neg p) = \text{TRUE}.
    • When p=FALSEp = \text{FALSE}, ¬p=TRUE\neg p = \text{TRUE}, leading to ¬(¬p)=FALSE\neg(\neg p) = \text{FALSE}.
    • Intuition: A statement that is "not false" is logically true.
    • Example: Let p=p = "It is raining." Then ¬p=\neg p = "It is not raining," and ¬(¬p)=\neg(\neg p) = "It is not the case that it is not raining," which simplifies to "It is raining."
    • Application in Simplification: ¬(¬p)qpq\neg(\neg p) \vee q \equiv p \vee q.
  • Complement Laws:
    • Tautology Form: p¬pTp \vee \neg p \equiv T
    • The disjunction of a proposition and its negation is always TRUE (a tautology).
    • Verification: If p=TRUEp = \text{TRUE}, TF=TRUET \vee F = \text{TRUE}; if p=FALSEp = \text{FALSE}, FT=TRUEF \vee T = \text{TRUE}.
    • Contradiction Form: p¬pFp \wedge \neg p \equiv F
    • The conjunction of a proposition and its negation is always FALSE (a contradiction).
    • Verification: If p=TRUEp = \text{TRUE}, TF=FALSET \wedge F = \text{FALSE}; if p=FALSEp = \text{FALSE}, FT=FALSEF \wedge T = \text{FALSE}.
  • Commutative Laws:
    • Disjunction (OR): pqqpp \vee q \equiv q \vee p
    • The order of operands in a disjunction does not alter the truth value.
    • Example: "It is raining OR it is cold" \equiv "It is cold OR it is raining".
    • Conjunction (AND): pqqpp \wedge q \equiv q \wedge p
    • The order of operands in a conjunction does not alter the truth value.
    • Example: "It is raining AND it is cold" \equiv "It is cold AND it is raining".
  • Associative Laws:
    • Disjunction (OR): (pq)rp(qr)(p \vee q) \vee r \equiv p \vee (q \vee r)
    • Grouping disjuncts with parentheses does not affect the truth value.
    • Example: (TF)TT(FT)T(T \vee F) \vee T \equiv T \vee (F \vee T) \equiv T.
    • Conjunction (AND): (pq)rp(qr)(p \wedge q) \wedge r \equiv p \wedge (q \wedge r)
    • Grouping conjuncts with parentheses does not affect the truth value.
    • Example: (TT)FT(TF)F(T \wedge T) \wedge F \equiv T \wedge (T \wedge F) \equiv F.
  • Distributive Laws:
    • First Distributive Law (OR over AND): p(qr)(pq)(pr)p \vee (q \wedge r) \equiv (p \vee q) \wedge (p \vee r)
    • Disjunction distributes across conjunction. pp acts as the pivot element, with qq and rr as terms.
    • Second Distributive Law (AND over OR): p(qr)(pq)(pr)p \wedge (q \vee r) \equiv (p \wedge q) \vee (p \wedge r)
    • Conjunction distributes across disjunction.
    • Bi-directionality: Both laws hold symmetrically from left-to-right (expansion) and right-to-left (factoring).
  • De Morgan's Laws:
    • Law 1 (Negation of AND): ¬(pq)¬p¬q\neg(p \wedge q) \equiv \neg p \vee \neg q
    • The negation of a conjunction equals the disjunction of the individual negations.
    • Example: "It is NOT the case that (it is raining AND cold)" \equiv "It is NOT raining OR it is NOT cold."
    • Law 2 (Negation of OR): ¬(pq)¬p¬q\neg(p \vee q) \equiv \neg p \wedge \neg q
    • The negation of a disjunction equals the conjunction of the individual negations.
    • Example: "It is NOT the case that (it is raining OR windy)" \equiv "It is NOT raining AND it is NOT windy."
    • Detailed Application Step:
    1. Identify expression ¬(pq)\neg(p \wedge q).
    2. Apply De Morgan's Law: distribute negation to each variable and flip operator from \wedge to \vee.
    3. Result: ¬p¬q\neg p \vee \neg q, verified via matching truth table rows.
  • Absorption Laws:
    • First Absorption Law: p(pq)pp \vee (p \wedge q) \equiv p
    • If pp is TRUE, the entire disjunction evaluates to TRUE. If pp is FALSE, pqp \wedge q is FALSE, making the disjunction FALSE. The larger term absorbs the smaller intersection.
    • Second Absorption Law: p(pq)pp \wedge (p \vee q) \equiv p
    • If pp is FALSE, the entire conjunction evaluates to FALSE. If pp is TRUE, pqp \vee q is TRUE, making the conjunction TRUE. The smaller term absorbs the larger union.
  • Implication Law:
    • Formulation: pq¬pqp \rightarrow q \equiv \neg p \vee q
    • Explanation: Replaces the conditional operator \rightarrow with disjunction \vee, allowing application of De Morgan's and Distributive laws.
    • Example: "If it rains, the ground is wet" \equiv "It does not rain, or the ground is wet".

Step-by-Step Expression Simplification Examples

  • Example 1: Simplification of ¬(pq)q\neg(p \wedge q) \vee q
    • Step 1 (Identify Expression): Start with ¬(pq)q\neg(p \wedge q) \vee q. Recognize that De Morgan's Law applies to ¬(pq)\neg(p \wedge q).
    • Step 2 (Apply De Morgan's Law): ¬(pq)¬p¬q\neg(p \wedge q) \equiv \neg p \vee \neg q. Substitute into the expression to obtain (¬p¬q)q(\neg p \vee \neg q) \vee q.
    • Step 3 (Simplify & Verify):
    • Group terms using the Associative Law: ¬p(¬qq)\neg p \vee (\neg q \vee q)
    • Apply Complement Law (¬qqT\neg q \vee q \equiv T): ¬pT\neg p \vee T
    • Apply Domination Law (¬pTT\neg p \vee T \equiv T): TT
  • Example 2: Comprehensive Step Breakdown of ¬(pq)q\neg(p \wedge q) \vee q
    • Step 1 (De Morgan's Law): ¬(pq)q(¬p¬q)q\neg(p \wedge q) \vee q \equiv (\neg p \vee \neg q) \vee q
    • Step 2 (Associative Law): (¬p¬q)q¬p(¬qq)(\neg p \vee \neg q) \vee q \equiv \neg p \vee (\neg q \vee q)
    • Step 3 (Complement & Domination Laws):
    • Complement Law: ¬qqT\neg q \vee q \equiv T
    • Expression becomes: ¬pT\neg p \vee T
    • Domination Law: ¬pTT\neg p \vee T \equiv T
  • Example 3: Simplification of (pq)(p¬q)(p \wedge q) \vee (p \wedge \neg q)
    • Step 1 (Identify Expression): Start with (pq)(p¬q)(p \wedge q) \vee (p \wedge \neg q).
    • Step 2 (Apply Distributive Law): Factor out pp:
    • (pq)(p¬q)p(q¬q)(p \wedge q) \vee (p \wedge \neg q) \equiv p \wedge (q \vee \neg q)
    • Step 3 (Apply Complement & Identity Laws):
    • Apply Complement Law (q¬qTq \vee \neg q \equiv T): pTp \wedge T
    • Apply Identity Law (pTpp \wedge T \equiv p): pp
    • Final simplified form: pp
  • Example 4: Simplification of p(¬pq)p \vee (\neg p \wedge q)
    • Step 1 (Apply Distributive Law): Distribute pp \vee across the conjunction:
    • p(¬pq)(p¬p)(pq)p \vee (\neg p \wedge q) \equiv (p \vee \neg p) \wedge (p \vee q)
    • Step 2 (Apply Complement Law):
    • Since p¬pTp \vee \neg p \equiv T, the expression becomes T(pq)T \wedge (p \vee q)
    • Step 3 (Apply Identity Law):
    • T(pq)pqT \wedge (p \vee q) \equiv p \vee q
    • Final simplified form: pqp \vee q

Class Activity Problems and Formal Solutions

  • Problem 1: Simplify ¬(pq)q\neg(p \wedge q) \vee q using De Morgan's and Absorption/Domination Laws. Show each step.
    • Step 1: Apply De Morgan's Law: ¬(pq)q(¬p¬q)q\neg(p \wedge q) \vee q \equiv (\neg p \vee \neg q) \vee q
    • Step 2: Apply Associative Law: ¬p(¬qq)\neg p \vee (\neg q \vee q)
    • Step 3: Apply Complement Law: ¬pT\neg p \vee T
    • Step 4: Apply Domination Law: TT
  • Problem 2: Prove p(pq)p \rightarrow (p \vee q) is a tautology using the Implication Law and Identity/Domination Laws.
    • Step 1: Apply Implication Law to the outer conditional: p(pq)¬p(pq)p \rightarrow (p \vee q) \equiv \neg p \vee (p \vee q)
    • Step 2: Apply Associative Law to regroup: (¬pp)q(\neg p \vee p) \vee q
    • Step 3: Apply Complement Law (¬ppT\neg p \vee p \equiv T): TqT \vee q
    • Step 4: Apply Domination Law (TqTT \vee q \equiv T): TT
    • Conclusion: Since the expression evaluates to TRUE (TT) for all truth assignments, p(pq)p \rightarrow (p \vee q) is a tautology.
  • Problem 3: Simplify (pq)(¬pq)(p \wedge q) \vee (\neg p \wedge q) using Distributive and Complement Laws.
    • Step 1: Apply Distributive Law (factor out qq): (pq)(¬pq)(p¬p)q(p \wedge q) \vee (\neg p \wedge q) \equiv (p \vee \neg p) \wedge q
    • Step 2: Apply Complement Law (p¬pTp \vee \neg p \equiv T): TqT \wedge q
    • Step 3: Apply Identity Law (TqqT \wedge q \equiv q): qq
    • Conclusion: Simplest form is qq.
  • Summary Answer Key:
    • 1: pTpp \wedge T \equiv p (Identity Law)
    • 2: ¬(pq)¬p¬q\neg(p \wedge q) \equiv \neg p \vee \neg q (De Morgan's Law)
    • 3: pq¬pqp \rightarrow q \equiv \neg p \vee q (Implication Law)
    • 4: p(pq)pp \vee (p \wedge q) \equiv p (Absorption Law)
    • 5: ¬(¬p)p\neg(\neg p) \equiv p (Double Negation Law)

Key Takeaways

  • Logical Equivalence: Two propositions are logically equivalent (pqp \equiv q) if and only if they yield identical truth values under every possible variable assignment, or equivalently, if pqp \leftrightarrow q is a tautology.
  • Laws of Logic as Algebraic Tools: Fundamental laws—including De Morgan's, Distributive, Absorption, Identity, Domination, Idempotent, and Implication laws—provide standard rules for manipulating and transforming complex logical expressions.
  • Systematic Simplification Techniques: Applying logic laws step-by-step allows complex logical propositions to be reduced to equivalent minimal forms, facilitating theoretical proofs, algorithm optimization, and digital circuit simplification.