Introduction to Mathematical Logic
Understand the fundamentals of propositional and predicate logic, their syntax and semantics, and key theorems such as completeness and compactness.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
Into which two closely related parts is the discipline of mathematical logic divided?
1 of 17
Summary
Introduction to Mathematical Logic
Mathematical logic is the study of formal languages and reasoning methods that mathematicians use to express ideas with absolute precision. At its core, mathematical logic answers two fundamental questions: How can we write mathematical statements without any ambiguity? and How can we be certain that conclusions drawn from those statements are correct?
The discipline divides into two closely related parts: propositional logic, which deals with simple statements and their combinations, and predicate logic (also called first-order logic), which allows us to make statements about objects and their properties. Understanding both is essential for rigorous mathematical thinking.
Propositional Logic
What Is a Proposition?
A proposition is a declarative statement that is definitively either true or false. Examples include "$2$ is even" (true) and "$3 > 5$" (false). The key requirement is that there is no ambiguity—a proposition cannot be both true and false, or neither.
Notice that "$x > 0$" can also be a proposition if we're talking about a specific value of $x$. However, propositional logic alone cannot easily handle statements like "for all $x$, $x > 0$"—this is where predicate logic becomes necessary.
Logical Connectives
In propositional logic, we combine simple propositions into more complex ones using logical connectives. The five fundamental connectives are:
¬ (negation or "not"): $¬P$ is true when $P$ is false, and false when $P$ is true.
∧ (conjunction or "and"): $P ∧ Q$ is true only when both $P$ and $Q$ are true.
∨ (disjunction or "or"): $P ∨ Q$ is true when at least one of $P$ or $Q$ is true.
→ (implication or "if...then"): $P → Q$ is false only when $P$ is true and $Q$ is false. (This captures the idea: if the hypothesis holds, the conclusion must hold.)
↔ (biconditional or "if and only if"): $P ↔ Q$ is true when $P$ and $Q$ have the same truth value.
These connectives allow us to build increasingly complex formulas from atomic propositions. For example, starting with propositions $P$ and $Q$, we can form $(P ∧ Q) → ¬R$.
Syntax: Well-Formed Formulas
Syntax is the set of rules that tell us which combinations of symbols are valid formulas. Not every string of symbols is a valid formula—for instance, "$∧ ¬ P$" is not properly formed, but "$P ∧ ¬Q$" is.
The basic syntax rules are:
Any atomic proposition (like $P$, $Q$, $R$) is a formula.
If $φ$ is a formula, then $¬φ$ is a formula.
If $φ$ and $ψ$ are formulas, then $(φ ∧ ψ)$, $(φ ∨ ψ)$, $(φ → ψ)$, and $(φ ↔ ψ)$ are formulas.
Parentheses are crucial for avoiding ambiguity. For example, $P ∧ Q ∨ R$ could mean either $(P ∧ Q) ∨ R$ or $P ∧ (Q ∨ R)$, which have different truth values.
Semantics: Truth Values and Truth Tables
Semantics is the study of what formulas mean—specifically, how to assign truth values to them. The key idea is straightforward: we start by assigning true or false to each atomic proposition, then use truth tables to determine the truth value of compound formulas based on their connectives.
Here are the truth tables for the basic connectives:
For negation:
$¬P$ is true when $P$ is false
$¬P$ is false when $P$ is true
For conjunction ($P ∧ Q$):
True only when both $P$ and $Q$ are true
False in all other cases
For disjunction ($P ∨ Q$):
False only when both $P$ and $Q$ are false
True in all other cases
For implication ($P → Q$):
False only when $P$ is true and $Q$ is false
True in all other cases (including when $P$ is false)
For biconditional ($P ↔ Q$):
True when $P$ and $Q$ have the same truth value
False when they differ
A particularly important concept is tautology: a formula that is true under every possible assignment of truth values to its atomic propositions. For example, $P ∨ ¬P$ (the law of excluded middle) is always true—either $P$ holds or its negation holds. Conversely, a formula that is always false is called a contradiction.
Proof Systems: Deriving Formulas
A proof system is a formal method for deriving conclusions from premises using explicit rules. Rather than just checking truth tables, a proof system lets us apply syntactic rules to derive new formulas from existing ones.
Two main approaches are:
Natural deduction: Uses intuitive rules like "from $P$ and $P → Q$, conclude $Q$" (this rule is called modus ponens).
Hilbert-style systems: Use a small set of axioms (formulas always assumed true) and simple inference rules.
The crucial property of a good proof system is that it should only allow us to derive formulas that are actually true (the system is sound), and it should allow us to derive all formulas that are always true (the system is complete—more on this below).
The Completeness Theorem for Propositional Logic
Here's a profound result: If a formula is true under every possible assignment of truth values, then there exists a formal proof of that formula using the rules of propositional logic.
In other words, the semantic notion of truth (using truth tables) and the syntactic notion of derivability (using proof rules) are equivalent. This means we can confidently use formal proof systems—anything we can't derive is genuinely not a tautology. This theorem assures us that formal logic is both sound and complete as a tool for propositional reasoning.
Predicate Logic
Why We Need Predicate Logic
Propositional logic is powerful, but it has a significant limitation: it cannot express statements like "every integer is either even or odd" or "there exists a real number $x$ such that $x^2 = 2$." These statements are about all objects with a certain property or some object with a property—concepts that propositional logic simply cannot capture.
Predicate logic extends propositional logic by introducing quantifiers and predicates, allowing us to make general claims about collections of objects.
Quantifiers and Variables
Predicate logic introduces two quantifiers:
Universal quantifier ($∀$): The statement $∀x \, P(x)$ means "for every object $x$, the property $P$ holds." For example, $∀x \, (x \text{ is even} ∨ x \text{ is odd})$ asserts that every integer is either even or odd.
Existential quantifier ($∃$): The statement $∃x \, P(x)$ means "there exists at least one object $x$ such that $P$ holds." For example, $∃x \, (x^2 = 2)$ asserts that at least one real number has the property that its square equals $2$.
Variables like $x$, $y$, and $z$ act as placeholders for objects. The scope of a quantifier is important: $∀x \, P(x)$ means the variable $x$ is bound by the quantifier throughout the formula. A variable that is not bound by any quantifier is called free.
Predicates and Functions
A predicate is a symbol that expresses a property of objects or a relation between objects. For example:
$E(x)$ might mean "$x$ is even"
$\text{GreaterThan}(x, y)$ might mean "$x > y$"
Predicates are the basic building blocks of atomic formulas in predicate logic. We write $P(t1, t2, \ldots, tn)$ where $P$ is an $n$-ary predicate and $t1, \ldots, tn$ are terms (variables or constants).
A function maps objects to objects. For example, $s(x) = x + 1$ is a function. Functions can appear inside predicates: $E(s(x))$ means "the successor of $x$ is even," which is a meaningful statement.
The interplay between predicates, functions, and quantifiers gives predicate logic tremendous expressive power. For instance, we can write: $$∀x \, ∃y \, (y = s(x))$$ which says "for every object $x$, there exists an object $y$ such that $y$ is the successor of $x$."
Semantics of Predicate Logic
To assign truth values to predicate logic formulas, we need an interpretation, which consists of:
A domain: a non-empty set of objects we're reasoning about (e.g., the integers, the real numbers, or any other collection).
An assignment of meanings to each predicate symbol: for an $n$-ary predicate $P$, we specify which $n$-tuples of objects satisfy $P$.
An assignment of meanings to each function symbol: specifying which object each function maps its inputs to.
Once we have an interpretation and we've assigned values to any free variables, we can evaluate whether a formula is true or false.
Example: Suppose our domain is the integers, $E(x)$ means "$x$ is even," and $s(x) = x + 1$. Then:
$E(2)$ is true (2 is even)
$E(3)$ is false (3 is not even)
$E(s(2))$ is $E(3)$, which is false
Interpretation and Model
An interpretation is simply a choice of domain and meaning for all symbols, as described above. A model is an interpretation that makes a particular set of sentences true. If we're given a set of premises and we want to know whether a conclusion follows, we look for models of the premises and check whether the conclusion is true in all of them.
For example, if our premises are "$∀x \, (x \text{ is even} ∨ x \text{ is odd})$" and "$∃x \, (x > 0)$", then a model would be any interpretation (like the integers) where both premises are true.
Validity and Logical Consequence
A sentence is valid if it is true in every possible interpretation. This is predicate logic's version of a tautology. For instance, $∀x \, P(x) → ∀x \, P(x)$ is valid—no matter what domain we choose or what $P$ means, this formula is always true.
A sentence is a logical consequence of a set of premises if it is true in every model (interpretation) of those premises. In other words, whenever the premises are all true, the conclusion must be true. This is how we formalize valid reasoning: an argument is valid if its conclusion is a logical consequence of its premises.
The Completeness Theorem for First-Order Logic
Gödel's completeness theorem is one of the most important results in mathematical logic: If a sentence is true in all models (semantically valid), then there exists a formal proof of that sentence using the rules of first-order predicate logic.
This remarkable theorem tells us that the notion of semantic truth (truth in all interpretations) coincides with syntactic derivability (formal provability). It assures us that a well-designed proof system for predicate logic is both sound and complete, capturing exactly the valid sentences.
The Compactness Theorem for First-Order Logic
The compactness theorem states: If every finite subset of a (possibly infinite) set of first-order sentences has a model, then the entire set has a model.
This theorem is subtle but powerful. It tells us that if we have an infinite collection of sentences and we can verify that every finite subset is satisfiable (has a model where all sentences in that subset are true), then we can conclude that all the sentences together are satisfiable. This is useful for proving that certain infinite sets of constraints can all be satisfied simultaneously.
Why Formal Logic Matters
The ultimate value of formalizing mathematical reasoning is clarity. When we translate informal arguments into formal logical language, hidden assumptions become visible, logical gaps are exposed, and fallacies are prevented. This formalization ensures that mathematical reasoning is rigorous and trustworthy. While propositional and predicate logic may seem mechanical and rigid, they are the bedrock on which all of rigorous mathematics is built.
Flashcards
Into which two closely related parts is the discipline of mathematical logic divided?
Propositional logic
Predicate (first-order) logic
What is the definition of a proposition in logic?
A declarative sentence that is either true or false.
What are the five basic logical connectives and their meanings?
$¬$ (not)
$∧$ (and)
$∨$ (or)
$→$ (implies)
$↔$ (if and only if)
In propositional logic, what is the role of syntax?
Providing rules for forming well-structured formulas from atomic symbols and logical connectives.
In propositional logic, what is the role of semantics?
Assigning truth values to atomic propositions and defining how connectives determine the truth of compound formulas.
What does the Completeness Theorem for propositional logic state?
If a formula is semantically valid (true under every assignment), then a formal proof of that formula exists.
What is the primary expressive advantage of predicate logic over propositional logic?
The ability to express statements about "all numbers" or objects having specific properties.
What is the meaning of the universal quantifier $∀x P(x)$?
For every object $x$, the property $P$ holds.
What is the meaning of the existential quantifier $∃x P(x)$?
There exists an object $x$ such that the property $P$ holds.
In first-order logic, what is the function of a function symbol?
To map objects to other objects (e.g., $s(x) = x + 1$).
How does semantics evaluate the truth of formulas in predicate logic?
By interpreting a non-empty domain of objects and assigning meanings to predicate and function symbols.
In the context of predicate logic, what is an interpretation?
A specific choice of a domain and assigned meanings for the symbols used.
In the context of predicate logic, what is a model?
An interpretation that makes a given set of sentences true.
When is a sentence in predicate logic considered valid?
If it is true in every possible interpretation.
When is a sentence considered a logical consequence of a set of premises?
If the sentence is true in every model of those premises.
What does Gödel’s Completeness Theorem assert for first-order logic?
Every sentence that is true in all models has a formal proof in the first-order proof system.
What does the Compactness Theorem for first-order logic state?
If every finite subset of a set of sentences has a model, then the entire set has a model.
Quiz
Introduction to Mathematical Logic Quiz Question 1: What is a proposition in propositional logic?
- A declarative sentence that is either true or false (correct)
- A question that can be answered with yes or no
- A logical connective that combines statements
- An arithmetic expression involving variables
Introduction to Mathematical Logic Quiz Question 2: What does the universal quantifier ∀x P(x) express?
- P(x) holds for every object x (correct)
- There exists at least one x such that P(x) holds
- P(x) holds for some but not all x
- P(x) is false for all x
Introduction to Mathematical Logic Quiz Question 3: According to the importance of logic, what hidden aspect does formalizing an informal argument reveal?
- Hidden assumptions (correct)
- Hidden conclusions
- Hidden variables
- Hidden theorems
Introduction to Mathematical Logic Quiz Question 4: Which of the following symbols represents a basic logical connective in propositional logic?
- ∧ (and) (correct)
- ⊕ (exclusive or)
- $ (dollar sign)
- ∂ (partial derivative)
Introduction to Mathematical Logic Quiz Question 5: What central problem does mathematical logic aim to solve regarding the formulation of mathematical statements?
- How to express statements without ambiguity (correct)
- How to compute numerical answers efficiently
- How to visualize geometric objects
- How to implement algorithms in code
Introduction to Mathematical Logic Quiz Question 6: What is Gödel's completeness theorem for first‑order logic?
- Every sentence true in all models has a formal proof (correct)
- If a sentence has a proof, it is true in at least one model
- All provable sentences are false in some interpretation
- Models can be constructed only for consistent theories
Introduction to Mathematical Logic Quiz Question 7: What is the main reason mathematicians use formal language and reasoning tools in mathematical logic?
- To express statements precisely (correct)
- To perform complex numerical calculations
- To create visual geometric representations
- To generate random data for experiments
Introduction to Mathematical Logic Quiz Question 8: In propositional logic, how does semantics determine the truth value of a compound formula?
- By applying truth‑tables to the logical connectives (correct)
- By counting the number of atomic symbols
- By referencing an external model of the domain
- By using deduction rules from a proof system
Introduction to Mathematical Logic Quiz Question 9: Which of the following is an example of a proof system used for propositional logic?
- Natural deduction (correct)
- Truth tables
- Boolean algebra simplification
- Informal reasoning
Introduction to Mathematical Logic Quiz Question 10: How does a model differ from a general interpretation in first‑order logic?
- A model is an interpretation that makes a given set of sentences true (correct)
- A model assigns truth values to propositional variables only
- A model defines the syntactic rules of the language
- A model is a proof system for deriving sentences
Introduction to Mathematical Logic Quiz Question 11: What does it mean for a sentence $\phi$ to be a logical consequence of a set of premises $\Gamma$?
- $\phi$ is true in every model of $\Gamma$ (correct)
- $\phi$ can be proved without using any premises
- $\phi$ is true in at least one interpretation
- $\phi$ contradicts at least one premise in $\Gamma$
What is a proposition in propositional logic?
1 of 11
Key Concepts
Foundations of Logic
Mathematical logic
Propositional logic
First‑order logic
Logical connective
Quantifier
Theorems and Models
Model (logic)
Completeness theorem
Compactness theorem
Logical Tools
Truth table
Proof system
Definitions
Mathematical logic
The study of formal languages and reasoning tools that allow precise expression and analysis of mathematical statements.
Propositional logic
A branch of logic that deals with declarative sentences (propositions) combined by logical connectives, focusing on their truth‑functional behavior.
First‑order logic
Also called predicate logic; it extends propositional logic with quantifiers and variables to express statements about objects and their properties.
Logical connective
Symbols such as ¬, ∧, ∨, →, and ↔ that combine propositions to form compound statements and determine their truth values.
Quantifier
Operators (∀ for “for all” and ∃ for “there exists”) that bind variables over a domain in predicate logic.
Model (logic)
An interpretation consisting of a non‑empty domain and assignments of meaning to symbols that makes a set of sentences true.
Completeness theorem
The result that every semantically valid formula (true in all models) can be derived by a formal proof system for the logic.
Compactness theorem
The principle that if every finite subset of a collection of first‑order sentences has a model, then the entire collection has a model.
Truth table
A tabular method that lists the truth values of a propositional formula for all possible assignments of truth values to its atomic components.
Proof system
A formal framework, such as natural deduction or Hilbert‑style calculus, that provides rules for deriving formulas from premises.