mathematical logic
Propositional Logic
Overview
Propositional logic (also called statement logic, sentential calculus, or propositional calculus) is a branch of classical logic that studies propositions — statements that are either true or false — and the ways they combine into compound statements. Compound propositions are built from simpler ones using logical connectives: negation (not), conjunction (and), disjunction (or), implication (if...then), and biconditional (if and only if). Propositional logic is 'zeroth-order' in the sense that it treats propositions as indivisible units, without looking inside them at objects, predicates, or quantifiers — that refinement is the job of predicate logic.
Intuition
Think of each simple proposition as a light switch that is either on (true) or off (false), with no in-between. Connectives are like circuits wiring switches together: AND is two switches in series (both must be on for current to flow), OR is two switches in parallel (either being on suffices), and NOT flips a switch. Once you have wired a compound circuit, its truth value is completely determined by the truth values of the switches feeding it — that's exactly what a truth table computes, row by row, for every possible on/off combination.
Formal Definition
A propositional language starts with a set of atomic propositions p, q, r, ... and closes them under the connectives ¬ (negation), ∧ (conjunction), ∨ (disjunction), → (implication), and ↔ (biconditional). Each connective is defined by its truth function: it maps the truth values of its inputs to a truth value for the output, independent of what the propositions actually mean.
Notation
| Notation | Meaning |
|---|---|
| Negation — 'not p'Also written: ~p, !p | |
| Conjunction — 'p and q'Also written: p·q, p && q | |
| Disjunction — 'p or q' (inclusive)Also written: p || q | |
| Material conditional — 'if p then q'Also written: p ⊃ q | |
| Biconditional — 'p if and only if q'Also written: p ≡ q | |
| Semantic entailment — the conclusion is true whenever the premises are |
Properties
Commutativity
Associativity
De Morgan's laws
Double negation
Contrapositive equivalence
Applications
Worked Examples
The conditional is false only when the antecedent is true and the consequent is false; it is true in every other case.
Answer: p → q is false only for (T, F); true for (T,T), (F,T), (F,F).
Practice Problems
Write the truth table for p ∨ q.
Which formula is logically equivalent to p → q?
A pump should run only when the tank is NOT full AND (the manual switch is on OR the auto-timer fires). Write the control condition as a Boolean expression and name the gates involved.
A guard clause rejects input unless 'age ≥ 18 AND has_license'. Using De Morgan's law, rewrite the rejection condition ¬(A ∧ B).
Common Mistakes
Believing p → q is false whenever p is false.
The material conditional is TRUE whenever the antecedent p is false, regardless of q ('vacuously true'). Only T→F is false.
Treating → as equivalent to ↔.
p → q only requires q whenever p holds; it says nothing about what happens when p is false. p ↔ q additionally requires q → p.
Quiz
Summary
- Propositional logic studies true/false statements (propositions) combined via connectives: ¬, ∧, ∨, →, ↔.
- Each connective is a truth function — a compound's truth value depends only on the truth values of its parts.
- Truth tables enumerate every input combination to determine a formula's truth value in each case.
- De Morgan's laws let you push negation through ∧ and ∨, swapping one for the other.
- Propositional logic is the foundation for predicate logic, proof techniques, and digital circuit design.
References
- BookEnderton, H. A Mathematical Introduction to Logic, 2nd ed.
Mathematics