Introduction
Propositional logic studies statements that are either true or false, and how the truth of a compound statement depends on the truth of its parts. It gives a precise language for conditions ("if the cache misses and the bus is free, then fetch"), for specifications, and for correctness arguments.
In computer science it is the logic of Boolean expressions and digital circuits, the base of first-order logic, the setting of the satisfiability problem (SAT, the first problem shown NP-complete), and the language of program assertions. The working skills are deciding whether a formula is a tautology, whether two formulas are equivalent, and whether an argument is valid.
Prerequisites
- No formal prerequisite. Familiarity with the Boolean values true and false and with truth tables is helpful.
Core concepts
Propositions and connectives
A proposition is a declarative sentence that is either true (T, 1) or false (F, 0), but not both. "7 is prime" is a proposition; "" is not, because its truth depends on (it becomes a proposition once is fixed, or once it is quantified; see first-order logic). "Close the door" is not a proposition.
Propositional variables stand for propositions. Compound formulas are built with connectives:
| Connective | Symbol | Read as | True exactly when |
|---|---|---|---|
| Negation | not | is false | |
| Conjunction | and | both are true | |
| Disjunction | or (inclusive) | at least one is true | |
| Exclusive or | xor | exactly one is true | |
| Implication | if then | not ( true and false) | |
| Biconditional | if and only if | both have the same value |
Truth tables
| T | T | F | T | T | F | T | T |
|---|---|---|---|---|---|---|---|
| T | F | F | F | T | T | F | F |
| F | T | T | F | T | T | T | F |
| F | F | T | F | F | F | T | T |
A formula with distinct variables has a truth table of rows. There are distinct truth functions of variables (16 for ), because each of the rows can independently be T or F.
Precedence convention. binds tightest, then , then , then , then . Implication is right-associative: means . When in doubt, add parentheses.
Implication in detail
is false in exactly one row: true, false. When is false, the implication is vacuously true. The implication does not claim any causal link between and .
Ways to read : "if then ", " only if ", " if ", " is sufficient for ", " is necessary for ", " unless ".
From we form three related implications:
| Name | Form | Equivalent to ? |
|---|---|---|
| Converse | No | |
| Inverse | No (it is equivalent to the converse) | |
| Contrapositive | Yes |

Tautology, contradiction, contingency, satisfiability
- A tautology (valid formula) is true in every row: .
- A contradiction (unsatisfiable formula) is false in every row: .
- A contingency is neither.
- A formula is satisfiable if at least one row makes it true. Writing for a formula, valid implies satisfiable; is valid if and only if is unsatisfiable.
Logical equivalence and logical implication
- (logically equivalent) means and have the same truth value in every row; equivalently, is a tautology.
- (logically implies, or is a logical consequence of ) means every row making true makes true; equivalently, is a tautology.
Note the difference between the connective (part of a formula) and the relation (a statement about two formulas).
Laws of equivalence
All of the following hold for any formulas and can be checked by truth tables.
| Law | Form |
|---|---|
| Identity | , |
| Domination | , |
| Idempotent | , |
| Double negation | |
| Commutative | , |
| Associative | , same for |
| Distributive | , |
| De Morgan | , |
| Absorption | , |
| Negation | , |
Equivalences involving implication and the biconditional:
Two traps: (implication is not associative); and , not .
Normal forms and functional completeness
- A literal is a variable or its negation. A clause is a disjunction of literals.
- Conjunctive normal form (CNF): a conjunction of clauses, for example .
- Disjunctive normal form (DNF): a disjunction of conjunctions of literals.
- Every formula has an equivalent CNF and an equivalent DNF. The full DNF takes one conjunction (minterm) per true row of the truth table; the full CNF takes one clause (maxterm) per false row.
Conversion recipe: (1) eliminate and using the equivalences above; (2) push negations inward with De Morgan and double negation; (3) distribute over (for CNF) or over (for DNF).
A set of connectives is functionally complete if every truth function can be expressed with it. is complete (by the full DNF), and so are , , , and . The sets , and are not complete: the first two cannot express , because every formula built only from them is true when all variables are true; the last can express only affine (xor-linear) functions: it can express as , but never . The details of NAND and NOR gates belong to Boolean Algebra.
Arguments and rules of inference
An argument with premises and conclusion is valid if every row that makes all premises true also makes true; equivalently,
Validity concerns form, not truth: a valid argument with a false premise can have a false conclusion. An argument is sound if it is valid and its premises are true.
| Rule | Premises | Conclusion |
|---|---|---|
| Modus ponens | , | |
| Modus tollens | , | |
| Hypothetical syllogism | , | |
| Disjunctive syllogism | , | |
| Addition | ||
| Simplification | ||
| Conjunction | , | |
| Resolution | , |
Two classic fallacies (invalid forms):
- Affirming the consequent: from and , conclude . Counterexample row: .
- Denying the antecedent: from and , conclude . Same counterexample row.
Proof by contradiction (refutation). To show premises entail , show that is unsatisfiable. Resolution theorem provers and SAT solvers work this way.
Worked examples
Example 1: tautology check by a shortcut
Is a tautology?
An implication is false only when its antecedent is true and its consequent is false. So suppose is false: then and . For to be true with we need ; then is . The antecedent is false, so no falsifying row exists. The formula is a tautology (it is hypothetical syllogism).
This "try to falsify" method is much faster than an 8-row truth table.
Example 2: equivalence by algebra
Show .
using the distributive law in reverse, the negation law and identity.
Example 3: validity of an argument
Premises: "If it rains, the match is cancelled" (); "If the match is cancelled, we go home" (); "We did not go home" (). Conclusion: "It did not rain" ().
From and , modus tollens gives . From and , modus tollens gives . Valid.
Now change the conclusion to "It rained" (). The row makes all three premises true and the conclusion false, so this argument is invalid.
Example 4: counting satisfying assignments
How many of the 8 assignments to satisfy ?
- : need ; is free: 2 assignments.
- : need ; is free: 2 assignments.
Total 4. (Note that the resolvent is true in all 4, as resolution guarantees.)
Example 5: CNF conversion
Convert to CNF.
This is already a conjunction of two clauses, so it is in CNF (and also in DNF after distributing: ).
Important properties and observations
- is true whenever is false or is true. Use the single falsifying row to test an implication.
- "Only if" reverses the reading: " only if " is , not .
- "Unless": " unless " is usually translated , equivalently .
- Implication is neither commutative nor associative. The biconditional and xor are both commutative and associative.
- and is true exactly when an odd number of the three are true.
- Rewrite each as before simplifying.
- Validity of an argument is decidable: truth tables give an algorithm with rows. Deciding satisfiability efficiently in general (SAT) is NP-complete, so no polynomial algorithm is known.
GATE examination perspective
- Tautology and equivalence MCQs/MSQs. Use "try to falsify" for implications; use algebra for equivalences; fall back to a truth table only for small formulas.
- English-to-logic translation. Watch "only if", "unless", "necessary", "sufficient" and "neither... nor" ().
- Valid argument questions. Identify modus ponens/tollens chains, and test fallacies by finding a single counterexample row.
- Counting questions. Number of truth functions ; number of satisfying assignments by case analysis on one variable.
- Trap: confusing the inverse () with the contrapositive ().
- Trap: treating as . Check the row : the left side is false, the right side is true.
Summary
Sources
- K. H. Rosen, Discrete Mathematics and Its Applications, 7th ed., McGraw-Hill, 2012: Sections 1.1 (Propositional Logic), 1.3 (Propositional Equivalences) and 1.6 (Rules of Inference).