Skip to content

Propositional Logic

  • A declarative statement
  • Has a definite truth value: True (T) or False (F)
  • Cannot be both true and false simultaneously

Examples:

  • “2 + 3 = 5” → Proposition (True)
  • “Paris is in France” → Proposition (True)
  • “5 > 10” → Proposition (False)
  • “Close the door” → Not a proposition (command)
  • “What time is it?” → Not a proposition (question)
  • “x + 2 = 5” → Not a proposition (depends on x)

Non-propositions:

  • Questions
  • Commands
  • Exclamations
  • Statements with variables (until assigned values)

Atomic Proposition:

  • Single, indivisible statement
  • Cannot be broken down further
  • Denoted by: p, q, r, s, etc.
  • Examples:
    • p: “It is raining”
    • q: “The sun is shining”

Compound Proposition:

  • Formed by combining atomic propositions using logical connectives
  • Examples:
    • p∧qp \land q: “It is raining AND the sun is shining”
    • p∨qp \lor q: “It is raining OR the sun is shining”
    • ¬p\neg p: “It is NOT raining”

1. NOT (Negation) ¬p\neg p

p¬p\neg p
TF
FT
  • Reverses truth value
  • Also written as: ~p, ¬p, !p

2. AND (Conjunction) p∧qp \land q

pqp∧qp \land q
TTT
TFF
FTF
FFF
  • True only when BOTH are true
  • Also written as: p ∧ q, p · q, p & q

3. OR (Disjunction) p∨qp \lor q

pqp∨qp \lor q
TTT
TFT
FTT
FFF
  • True when AT LEAST ONE is true
  • Inclusive OR (both can be true)
  • Also written as: p ∨ q, p + q, p | q

4. XOR (Exclusive OR) p⊕qp \oplus q

pqp⊕qp \oplus q
TTF
TFT
FTT
FFF
  • True when EXACTLY ONE is true
  • p⊕q≡(p∨q)∧¬(p∧q)p \oplus q \equiv (p \lor q) \land \neg(p \land q)
  • p⊕q≡(p∧¬q)∨(¬p∧q)p \oplus q \equiv (p \land \neg q) \lor (\neg p \land q)

5. Implication (Conditional) p→qp \to q

pqp→qp \to q
TTT
TFF
FTT
FFT
  • False only when p is true and q is false
  • Read as: “if p then q”, “p implies q”, “p only if q”
  • p = hypothesis/antecedent, q = conclusion/consequent
  • Key equivalence: p→q≡¬p∨qp \to q \equiv \neg p \lor q
  • Vacuous truth: When p is false, implication is automatically true

6. Biconditional (Double Implication) - p↔qp \leftrightarrow q

pqp↔qp \leftrightarrow q
TTT
TFF
FTF
FFT
  • True when both have SAME truth value
  • Read as: “p if and only if q”, “p iff q”
  • p↔q≡(p→q)∧(q→p)p \leftrightarrow q \equiv (p \to q) \land (q \to p)
  • p↔q≡(p∧q)∨(¬p∧¬q)p \leftrightarrow q \equiv (p \land q) \lor (\neg p \land \neg q)
Operator Precedence (Highest to Lowest) ⭐
Section titled “Operator Precedence (Highest to Lowest) ⭐”
  1. ¬\neg (NOT)
  2. ∧\land (AND)
  3. ∨\lor (OR)
  4. →\to (Implication)
  5. ↔\leftrightarrow (Biconditional)

Example: p∨q∧rp \lor q \land r means p∨(q∧r)p \lor (q \land r)

Steps:

  1. Identify number of variables (n)
  2. Number of rows = 2n2^n
  3. List all possible combinations
  4. Evaluate expression step by step

Example: (p→q)∧(q→r)(p \to q) \land (q \to r)

pqrp→qp \to qq→rq \to r(p→q)∧(q→r)(p \to q) \land (q \to r)
TTTTTT
TTFTFF
TFTFTF
TFFFTF
FTTTTT
FTFTFF
FFTTTT
FFFTTT

1. Tautology:

  • Always true (all rows = T)
  • Examples:
    • p∨¬pp \lor \neg p (Law of Excluded Middle)
    • p→pp \to p
    • (p∧q)→p(p \land q) \to p
    • p→(p∨q)p \to (p \lor q)
    • (p→q)∨(q→p)(p \to q) \lor (q \to p)

2. Contradiction:

  • Always false (all rows = F)
  • Examples:
    • p∧¬pp \land \neg p
    • (p→q)∧(p∧¬q)(p \to q) \land (p \land \neg q)

3. Contingency:

  • Sometimes true, sometimes false
  • Neither tautology nor contradiction
  • Examples:
    • p∧qp \land q
    • p→qp \to q
    • p∨qp \lor q

GATE Important:

  • Tautology = Valid formula
  • Contradiction = Unsatisfiable formula

Definition: Two propositions are logically equivalent if they have identical truth tables

Notation: p≡qp \equiv q or p⇔qp \Leftrightarrow q

Test: Show (p↔q)(p \leftrightarrow q) is a tautology

Important Equivalences:

1. De Morgan’s Laws (Most Important for GATE): ¬(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

Extended form: ¬(p1∧p2∧...∧pn)≡¬p1∨¬p2∨...∨¬pn\neg(p_1 \land p_2 \land ... \land p_n) \equiv \neg p_1 \lor \neg p_2 \lor ... \lor \neg p_n

2. Double Negation: ¬(¬p)≡p\neg(\neg p) \equiv p

3. Implication Equivalences: p→q≡¬p∨qp \to q \equiv \neg p \lor q p→q≡¬q→¬p (Contrapositive)p \to q \equiv \neg q \to \neg p \text{ (Contrapositive)} ¬(p→q)≡p∧¬q\neg(p \to q) \equiv p \land \neg q

4. Biconditional Equivalences: p↔q≡(p→q)∧(q→p)p \leftrightarrow q \equiv (p \to q) \land (q \to p) p↔q≡(p∧q)∨(¬p∧¬q)p \leftrightarrow q \equiv (p \land q) \lor (\neg p \land \neg q) p↔q≡(¬p∨q)∧(¬q∨p)p \leftrightarrow q \equiv (\neg p \lor q) \land (\neg q \lor p)

5. Idempotent Laws: p∧p≡pp \land p \equiv p p∨p≡pp \lor p \equiv p

6. Commutative Laws: p∧q≡q∧pp \land q \equiv q \land p p∨q≡q∨pp \lor q \equiv q \lor p

7. 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)

8. Distributive Laws: p∧(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)

9. Absorption Laws: p∧(p∨q)≡pp \land (p \lor q) \equiv p p∨(p∧q)≡pp \lor (p \land q) \equiv p

10. Identity Laws: p∧T≡pp \land T \equiv p p∨F≡pp \lor F \equiv p

11. Domination Laws: p∧F≡Fp \land F \equiv F p∨T≡Tp \lor T \equiv T

12. Negation Laws: p∧¬p≡Fp \land \neg p \equiv F p∨¬p≡Tp \lor \neg p \equiv T

13. Complement Laws: ¬T≡F\neg T \equiv F ¬F≡T\neg F \equiv T

Given: p→qp \to q (“if p then q”)

1. Converse: q→pq \to p (“if q then p”)

  • NOT logically equivalent to original

2. Inverse: ¬p→¬q\neg p \to \neg q (“if not p then not q”)

  • NOT logically equivalent to original
  • Logically equivalent to converse

3. Contrapositive: ¬q→¬p\neg q \to \neg p (“if not q then not p”)

  • Logically equivalent to original (Very important for GATE)

Key Facts:

  • p→q≡¬q→¬pp \to q \equiv \neg q \to \neg p (always)
  • Converse ≡\equiv Inverse (but both ≢\not\equiv original)
  • Original ≡\equiv Contrapositive

Truth Table:

pqp→qp \to qConverse q→pq \to pInverse ¬p→¬q\neg p \to \neg qContrapositive ¬q→¬p\neg q \to \neg p
TTTTTT
TFFTTF
FTTFFT
FFTTTT

Satisfiable:

  • At least one truth assignment makes it true
  • Has at least one row with T
  • Example: p∧qp \land q (satisfiable when both true)

Unsatisfiable:

  • No truth assignment makes it true
  • All rows are F
  • Contradiction
  • Example: p∧¬pp \land \neg p

Valid:

  • Every truth assignment makes it true
  • All rows are T
  • Tautology
  • Example: p∨¬pp \lor \neg p

Relationships:

  • Valid ⇒ Satisfiable (but not vice versa)
  • Unsatisfiable ⇒ Not Valid
  • pp is valid ⟺ ¬p\neg p is unsatisfiable

GATE Note:

  • Valid = Tautology
  • Unsatisfiable = Contradiction
  • Satisfiable ≠ Valid (can be contingency)

Argument Structure:

  • Premises: p1,p2,...,pnp_1, p_2, ..., p_n
  • Conclusion: q
  • Form: p1,p2,...,pn∴qp_1, p_2, ..., p_n \therefore q

Valid Argument:

  • Conclusion logically follows from premises
  • If all premises are true, conclusion MUST be true
  • (p1∧p2∧...∧pn)→q(p_1 \land p_2 \land ... \land p_n) \to q is a tautology

Testing Validity: Method 1: Truth table - check if conclusion is true whenever all premises are true Method 2: Prove (p1∧p2∧...∧pn)→q(p_1 \land p_2 \land ... \land p_n) \to q is tautology Method 3: Assume premises true and conclusion false - if contradiction, argument is valid

Example (Valid):

  • Premise 1: p→qp \to q
  • Premise 2: pp
  • Conclusion: qq
  • Test: (p→q)∧p→q(p \to q) \land p \to q is tautology ✓

Example (Invalid):

  • Premise 1: p→qp \to q
  • Premise 2: qq
  • Conclusion: pp
  • Test: (p→q)∧q→p(p \to q) \land q \to p is NOT tautology ✗ (Fallacy: Affirming the consequent)
Rules of Inference (Very Important for GATE)
Section titled “Rules of Inference (Very Important for GATE)”

1. Modus Ponens (MP): p→q,p∴q\frac{p \to q, \quad p}{\therefore q}

2. Modus Tollens (MT): p→q,¬q∴¬p\frac{p \to q, \quad \neg q}{\therefore \neg p}

3. Hypothetical Syllogism (HS): p→q,q→r∴p→r\frac{p \to q, \quad q \to r}{\therefore p \to r}

4. Disjunctive Syllogism (DS): p∨q,¬p∴q\frac{p \lor q, \quad \neg p}{\therefore q}

5. Addition (Add): p∴p∨q\frac{p}{\therefore p \lor q}

6. Simplification (Simp): p∧q∴p\frac{p \land q}{\therefore p}

7. Conjunction (Conj): p,q∴p∧q\frac{p, \quad q}{\therefore p \land q}

8. Resolution: p∨q,¬p∨r∴q∨r\frac{p \lor q, \quad \neg p \lor r}{\therefore q \lor r}

9. Constructive Dilemma: (p→q)∧(r→s),p∨r∴q∨s\frac{(p \to q) \land (r \to s), \quad p \lor r}{\therefore q \lor s}

10. Destructive Dilemma: (p→q)∧(r→s),¬q∨¬s∴¬p∨¬r\frac{(p \to q) \land (r \to s), \quad \neg q \lor \neg s}{\therefore \neg p \lor \neg r}

1. Affirming the Consequent: p→q,q∴p(INVALID)\frac{p \to q, \quad q}{\therefore p} \quad \text{(INVALID)}

2. Denying the Antecedent: p→q,¬p∴¬q(INVALID)\frac{p \to q, \quad \neg p}{\therefore \neg q} \quad \text{(INVALID)}

  • A proposition assumed or proposed to be true
  • Requires proof or counterexample
  • Common in mathematical reasoning
  • Until proven, remains a conjecture
  • Once proven, becomes a theorem

Example:

  • Goldbach’s Conjecture: Every even integer > 2 is sum of two primes (unproven)

Literal: Variable or its negation (p, ¬p)

Conjunctive Normal Form (CNF):

  • AND of ORs
  • (p∨q)∧(¬p∨r)∧(q∨¬r)(p \lor q) \land (\neg p \lor r) \land (q \lor \neg r)
  • Product of Sums (POS)

Disjunctive Normal Form (DNF):

  • OR of ANDs
  • (p∧q)∨(¬p∧r)∨(q∧¬r)(p \land q) \lor (\neg p \land r) \lor (q \land \neg r)
  • Sum of Products (SOP)

Every formula can be converted to CNF or DNF

  1. Implication truth table - Know when p→qp \to q is false
  2. De Morgan’s laws - Distribute negation
  3. Valid vs Satisfiable vs Tautology - Understand differences
  4. Argument validity - Test using truth tables or rules
  5. Conversion: p→q≡¬p∨qp \to q \equiv \neg p \lor q
  6. Contrapositive equivalence: p→q≡¬q→¬pp \to q \equiv \neg q \to \neg p
  7. Difference between implication and converse - Not equivalent
  8. Rules of inference - Modus Ponens, Modus Tollens, etc.
  9. Logical equivalences - All laws listed above
  10. CNF/DNF conversion
  1. Converse ≠ Implication

    • p→q≢q→pp \to q \not\equiv q \to p
  2. Inverse ≠ Implication

    • p→q≢¬p→¬qp \to q \not\equiv \neg p \to \neg q
  3. Only Contrapositive = Implication

    • p→q≡¬q→¬pp \to q \equiv \neg q \to \neg p
  4. Implication is false only in one case

    • True antecedent, False consequent
  5. Valid ≠ Satisfiable

    • Valid means always true (tautology)
    • Satisfiable means at least once true
  6. De Morgan’s - watch the flip

    • AND becomes OR, OR becomes AND
    • Don’t forget to negate each part
  7. Affirming consequent is invalid

    • p→q,q⇏pp \to q, q \not\Rightarrow p
  8. Denying antecedent is invalid

    • p→q,¬p⇏¬qp \to q, \neg p \not\Rightarrow \neg q

p→q≡¬p∨qp \to q \equiv \neg p \lor q ¬(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 p↔q≡(p→q)∧(q→p)p \leftrightarrow q \equiv (p \to q) \land (q \to p) p→q≡¬q→¬pp \to q \equiv \neg q \to \neg p ¬(p→q)≡p∧¬q\neg(p \to q) \equiv p \land \neg q p⊕q≡(p∧¬q)∨(¬p∧q)p \oplus q \equiv (p \land \neg q) \lor (\neg p \land q)

  1. Master implication - Most GATE questions involve →\to
  2. Know De Morgan’s laws cold - Used everywhere
  3. Contrapositive is your friend - Equivalent to original
  4. Truth tables never lie - When in doubt, construct one
  5. Valid arguments preserve truth - Tautology test
  6. Logical equivalence is transitive - Chain them
  7. Precedence matters - NOT > AND > OR > IMPLIES > IFF
  8. Practice conversion - Between different forms
  9. Rules of inference - Memorize common patterns
  10. Fallacies are tricky - Know what’s invalid