Prepositional Logic
Propositional Logic
Section titled “Propositional Logic”Proposition
Section titled “Proposition”- 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 and Compound Propositions
Section titled “Atomic and Compound Propositions”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 \land q$: “It is raining AND the sun is shining”
- $p \lor q$: “It is raining OR the sun is shining”
- $\neg p$: “It is NOT raining”
Logical Connectives
Section titled “Logical Connectives”1. NOT (Negation) $\neg p$
| p | $\neg p$ |
|---|---|
| T | F |
| F | T |
- Reverses truth value
- Also written as: ~p, ¬p, !p
2. AND (Conjunction) $p \land q$
| p | q | $p \land q$ |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
- True only when BOTH are true
- Also written as: p ∧ q, p · q, p & q
3. OR (Disjunction) $p \lor q$
| p | q | $p \lor q$ |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
- 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 \oplus q$
| p | q | $p \oplus q$ |
|---|---|---|
| T | T | F |
| T | F | T |
| F | T | T |
| F | F | F |
- True when EXACTLY ONE is true
- $p \oplus q \equiv (p \lor q) \land \neg(p \land q)$
- $p \oplus q \equiv (p \land \neg q) \lor (\neg p \land q)$
5. Implication (Conditional) $p \to q$
| p | q | $p \to q$ |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
- 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 \to q \equiv \neg p \lor q$
- Vacuous truth: When p is false, implication is automatically true
6. Biconditional (Double Implication) - $p \leftrightarrow q$
| p | q | $p \leftrightarrow q$ |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
- True when both have SAME truth value
- Read as: “p if and only if q”, “p iff q”
- $p \leftrightarrow q \equiv (p \to q) \land (q \to p)$
- $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) ⭐”- $\neg$ (NOT)
- $\land$ (AND)
- $\lor$ (OR)
- $\to$ (Implication)
- $\leftrightarrow$ (Biconditional)
Example: $p \lor q \land r$ means $p \lor (q \land r)$
Truth Table Construction
Section titled “Truth Table Construction”Steps:
- Identify number of variables (n)
- Number of rows = $2^n$
- List all possible combinations
- Evaluate expression step by step
Example: $(p \to q) \land (q \to r)$
| p | q | r | $p \to q$ | $q \to r$ | $(p \to q) \land (q \to r)$ |
|---|---|---|---|---|---|
| T | T | T | T | T | T |
| T | T | F | T | F | F |
| T | F | T | F | T | F |
| T | F | F | F | T | F |
| F | T | T | T | T | T |
| F | T | F | T | F | F |
| F | F | T | T | T | T |
| F | F | F | T | T | T |
Tautology, Contradiction, Contingency
Section titled “Tautology, Contradiction, Contingency”1. Tautology:
- Always true (all rows = T)
- Examples:
- $p \lor \neg p$ (Law of Excluded Middle)
- $p \to p$
- $(p \land q) \to p$
- $p \to (p \lor q)$
- $(p \to q) \lor (q \to p)$
2. Contradiction:
- Always false (all rows = F)
- Examples:
- $p \land \neg p$
- $(p \to q) \land (p \land \neg q)$
3. Contingency:
- Sometimes true, sometimes false
- Neither tautology nor contradiction
- Examples:
- $p \land q$
- $p \to q$
- $p \lor q$
GATE Important:
- Tautology = Valid formula
- Contradiction = Unsatisfiable formula
Logical Equivalence
Section titled “Logical Equivalence”Definition: Two propositions are logically equivalent if they have identical truth tables
Notation: $p \equiv q$ or $p \Leftrightarrow q$
Test: Show $(p \leftrightarrow q)$ is a tautology
Important Equivalences:
1. De Morgan’s Laws (Most Important for GATE): $$\neg(p \land q) \equiv \neg p \lor \neg q$$ $$\neg(p \lor q) \equiv \neg p \land \neg q$$
Extended form: $$\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: $$\neg(\neg p) \equiv p$$
3. Implication Equivalences: $$p \to q \equiv \neg p \lor q$$ $$p \to q \equiv \neg q \to \neg p \text{ (Contrapositive)}$$ $$\neg(p \to q) \equiv p \land \neg q$$
4. Biconditional Equivalences: $$p \leftrightarrow q \equiv (p \to q) \land (q \to p)$$ $$p \leftrightarrow q \equiv (p \land q) \lor (\neg p \land \neg q)$$ $$p \leftrightarrow q \equiv (\neg p \lor q) \land (\neg q \lor p)$$
5. Idempotent Laws: $$p \land p \equiv p$$ $$p \lor p \equiv p$$
6. Commutative Laws: $$p \land q \equiv q \land p$$ $$p \lor q \equiv q \lor p$$
7. Associative Laws: $$(p \land q) \land r \equiv p \land (q \land r)$$ $$(p \lor q) \lor r \equiv p \lor (q \lor r)$$
8. Distributive Laws: $$p \land (q \lor r) \equiv (p \land q) \lor (p \land r)$$ $$p \lor (q \land r) \equiv (p \lor q) \land (p \lor r)$$
9. Absorption Laws: $$p \land (p \lor q) \equiv p$$ $$p \lor (p \land q) \equiv p$$
10. Identity Laws: $$p \land T \equiv p$$ $$p \lor F \equiv p$$
11. Domination Laws: $$p \land F \equiv F$$ $$p \lor T \equiv T$$
12. Negation Laws: $$p \land \neg p \equiv F$$ $$p \lor \neg p \equiv T$$
13. Complement Laws: $$\neg T \equiv F$$ $$\neg F \equiv T$$
Implication Variations
Section titled “Implication Variations”Given: $p \to q$ (“if p then q”)
1. Converse: $q \to p$ (“if q then p”)
- NOT logically equivalent to original
2. Inverse: $\neg p \to \neg q$ (“if not p then not q”)
- NOT logically equivalent to original
- Logically equivalent to converse
3. Contrapositive: $\neg q \to \neg p$ (“if not q then not p”)
- Logically equivalent to original (Very important for GATE)
Key Facts:
- $p \to q \equiv \neg q \to \neg p$ (always)
- Converse $\equiv$ Inverse (but both $\not\equiv$ original)
- Original $\equiv$ Contrapositive
Truth Table:
| p | q | $p \to q$ | Converse $q \to p$ | Inverse $\neg p \to \neg q$ | Contrapositive $\neg q \to \neg p$ |
|---|---|---|---|---|---|
| T | T | T | T | T | T |
| T | F | F | T | T | F |
| F | T | T | F | F | T |
| F | F | T | T | T | T |
Validity and Satisfiability
Section titled “Validity and Satisfiability”Satisfiable:
- At least one truth assignment makes it true
- Has at least one row with T
- Example: $p \land q$ (satisfiable when both true)
Unsatisfiable:
- No truth assignment makes it true
- All rows are F
- Contradiction
- Example: $p \land \neg p$
Valid:
- Every truth assignment makes it true
- All rows are T
- Tautology
- Example: $p \lor \neg p$
Relationships:
- Valid ⇒ Satisfiable (but not vice versa)
- Unsatisfiable ⇒ Not Valid
- $p$ is valid ⟺ $\neg p$ is unsatisfiable
GATE Note:
- Valid = Tautology
- Unsatisfiable = Contradiction
- Satisfiable ≠ Valid (can be contingency)
Arguments and Validity
Section titled “Arguments and Validity”Argument Structure:
- Premises: $p_1, p_2, …, p_n$
- Conclusion: q
- Form: $p_1, p_2, …, p_n \therefore q$
Valid Argument:
- Conclusion logically follows from premises
- If all premises are true, conclusion MUST be true
- $(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 $(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 \to q$
- Premise 2: $p$
- Conclusion: $q$
- Test: $(p \to q) \land p \to q$ is tautology ✓
Example (Invalid):
- Premise 1: $p \to q$
- Premise 2: $q$
- Conclusion: $p$
- Test: $(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): $$\frac{p \to q, \quad p}{\therefore q}$$
2. Modus Tollens (MT): $$\frac{p \to q, \quad \neg q}{\therefore \neg p}$$
3. Hypothetical Syllogism (HS): $$\frac{p \to q, \quad q \to r}{\therefore p \to r}$$
4. Disjunctive Syllogism (DS): $$\frac{p \lor q, \quad \neg p}{\therefore q}$$
5. Addition (Add): $$\frac{p}{\therefore p \lor q}$$
6. Simplification (Simp): $$\frac{p \land q}{\therefore p}$$
7. Conjunction (Conj): $$\frac{p, \quad q}{\therefore p \land q}$$
8. Resolution: $$\frac{p \lor q, \quad \neg p \lor r}{\therefore q \lor r}$$
9. Constructive Dilemma: $$\frac{(p \to q) \land (r \to s), \quad p \lor r}{\therefore q \lor s}$$
10. Destructive Dilemma: $$\frac{(p \to q) \land (r \to s), \quad \neg q \lor \neg s}{\therefore \neg p \lor \neg r}$$
Common Fallacies (Invalid Arguments)
Section titled “Common Fallacies (Invalid Arguments)”1. Affirming the Consequent: $$\frac{p \to q, \quad q}{\therefore p} \quad \text{(INVALID)}$$
2. Denying the Antecedent: $$\frac{p \to q, \quad \neg p}{\therefore \neg q} \quad \text{(INVALID)}$$
Conjecture (Logic Context)
Section titled “Conjecture (Logic Context)”- 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)
Normal Forms
Section titled “Normal Forms”Literal: Variable or its negation (p, ¬p)
Conjunctive Normal Form (CNF):
- AND of ORs
- $(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 \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
GATE Focus Points
Section titled “GATE Focus Points”- Implication truth table - Know when $p \to q$ is false
- De Morgan’s laws - Distribute negation
- Valid vs Satisfiable vs Tautology - Understand differences
- Argument validity - Test using truth tables or rules
- Conversion: $p \to q \equiv \neg p \lor q$
- Contrapositive equivalence: $p \to q \equiv \neg q \to \neg p$
- Difference between implication and converse - Not equivalent
- Rules of inference - Modus Ponens, Modus Tollens, etc.
- Logical equivalences - All laws listed above
- CNF/DNF conversion
GATE Common Traps
Section titled “GATE Common Traps”-
Converse ≠ Implication
- $p \to q \not\equiv q \to p$
-
Inverse ≠ Implication
- $p \to q \not\equiv \neg p \to \neg q$
-
Only Contrapositive = Implication
- $p \to q \equiv \neg q \to \neg p$
-
Implication is false only in one case
- True antecedent, False consequent
-
Valid ≠ Satisfiable
- Valid means always true (tautology)
- Satisfiable means at least once true
-
De Morgan’s - watch the flip
- AND becomes OR, OR becomes AND
- Don’t forget to negate each part
-
Affirming consequent is invalid
- $p \to q, q \not\Rightarrow p$
-
Denying antecedent is invalid
- $p \to q, \neg p \not\Rightarrow \neg q$
Quick Formula Reference
Section titled “Quick Formula Reference”$$p \to q \equiv \neg p \lor q$$ $$\neg(p \land q) \equiv \neg p \lor \neg q$$ $$\neg(p \lor q) \equiv \neg p \land \neg q$$ $$p \leftrightarrow q \equiv (p \to q) \land (q \to p)$$ $$p \to q \equiv \neg q \to \neg p$$ $$\neg(p \to q) \equiv p \land \neg q$$ $$p \oplus q \equiv (p \land \neg q) \lor (\neg p \land q)$$
Final Insights
Section titled “Final Insights”- Master implication - Most GATE questions involve $\to$
- Know De Morgan’s laws cold - Used everywhere
- Contrapositive is your friend - Equivalent to original
- Truth tables never lie - When in doubt, construct one
- Valid arguments preserve truth - Tautology test
- Logical equivalence is transitive - Chain them
- Precedence matters - NOT > AND > OR > IMPLIES > IFF
- Practice conversion - Between different forms
- Rules of inference - Memorize common patterns
- Fallacies are tricky - Know what’s invalid