Skip to main content

6.1 Propositions, Connectives, Truth Tables & Logical Equivalences

📚Module 06: Propositional Logic & Inference RulesTopic 6.1: Propositions, Connectives, Truth Tables & Equivalences⏱️5 min read
🎯High-Yield For:Semester Exams • GATE CSE • Technical Interviews

💡 Core Intuition: The 3-Second Mental Model​

Think of propositional logic like electrical circuits and binding legal contracts:

  1. The Proposition (Unambiguous Fact): "The server is running." It is either 100% True (TT) or 100% False (FF). There is zero middle ground, no "maybe," and no rhetorical questions.
  2. Compound Connectives:
    • Conjunction (AND ∧\land): Two switches in series. Current flows only if switch 1 AND switch 2 are closed.
    • Disjunction (OR ∨\lor): Two switches in parallel. Current flows if either switch is closed.
    • Implication (IF-THEN →\to): A conditional contract: "If you pay me $100, I will deliver the laptop." The contract is breached (False) in only one single scenario: you paid the $100, but I failed to deliver the laptop! If you never paid me, the contract was never violated, regardless of whether I gave you a laptop or not (Vacuous Truth).
  3. Tautology vs Contradiction:
    • Tautology: A statement wired so it is impossible to turn off (p∨¬pp \lor \neg p: "It is raining or it is not raining").
    • Contradiction: A short circuit wired so it can never turn on (p∧¬pp \land \neg p: "It is raining and it is not raining").

💻 Bridging to Computer Science: Boolean Circuits, Branching & SAT Solvers​

In computer systems:

  • CPU Control Units & ALU: Processors evaluate propositional logic at gigahertz clock rates using silicon logic gates (NAND, NOR, XOR).
  • Control Flow & Branch Prediction: If-statements if (A && !B || C) are compound propositional formulas evaluated via short-circuit evaluation.
  • SAT Solvers (Z3, MiniSat): Automated theorem provers and hardware verification engines solve the Boolean Satisfiability Problem (SAT) to verify microchip designs and formal software specifications.

⚡ Propositions & The Classical Laws of Thought​

📖Definition 6.1: Propositiondefinition

A proposition (or statement) is a declarative sentence that is either True (TT) or False (FF), but not both simultaneously.

  • Valid Propositions:
    • "New Delhi is the capital of India" (TT).
    • "5≤115 \le 11" (TT).
    • "Paris is the capital of USA" (FF).
    • "In any simple undirected graph, ∑deg⁡(v)=2∣E∣\sum \deg(v) = 2\vert E\vert" (TT).
  • Sentences that are NOT Propositions:
    • "x+y=zx + y = z" (Open mathematical predicate; truth value depends on unquantified variables x,y,zx, y, z).
    • "How are you?" (Interrogative question; carries no truth value).
    • "Read this carefully!" (Imperative command).
    • "It is cold today" (Subjective / vague statement without an objective threshold).
    • "This statement is false" (The Liar Paradox; self-referential contradiction).
📐Theorem 6.1: The Two Foundational Laws of Classical Logictheorem

In standard bivalent propositional logic, all propositions obey two fundamental axioms:

  1. Law of Non-Contradiction (LNC): A proposition cannot be both True and False simultaneously in the same sense: ¬(P∧¬P)≡T\neg(P \land \neg P) \equiv \mathbf{T}
  2. Law of Excluded Middle (LEM): Every proposition must be either True or its negation must be True; there is no third intermediate truth value: P∨¬P≡TP \lor \neg P \equiv \mathbf{T}

🔌 Compound Logical Connectives & Master Truth Tables​

The 6 Core Propositional Connectives & Operational Rules

Formal mathematical symbols, operational mechanics, and English semantics

🚫

Negation (¬p / ~p)

NOT Operator
  • Inverts truth value: ¬T = F, ¬F = T.
  • Unary operator with the highest binding precedence.
  • English: 'It is not the case that p', 'Not p'.
🤝

Conjunction (p ∧ q)

AND Operator
  • True if and only if BOTH p and q are True.
  • False if at least one operand is False.
  • English: 'p and q', 'p but q', 'p as well as q'.
🔀

Disjunction (p ∨ q)

Inclusive OR
  • True if AT LEAST ONE operand (p, q, or both) is True.
  • False ONLY when BOTH operands are False.
  • English: 'p or q (or both)'.
⚡

Exclusive OR (p ⊕ q)

XOR Operator
  • True when p and q have DIFFERENT truth values.
  • False when both are True or both are False.
  • Formal: (p ∨ q) ∧ ¬(p ∧ q).
➡️

Conditional (p → q)

Implication
  • p is Hypothesis (Antecedent); q is Conclusion (Consequent).
  • False ONLY when p = T and q = F. True in all other 3 cases!
  • Equivalence: p → q ≡ ¬p ∨ q.
🔄

Biconditional (p ↔ q)

Equivalence (XNOR)
  • True if and only if p and q have IDENTICAL truth values.
  • Formal: (p → q) ∧ (q → p) ≡ (p ∧ q) ∨ (¬p ∧ ¬q).
  • English: 'p if and only if q' (iff).

Master Truth Table of Binary Connectives​

ppqq¬p\neg pp∧qp \land qp∨qp \lor qp⊕qp \oplus qp→qp \to qp↔qp \leftrightarrow q
TTTTFFTTTTFFTTTT
TTFFFFFFTTTTFFFF
FFTTTTFFTTTTTTFF
FFFFTTFFFFFFTTTT

Operator Precedence Hierarchy in Logic

Binding order when evaluating unparenthesized propositional expressions

Precedence 1 (Highest)

Negation (¬ / ~)

1️⃣

Binds immediately to its adjacent propositional variable.

↓Next Highest Precedence
Precedence 2

Conjunction (∧)

2️⃣

Evaluated before disjunctions and conditionals.

↓Next Highest Precedence
Precedence 3

Disjunction (∨)

3️⃣

Evaluated after conjunctions.

↓Next Highest Precedence
Precedence 4

Conditional Implication (→)

4️⃣

Evaluated after all Boolean operations.

↓Lowest Precedence
Precedence 5 (Lowest)

Biconditional (↔)

5️⃣

Lowest binding affinity across the entire expression.


🔢 Truth Tables & Counting Boolean Functions​

📐Theorem 6.2: Propositional Truth Table & Function Countstheorem

Let nn be the number of distinct propositional variables:

  1. Number of Rows in Truth Table: Each variable has 22 possible truth assignments (TT or FF). Thus, a truth table over nn variables has: Total Rows=2n\text{Total Rows} = 2^n
  2. Total Number of Distinct Truth Functions: A truth function assigns either TT or FF to each of the 2n2^n rows. Thus, the total number of distinct Boolean truth functions of nn variables is: Total Distinct Functions=22n\text{Total Distinct Functions} = 2^{2^n}
    • For n=1n = 1: 221=22=42^{2^1} = 2^2 = 4 functions (F\mathbf{F}, pp, ¬p\neg p, T\mathbf{T}).
    • For n=2n = 2: 222=24=162^{2^2} = 2^4 = 16 distinct binary functions!

Master Inventory of All 16 Binary Truth Functions (n = 2)​

IndexTTTTTFTFFTFTFFFFCommon Mathematical NameSymbolic FormOperational Meaning
0FFFFFFFFContradiction (False)0/F\mathbf{0} / \mathbf{F}Null function
1FFFFFFTTJoint Denial (NOR)p↓qp \downarrow qPeirce arrow ¬(p∨q)\neg(p \lor q)
2FFFFTTFFConverse Non-Implication¬p∧q\neg p \land qqq but not pp
3FFFFTTTTNegation of pp¬p\neg pInverts pp
4FFTTFFFFNon-Implicationp∧¬qp \land \neg q¬(p→q)\neg(p \to q)
5FFTTFFTTNegation of qq¬q\neg qInverts qq
6FFTTTTFFExclusive OR (XOR)p⊕qp \oplus qDifferent truth values
7FFTTTTTTAlternative Denial (NAND)p↑qp \uparrow qSheffer stroke ¬(p∧q)\neg(p \land q)
8TTFFFFFFConjunction (AND)p∧qp \land qBoth True
9TTFFFFTTBiconditional (XNOR)p↔qp \leftrightarrow qIdentical truth values
10TTFFTTFFProjection qqqqIdentity of qq
11TTFFTTTTConditional Implicationp→qp \to q¬p∨q\neg p \lor q
12TTTTFFFFProjection ppppIdentity of pp
13TTTTFFTTConverse Implicationq→pq \to pp∨¬qp \lor \neg q
14TTTTTTFFDisjunction (OR)p∨qp \lor qAt least one True
15TTTTTTTTTautology (True)1/T\mathbf{1} / \mathbf{T}Universal True

⚖️ Classifying Propositional Formulas​

📖Definition 6.2: Tautology, Contradiction, Contingency & Satisfiabilitydefinition

Let P(p1,p2,…,pn)P(p_1, p_2, \dots, p_n) be a compound proposition constructed from nn propositional variables:

  1. Tautology (Valid): Evaluates to True (TT) in every single row of its truth table (2n2^n True entries).
    • Canonical example: p∨¬pp \lor \neg p (Law of Excluded Middle).
  2. Contradiction (Unsatisfiable / Fallacy): Evaluates to False (FF) in every single row of its truth table (2n2^n False entries).
    • Canonical example: p∧¬pp \land \neg p (Law of Non-Contradiction).
  3. Contingency: Evaluates to True for at least one truth assignment AND False for at least one truth assignment (neither tautology nor contradiction).
    • Canonical example: p→qp \to q, p∨qp \lor q.
  4. Satisfiable: A compound proposition is satisfiable if there exists at least one truth assignment that makes the formula True (TT). Satisfiable Formulas=Tautologies∪Contingencies\text{Satisfiable Formulas} = \text{Tautologies} \cup \text{Contingencies} Unsatisfiable Formulas≡Contradictions\text{Unsatisfiable Formulas} \equiv \text{Contradictions}

Propositional Formula Taxonomy: Tautology vs Contradiction vs Contingency

Partitioning all Boolean formulas by truth table output columns

Tautology (Valid)

Always True (100% T)

🌟
Dominant Architecture / DomainUniversal Validity
  • •Every row evaluates to True.
  • •Negation of a tautology is a Contradiction: ¬(Tautology) ≡ Contradiction.
  • •Core SAT status: Automatically Satisfiable.
"Holds True in all possible mathematical universes."
Contradiction

Always False (100% F)

💥
Dominant Architecture / DomainUnsatisfiability
  • •Every row evaluates to False.
  • •Negation of a contradiction is a Tautology: ¬(Contradiction) ≡ Tautology.
  • •Core SAT status: Strictly Unsatisfiable.
"Cannot be satisfied by any physical assignment."
Contingency

Mixed Truth Values (Some T, Some F)

⚖️
Dominant Architecture / DomainConditional Reality
  • •Contains at least one T and at least one F.
  • •Negation of a contingency is always another Contingency!
  • •Core SAT status: Satisfiable (not a tautology).
"Truth value depends entirely on variable assignments."

🧰 Functionally Complete Sets of Connectives​

📖Definition 6.3: Functional Completenessdefinition

A set of logical connectives is functionally complete if and only if every possible Boolean truth function (all 22n2^{2^n} functions for any nn) can be expressed using only the connectives in that set.

  1. Standard Complete Pairs:
    • {¬,∧}\{\neg, \land\}: Since p∨q≡¬(¬p∧¬q)p \lor q \equiv \neg(\neg p \land \neg q) and p→q≡¬(p∧¬q)p \to q \equiv \neg(p \land \neg q).
    • {¬,∨}\{\neg, \lor\}: Since p∧q≡¬(¬p∨¬q)p \land q \equiv \neg(\neg p \lor \neg q) and p→q≡¬p∨qp \to q \equiv \neg p \lor q.
    • {¬,→}\{\neg, \to\}: Since p∨q≡¬p→qp \lor q \equiv \neg p \to q and p∧q≡¬(p→¬q)p \land q \equiv \neg(p \to \neg q).
  2. Universal Singletons (Minimal Sets of Size 1):
    • NAND (↑\uparrow, Sheffer Stroke): Alone forms a complete set!
    • NOR (↓\downarrow, Peirce Arrow): Alone forms a complete set!
  3. Incomplete Sets:
    • {∧,∨}\{\land, \lor\}: Incomplete! Cannot express ¬p\neg p because any formula using only ∧\land and ∨\lor is monotone (if all inputs are TT, output is strictly TT; cannot invert TT to FF).
    • {¬,↔}\{\neg, \leftrightarrow\} or {¬,⊕}\{\neg, \oplus\}: Incomplete! Affine / linear functions only; cannot express non-linear conjunction p∧qp \land q.

Expressing Fundamental Connectives using Universal Gates​

Target OperationUsing ONLY NAND (↑\uparrow)Gate CountUsing ONLY NOR (↓\downarrow)Gate Count
NOT (¬p\neg p)p↑pp \uparrow p1p↓pp \downarrow p1
AND (p∧qp \land q)(p↑q)↑(p↑q)(p \uparrow q) \uparrow (p \uparrow q)2(p↓p)↓(q↓q)(p \downarrow p) \downarrow (q \downarrow q)3
OR (p∨qp \lor q)(p↑p)↑(q↑q)(p \uparrow p) \uparrow (q \uparrow q)3(p↓q)↓(p↓q)(p \downarrow q) \downarrow (p \downarrow q)2
Conditional (p→qp \to q)p↑(q↑q)p \uparrow (q \uparrow q)2((p↓p)↓q)↓((p↓p)↓q)((p \downarrow p) \downarrow q) \downarrow ((p \downarrow p) \downarrow q)4
Biconditional (p↔qp \leftrightarrow q)(p↑q)↑((p↑p)↑(q↑q))(p \uparrow q) \uparrow ((p \uparrow p) \uparrow (q \uparrow q))4((p↓q)↓(p↓q))↓((p↓p)↓(q↓q))((p \downarrow q) \downarrow (p \downarrow q)) \downarrow ((p \downarrow p) \downarrow (q \downarrow q))4

🏛️ System of Fundamental Logical Equivalences​

Two compound propositions PP and QQ are logically equivalent (denoted P≡QP \equiv Q or P⇔QP \Leftrightarrow Q) if and only if P↔QP \leftrightarrow Q is a tautology.

⚡Law 6.1: Master Inventory of Logical Equivalenceslaw
Law NameConjunction Form (∧\land)Disjunction Form (∨\lor)
Identity Lawsp∧T≡pp \land \mathbf{T} \equiv pp∨F≡pp \lor \mathbf{F} \equiv p
Domination Lawsp∧F≡Fp \land \mathbf{F} \equiv \mathbf{F}p∨T≡Tp \lor \mathbf{T} \equiv \mathbf{T}
Idempotent Lawsp∧p≡pp \land p \equiv pp∨p≡pp \lor p \equiv p
Double Negation¬(¬p)≡p\neg(\neg p) \equiv p—
Commutative Lawsp∧q≡q∧pp \land q \equiv q \land pp∨q≡q∨pp \lor q \equiv q \lor p
Associative Laws(p∧q)∧r≡p∧(q∧r)(p \land q) \land r \equiv p \land (q \land r)(p∨q)∨r≡p∨(q∨r)(p \lor q) \lor r \equiv p \lor (q \lor r)
Distributive Lawsp∧(q∨r)≡(p∧q)∨(p∧r)p \land (q \lor r) \equiv (p \land q) \lor (p \land r)p∨(q∧r)≡(p∨q)∧(p∨r)p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)
De Morgan's Laws¬(p∧q)≡¬p∨¬q\neg(p \land q) \equiv \neg p \lor \neg q¬(p∨q)≡¬p∧¬q\neg(p \lor q) \equiv \neg p \land \neg q
Absorption Lawsp∧(p∨q)≡pp \land (p \lor q) \equiv pp∨(p∧q)≡pp \lor (p \land q) \equiv p
Negation Lawsp∧¬p≡Fp \land \neg p \equiv \mathbf{F}p∨¬p≡Tp \lor \neg p \equiv \mathbf{T}
⚡Law 6.2: Conditional & Biconditional Equivalenceslaw
  1. Conditional Implication Law: p→q≡¬p∨qp \to q \equiv \neg p \lor q
  2. Negation of Conditional: ¬(p→q)≡¬(¬p∨q)≡p∧¬q\neg(p \to q) \equiv \neg(\neg p \lor q) \equiv p \land \neg q
  3. Contrapositive Law: p→q≡¬q→¬pp \to q \equiv \neg q \to \neg p
  4. Exportation Law: (p∧q)→r≡p→(q→r)(p \land q) \to r \equiv p \to (q \to r)
  5. Biconditional Decomposition: p↔q≡(p→q)∧(q→p)≡(¬p∨q)∧(¬q∨p)≡(p∧q)∨(¬p∧¬q)p \leftrightarrow q \equiv (p \to q) \land (q \to p) \equiv (\neg p \lor q) \land (\neg q \lor p) \equiv (p \land q) \lor (\neg p \land \neg q)
  6. Negation of Biconditional (XOR): ¬(p↔q)≡p⊕q≡(p∧¬q)∨(¬p∧q)\neg(p \leftrightarrow q) \equiv p \oplus q \equiv (p \land \neg q) \lor (\neg p \land q)

📝 Step-by-Step Worked Examples​

Example 1: Proving a Tautology via Truth Table & Logical Equivalence​

Problem Statement: Prove that [(p→q)∧p]→q[(p \to q) \land p] \to q is a tautology (the classical Modus Ponens tautology):

  1. Using a complete Truth Table.
  2. Using algebraic logical equivalences.

Step-by-Step Solution:

  1. Step 1: Truth Table Verification
ppqqp→qp \to q(p→q)∧p(p \to q) \land p[(p→q)∧p]→q[(p \to q) \land p] \to q
TTTTTTTTTT
TTFFFFFFTT
FFTTTTFFTT
FFFFTTFFTT

Every entry in the final column is TT. Thus, the statement is a Tautology.

  1. Step 2: Algebraic Verification
    • Apply the Implication Law to p→qp \to q: [(p→q)∧p]→q≡[(¬p∨q)∧p]→q[(p \to q) \land p] \to q \equiv [(\neg p \lor q) \land p] \to q
    • Distribute pp over (¬p∨q)(\neg p \lor q): [(¬p∧p)∨(q∧p)]→q[(\neg p \land p) \lor (q \land p)] \to q
    • By the Negation Law, ¬p∧p≡F\neg p \land p \equiv \mathbf{F}: [F∨(q∧p)]→q≡(p∧q)→q[\mathbf{F} \lor (q \land p)] \to q \equiv (p \land q) \to q
    • Apply the Implication Law to (p∧q)→q(p \land q) \to q: ¬(p∧q)∨q\neg(p \land q) \lor q
    • Apply De Morgan's Law: (¬p∨¬q)∨q(\neg p \lor \neg q) \lor q
    • Use Associativity to group ¬q∨q\neg q \lor q: ¬p∨(¬q∨q)≡¬p∨T≡T\neg p \lor (\neg q \lor q) \equiv \neg p \lor \mathbf{T} \equiv \mathbf{T}
    • The expression reduces strictly to T\mathbf{T}, proving it is a tautology!

Key Takeaway: Algebraic reductions using De Morgan and the Implication Law eliminate the need for 2n2^n-row truth tables when verifying tautologies.


Example 2: Verifying Functional Completeness of Implication and Falsehood​

Problem Statement: Determine whether the set of connectives {→,F}\{\to, \mathbf{F}\} is functionally complete.

Step-by-Step Solution:

  1. Recall the Criteria: A set is functionally complete if it can express {¬,∧}\{\neg, \land\} or {¬,∨}\{\neg, \lor\}.
  2. Can we express Negation (¬p\neg p)?
    • In truth tables, when q=Fq = \mathbf{F}, p→Fp \to \mathbf{F} evaluates to:
      • T→F=FT \to F = F
      • F→F=TF \to F = T
    • Thus: ¬p≡p→F\neg p \equiv p \to \mathbf{F}
    • Negation is successfully expressed using only →\to and F\mathbf{F}!
  3. Can we express Disjunction (p∨qp \lor q)?
    • Recall p→q≡¬p∨qp \to q \equiv \neg p \lor q.
    • Replacing pp with ¬p\neg p: ¬p→q≡¬(¬p)∨q≡p∨q\neg p \to q \equiv \neg(\neg p) \lor q \equiv p \lor q
    • Substituting our formula for ¬p\neg p: p∨q≡(p→F)→qp \lor q \equiv (p \to \mathbf{F}) \to q
    • Disjunction is successfully expressed!
  4. Conclusion: Since both ¬\neg and ∨\lor are expressible, {→,F}\{\to, \mathbf{F}\} is strictly functionally complete!

Example 3: Determining Satisfiability of a Compound Formula​

Problem Statement: Determine whether the formula ϕ=(p∨q)∧(¬p∨¬q)∧(p∨¬q)∧(¬p∨q)\phi = (p \lor q) \land (\neg p \lor \neg q) \land (p \lor \neg q) \land (\neg p \lor q) is satisfiable.

Step-by-Step Solution:

  1. Step 1: Simplify First Pair of Clauses

    • Clause 1: (p∨q)(p \lor q)
    • Clause 2: (¬p∨¬q)(\neg p \lor \neg q)
    • Together, (p∨q)∧(¬p∨¬q)(p \lor q) \land (\neg p \lor \neg q) is the exact definition of Exclusive OR (p⊕qp \oplus q)!
    • This requires pp and qq to have different truth values:
      • Case A: p=T,q=Fp = T, q = F
      • Case B: p=F,q=Tp = F, q = T
  2. Step 2: Simplify Second Pair of Clauses

    • Clause 3: (p∨¬q)≡q→p(p \lor \neg q) \equiv q \to p
    • Clause 4: (¬p∨q)≡p→q(\neg p \lor q) \equiv p \to q
    • Together, (p→q)∧(q→p)(p \to q) \land (q \to p) is the exact definition of Biconditional (p↔qp \leftrightarrow q)!
    • This requires pp and qq to have identical truth values:
      • Case 1: p=T,q=Tp = T, q = T
      • Case 2: p=F,q=Fp = F, q = F
  3. Step 3: Combine Requirements

    • The overall formula is: ϕ≡(p⊕q)∧(p↔q)\phi \equiv (p \oplus q) \land (p \leftrightarrow q)
    • Since p⊕q≡¬(p↔q)p \oplus q \equiv \neg(p \leftrightarrow q), this is equivalent to: ¬(p↔q)∧(p↔q)≡F\neg(p \leftrightarrow q) \land (p \leftrightarrow q) \equiv \mathbf{F}
    • The formula is a Contradiction!
    • Because no assignment can ever make it True, ϕ\phi is Unsatisfiable.

Key Takeaway: Recognizing macro-equivalences (like XOR and Biconditional) allows instant unsatisfiability detection without testing all truth assignments.


🎯 Exam & Interview Pitfall Check​

Core Conceptual Questions

Question 1: If an implication p→qp \to q is True, does that mean pp caused qq? Key Focus Points: No! Propositional implication (p→qp \to q) is a material conditional, NOT causal or temporal. For example, "If 2+2=42 + 2 = 4, then Paris is in France" is 100% True in formal logic because both antecedent and consequent are True (T→T=TT \to T = T), even though mathematics does not cause French geography!

Question 2: What is "Vacuous Truth"? Key Focus Points: When the antecedent pp is False, the implication p→qp \to q is automatically True (F→T=TF \to T = T and F→F=TF \to F = T), regardless of the truth value of qq. For example, "If pigs can fly, then 1=21 = 2" is a True statement in propositional logic because pigs cannot fly (p=Fp = F).

Common Interview Traps: Architectural Trade-Offs

Trap 1: Confusing Inclusive OR with Exclusive OR Why it fails: In everyday English, "Do you want coffee or tea?" implies Exclusive OR (pick one, not both). In mathematical logic, p∨qp \lor q is strictly Inclusive OR: it is True if both pp and qq are True! Always assume inclusive OR unless ⊕\oplus is explicitly specified.

Trap 2: Forgetting the Negation of an Implication Why it fails: Students frequently write ¬(p→q)≡p→¬q\neg(p \to q) \equiv p \to \neg q. This is completely wrong! By the Implication Law: ¬(p→q)≡¬(¬p∨q)≡p∧¬q\neg(p \to q) \equiv \neg(\neg p \lor q) \equiv p \land \neg q. The negation of an implication is an AND statement, not another implication!

Trap 3: Believing that {∧,∨}\{\land, \lor\} is Functionally Complete Why it fails: Connectives {∧,∨}\{\land, \lor\} can never invert a truth value from TT to FF! Any circuit built purely with AND and OR gates outputs 11 whenever all inputs are 11 (Monotone boolean property). Negation (¬\neg) or an inverting gate is strictly mandatory for functional completeness.

💬

Discussion & Doubts