The Timpson Lyceum · Computation Theory
Lecture 1 (Computation Theory) Propositional and Predicate Logic
Propositional and Predicate Logic – Lecture 1
Overview
This opening lecture lays the logical foundations the rest of computation theory is built on. It introduces propositional logic — the algebra of statements that are either true or false — and then extends to predicate logic, which adds variables and quantifiers. You will learn what propositions and predicates are, how logical operators are defined by truth tables, how to prove logical theorems (tautologies), and how the universal and existential quantifiers turn open predicates into definite propositions. The recurring theme is that logic studies the structure of reasoning: we can prove a statement follows from others without ever knowing what the underlying statements actually mean. These tools are essential later, when machines and the languages they recognize are defined through dense set-theoretic statements.
Key Concepts
Proposition — a statement (variable) whose value is either true or false, never both and never neither. Working with logic is like doing arithmetic with only two "numbers," and .
Tautology and contradiction — a tautology is a proposition that is always true; a contradiction is a proposition that is always false.
Theorem — a proposition that has been shown to be a tautology. Theorems are almost always stated as implications, so a theorem is often a tautological implication (an if–then statement that is always true).
Unary operators on propositions. Because there are only two truth values, there are exactly possible unary operators (one output choice for each of the two inputs). The only one that matters in practice is negation (): it returns the opposite truth value. (, .)
Binary operators on propositions. There are exactly possible binary operators (two output choices for each of the four input rows). The important ones:
- Conjunction (and) — true only when both are true.
- Disjunction (or) — the inclusive or: true when at least one is true (true when both are true). This differs from the everyday "exclusive" or.
- Implication — false only when the antecedent is true and the consequent is false; true in every other case. When the antecedent is false the implication is vacuously true. This is the trickiest operator: its definition is fixed, and "implies" is just the closest English word for it — do not let intuition override the definition.
- Biconditional / logical equivalence — true exactly when both sides have the same truth value.
- Exclusive or (XOR) — true exactly when the two values differ.
- NAND — the negation of and: .
Truth tables for the core operators:
| T | T | T | T | T | T |
| T | F | F | T | F | F |
| F | T | F | T | T | F |
| F | F | F | F | T | T |
Key logical equivalences (proved by truth table):
- Contrapositive: .
- De Morgan's laws (distributing negation): and . Negation flips to and vice versa.
- Equivalence as two implications: . This is why every "if and only if" is really two implications.
- Double negation: .
NAND is functionally complete. Every logical operator can be built from NAND alone, which is why it is a "primitive" used when designing computer circuits (the arithmetic logic unit). For example , and .
English readings of implication. " if " means ; " only if " means . Combining both gives " if and only if ," written .
Predicate — a proposition-valued function of one or more variables, e.g. . By itself a predicate is neither true nor false; it becomes a proposition only once values are supplied. Example: "is blue" is a predicate; "the desk is blue" is a proposition.
Relation — a predicate of two variables, e.g. . Relations are common enough (like or ) to get a special name and infix notation: we write rather than . Predicates can take any number of variables (three variables, etc.); only the two-variable case is called a relation.
Combining predicates. Since predicates ultimately yield truth values, logical operators combine them into new predicates, e.g. defining to mean .
Only propositions can be proved. To prove something means to show a proposition is a tautology. A predicate on its own cannot be proved or disproved — it has no fixed truth value.
Universal quantifier ("for all" / "for every"). For a predicate , the statement is a proposition, true exactly when holds independent of the choice of . Example: is false; is true.
Existential quantifier ("there exists ... such that"), defined in terms of the universal quantifier: is true when at least one makes true. Read "" as "there exists an such that."
Order of quantifiers matters when the quantifiers differ. For instance is true (take ), but is false (no single works for every ). Swapping two like quantifiers ( or ) changes nothing.
Quantifier negation rule: ("all swans are white" says the same as "there is no non-white swan").
Unique existential quantifier ("there exists exactly one "): The first part says at least one works; the second says any two values that both work must actually be the same. Example: there is exactly one even prime, namely .
Worked Example
Prove the quantifier-negation theorem: for any predicate ,
Strategy: start from the right-hand side and reduce it to the left, using the definition of and double negation. Let , so that .
Since the two sides always evaluate to the same truth value, the biconditional is a tautology, so the statement is a theorem. In plain terms: "every has property " says exactly the same thing as "there is no lacking property ."
Summary
- A proposition is true-or-false; a predicate is a proposition-valued function that becomes a proposition only when its variables are filled in. A two-variable predicate is a relation.
- Operators are defined by truth tables: there are unary and binary operators, of which , , , , and are the workhorses. Implication is false only for true-antecedent/false-consequent and is otherwise (including vacuously) true.
- A theorem is a proposition proven to be a tautology; equivalences such as the contrapositive, De Morgan's laws, and double negation are proved by exhausting the truth table.
- NAND is functionally complete — every operator can be constructed from it — which underlies digital circuit design.
- The universal () and existential () quantifiers convert open predicates into propositions; is definable from , the order of different quantifiers matters, and expresses "exactly one."
- Logic concerns the structure of arguments: valid conclusions follow from the form of the statements regardless of what the statements actually mean.