ConceptComplete

Predicate Logic - Examples and Constructions

First-order logic provides the formal language for expressing mathematical statements across all areas of mathematics, from number theory to topology.

ExampleFormalizing Mathematical Statements

Number Theory: "Every even number greater than 2 can be expressed as the sum of two primes" (Goldbach's Conjecture):

∀x (Even(x)∧x>2→∃y ∃z (Prime(y)∧Prime(z)∧x=y+z))\forall x \, (\text{Even}(x) \land x > 2 \to \exists y \, \exists z \, (\text{Prime}(y) \land \text{Prime}(z) \land x = y + z))

Analysis: "A function ff is continuous at aa":

∀ϵ>0 ∃δ>0 ∀x (∣x−a∣<δ→∣f(x)−f(a)∣<ϵ)\forall \epsilon > 0 \, \exists \delta > 0 \, \forall x \, (|x - a| < \delta \to |f(x) - f(a)| < \epsilon)

Set Theory: "A set XX is infinite":

∀n∈N ∃f:{1,…,n}→X (injective(f))\forall n \in \mathbb{N} \, \exists f: \{1, \ldots, n\} \to X \, (\text{injective}(f))
DefinitionPrenex Normal Form

A formula is in prenex normal form (PNF) if it has the form:

Q1x1 Q2x2 ⋯ Qnxn ψQ_1 x_1 \, Q_2 x_2 \, \cdots \, Q_n x_n \, \psi

where each QiQ_i is either ∀\forall or ∃\exists, and ψ\psi is quantifier-free. Every first-order formula is logically equivalent to a formula in prenex normal form.

ExampleConverting to Prenex Normal Form

Convert ϕ=∀x P(x)→∃y Q(y)\phi = \forall x \, P(x) \to \exists y \, Q(y) to PNF:

  1. Eliminate implication: ¬∀x P(x)∨∃y Q(y)\neg \forall x \, P(x) \lor \exists y \, Q(y)
  2. Move negation inward: ∃x ¬P(x)∨∃y Q(y)\exists x \, \neg P(x) \lor \exists y \, Q(y)
  3. Rename variables if needed: already distinct
  4. Move quantifiers out: ∃x ∃y (¬P(x)∨Q(y))\exists x \, \exists y \, (\neg P(x) \lor Q(y))

The result is in PNF with two existential quantifiers.

DefinitionSkolemization

Skolemization is a transformation that eliminates existential quantifiers by introducing new function symbols (Skolem functions). Given a formula of the form ∀x1⋯∀xn ∃y ϕ\forall x_1 \cdots \forall x_n \, \exists y \, \phi, replace it with ∀x1⋯∀xn ϕ[y/f(x1,…,xn)]\forall x_1 \cdots \forall x_n \, \phi[y/f(x_1, \ldots, x_n)] where ff is a new nn-ary function symbol.

The resulting formula is not equivalent to the original but is equisatisfiable: one is satisfiable if and only if the other is.

ExampleSkolemization Process

Consider ϕ=∀x ∃y ∀z ∃w P(x,y,z,w)\phi = \forall x \, \exists y \, \forall z \, \exists w \, P(x, y, z, w):

  1. Skolemize the first existential: replace yy with f(x)f(x) where ff is a new unary function Result: ∀x ∀z ∃w P(x,f(x),z,w)\forall x \, \forall z \, \exists w \, P(x, f(x), z, w)

  2. Skolemize the second existential: replace ww with g(x,z)g(x, z) where gg is a new binary function Result: ∀x ∀z P(x,f(x),z,g(x,z))\forall x \, \forall z \, P(x, f(x), z, g(x, z))

The final formula is universal and quantifier-free in its matrix.

Remark

Skolemization is central to automated theorem proving. By eliminating existential quantifiers, we can focus on finding substitutions for universal variables. The resolution method, a complete refutation procedure for first-order logic, operates on Skolemized formulas in clause form, making it the workhorse of modern theorem provers.

DefinitionHerbrand Universe

For a first-order language L\mathcal{L}, the Herbrand universe H(L)H(\mathcal{L}) is the set of all ground terms (variable-free terms) constructible from the constants and function symbols of L\mathcal{L}. If L\mathcal{L} has no constants, add an arbitrary constant. The Herbrand universe provides a canonical domain for interpreting formulas.

These constructions transform first-order formulas into standard forms that facilitate both theoretical analysis and practical automated reasoning.