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:
    • pqp \land q: “It is raining AND the sun is shining”
    • pqp \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) pqp \land q

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

3. OR (Disjunction) pqp \lor q

pqpqp \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) pqp \oplus q

pqpqp \oplus q
TTF
TFT
FTT
FFF
  • True when EXACTLY ONE is true
  • pq(pq)¬(pq)p \oplus q \equiv (p \lor q) \land \neg(p \land q)
  • pq(p¬q)(¬pq)p \oplus q \equiv (p \land \neg q) \lor (\neg p \land q)

5. Implication (Conditional) pqp \to q

pqpqp \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: pq¬pqp \to q \equiv \neg p \lor q
  • Vacuous truth: When p is false, implication is automatically true

6. Biconditional (Double Implication) - pqp \leftrightarrow q

pqpqp \leftrightarrow q
TTT
TFF
FTF
FFT
  • True when both have SAME truth value
  • Read as: “p if and only if q”, “p iff q”
  • pq(pq)(qp)p \leftrightarrow q \equiv (p \to q) \land (q \to p)
  • pq(pq)(¬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: pqrp \lor q \land r means p(qr)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: (pq)(qr)(p \to q) \land (q \to r)

pqrpqp \to qqrq \to r(pq)(qr)(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)
    • ppp \to p
    • (pq)p(p \land q) \to p
    • p(pq)p \to (p \lor q)
    • (pq)(qp)(p \to q) \lor (q \to p)

2. Contradiction:

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

3. Contingency:

  • Sometimes true, sometimes false
  • Neither tautology nor contradiction
  • Examples:
    • pqp \land q
    • pqp \to q
    • pqp \lor q

GATE Important:

  • Tautology = Valid formula
  • Contradiction = Unsatisfiable formula

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

Notation: pqp \equiv q or pqp \Leftrightarrow q

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

Important Equivalences:

1. De Morgan’s Laws (Most Important for GATE): ¬(pq)¬p¬q\neg(p \land q) \equiv \neg p \lor \neg q ¬(pq)¬p¬q\neg(p \lor q) \equiv \neg p \land \neg q

Extended form: ¬(p1p2...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: pq¬pqp \to q \equiv \neg p \lor q pq¬q¬p (Contrapositive)p \to q \equiv \neg q \to \neg p \text{ (Contrapositive)} ¬(pq)p¬q\neg(p \to q) \equiv p \land \neg q

4. Biconditional Equivalences: pq(pq)(qp)p \leftrightarrow q \equiv (p \to q) \land (q \to p) pq(pq)(¬p¬q)p \leftrightarrow q \equiv (p \land q) \lor (\neg p \land \neg q) pq(¬pq)(¬qp)p \leftrightarrow q \equiv (\neg p \lor q) \land (\neg q \lor p)

5. Idempotent Laws: pppp \land p \equiv p pppp \lor p \equiv p

6. Commutative Laws: pqqpp \land q \equiv q \land p pqqpp \lor q \equiv q \lor p

7. Associative Laws: (pq)rp(qr)(p \land q) \land r \equiv p \land (q \land r) (pq)rp(qr)(p \lor q) \lor r \equiv p \lor (q \lor r)

8. Distributive Laws: p(qr)(pq)(pr)p \land (q \lor r) \equiv (p \land q) \lor (p \land r) p(qr)(pq)(pr)p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)

9. Absorption Laws: p(pq)pp \land (p \lor q) \equiv p p(pq)pp \lor (p \land q) \equiv p

10. Identity Laws: pTpp \land T \equiv p pFpp \lor F \equiv p

11. Domination Laws: pFFp \land F \equiv F pTTp \lor T \equiv T

12. Negation Laws: p¬pFp \land \neg p \equiv F p¬pTp \lor \neg p \equiv T

13. Complement Laws: ¬TF\neg T \equiv F ¬FT\neg F \equiv T

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

1. Converse: qpq \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:

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

Truth Table:

pqpqp \to qConverse qpq \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: pqp \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,...,pnqp_1, p_2, ..., p_n \therefore q

Valid Argument:

  • Conclusion logically follows from premises
  • If all premises are true, conclusion MUST be true
  • (p1p2...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 (p1p2...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: pqp \to q
  • Premise 2: pp
  • Conclusion: qq
  • Test: (pq)pq(p \to q) \land p \to q is tautology ✓

Example (Invalid):

  • Premise 1: pqp \to q
  • Premise 2: qq
  • Conclusion: pp
  • Test: (pq)qp(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): pq,pq\frac{p \to q, \quad p}{\therefore q}

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

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

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

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

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

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

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

9. Constructive Dilemma: (pq)(rs),prqs\frac{(p \to q) \land (r \to s), \quad p \lor r}{\therefore q \lor s}

10. Destructive Dilemma: (pq)(rs),¬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: pq,qp(INVALID)\frac{p \to q, \quad q}{\therefore p} \quad \text{(INVALID)}

2. Denying the Antecedent: pq,¬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
  • (pq)(¬pr)(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
  • (pq)(¬pr)(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 pqp \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: pq¬pqp \to q \equiv \neg p \lor q
  6. Contrapositive equivalence: pq¬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

    • pq≢qpp \to q \not\equiv q \to p
  2. Inverse ≠ Implication

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

    • pq¬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

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

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

pq¬pqp \to q \equiv \neg p \lor q ¬(pq)¬p¬q\neg(p \land q) \equiv \neg p \lor \neg q ¬(pq)¬p¬q\neg(p \lor q) \equiv \neg p \land \neg q pq(pq)(qp)p \leftrightarrow q \equiv (p \to q) \land (q \to p) pq¬q¬pp \to q \equiv \neg q \to \neg p ¬(pq)p¬q\neg(p \to q) \equiv p \land \neg q pq(p¬q)(¬pq)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