Second-Order Logic and Beyond/Second-Order Languages

Lesson 9.11,921 words

Second-Order Languages

Second-order logic quantifies over relations and functions, not just individuals. Second-order Peano arithmetic and the second-order theory of the reals become categorical, and finiteness is definable by a single sentence.

╌╌╌╌

First-order logic quantifies over the members of a structure's universe and nothing else. A quantifier ranges over individuals; there is no way to say for every relation or for every function. That restriction is what gives first-order logic its good behavior: compactness, completeness, the Löwenheim–Skolem theorems. Second-order logic lifts the restriction. We add variables that stand for relations and functions and allow quantifiers to bind them, obtaining a language that can single out structures the first-order language cannot even approximate. The metatheorems that made first-order logic tractable fail under the change.1

The formula

is valid — true in every structure, no matter how the predicate parameter is interpreted. Because its truth does not depend on the reading of , we are entitled to bind itself and assert

a sentence whose only parameter is the quantifier symbol. Here has been promoted from a fixed parameter to a bound predicate variable, and the sentence quantifies over all possible interpretations of a one-place relation.

The additional symbols

To the alphabet of first-order logic we adjoin two new families of logical symbols.

  • Predicate variables. For each positive integer , the -place predicate variables , each ranging over -ary relations on the universe.
  • Function variables. For each positive integer , the -place function variables , each ranging over -ary operations on the universe.

The ordinary variables are now called individual variables to prevent confusion. Subscripts and superscripts are dropped when they are immaterial or clear from context.

Terms are built as before from constant symbols and individual variables by applying function symbols — where function symbols now includes both the function parameters of the language and the new function variables. Atomic formulas are still strings in which is an -place predicate symbol (a parameter or a variable) and each is a term. The inductive definition of well-formed formula gains two clauses.

Predicate parameters and free predicate variables play essentially the same role, mirroring the tight relationship between constant symbols and free individual variables, and between function parameters and free function variables. The genuinely new content is the two quantifier clauses.

Three tiers of variable. Individual variables range over points of the universe; predicate variables over its relations; function variables over its operations. Only the top two tiers are new.

Satisfaction with the new quantifiers

A structure remains what it was for first-order logic: a function on the parameters supplying a nonempty universe and interpreting each predicate, function, and constant symbol. Nothing about the structure changes. What changes is the assignment and the satisfaction recursion.

Let be the set of all variables. A variable assignment now sends each variable to an object of the matching type:

  • is a member of the universe ,
  • is an -ary relation on ,
  • is an -ary operation on .

The value of a term is defined by the obvious recursion: if is a function variable, applies the operation to . Satisfaction of an atomic formula built from a predicate variable reads off the relation assigns:

The connective and individual-quantifier clauses are unchanged. The two new clauses interpret the second-order quantifiers by ranging over all relations and all functions of the right arity.

The word standard marks the decisive choice: quantifies over every relation on the universe — the entire power set of -tuples — with no room for interpretation. Only the values of at variables occurring free matter, so a sentence is unambiguously true or false in , and logical implication is defined exactly as before. General structures relax this; here the range of a second-order quantifier is fixed to everything on the universe.

A second-order quantifier over a one-place predicate variable ranges over the full power set of the universe, one binding covering every subset at once.

Expressive power of the language

Four properties that no set of first-order sentences can capture each become a single second-order sentence.

Well-ordering. An ordering is a well-ordering when every nonempty subset has a least element. Quantifying over the subset ,

The induction postulate. Peano's induction axiom states that any set of natural numbers containing and closed under successor is all of them. In the second-order language of arithmetic this is one sentence:

Least upper bounds. In an ordered field, every bounded nonempty set has a least upper bound:

Infinity. A set is infinite exactly when it carries a transitive irreflexive relation whose domain is the whole set, or equivalently when it admits an injection that is not surjective. Either fact is one sentence:

In first-order logic there are at least things needs a separate sentence for each , and infinitude is captured only by the infinite set — never by a single formula, since compactness forbids it. Second-order logic states the same class of models, the infinite structures, with the one sentence .

Comprehension

The second-order language can also assert that relations and functions exist. For any formula in which the -place predicate variable does not occur free,

is valid: it says there is a relation holding of exactly the tuples that satisfy . These are the relation comprehension formulas, and there is a matching function comprehension schema asserting that a formula defining a total single-valued relation is the graph of some function. Comprehension records the standard semantics' commitment: every formula-definable relation is actually present in the range of the predicate quantifiers, because that range is the full power set. As the defining axioms of general structures, these comprehension sentences can no longer be taken for granted.

Categoricity

This expressiveness makes structures categorical — determined up to isomorphism by a set of sentences.

First-order logic cannot be categorical for any structure with an infinite model: by the Löwenheim–Skolem theorems an infinite first-order model has models of every larger cardinality, none of them isomorphic to it. Second-order logic escapes this. Take the language with parameters and , and the sentences

together with the second-order induction postulate. Every model is isomorphic to the standard structure : the induction axiom rules out the extra -chains that a first-order theory of successor must tolerate. The set is categorical.

Second-order induction is categorical for arithmetic. The first-order successor axioms permit an extra integer-like chain disconnected from zero; the induction axiom quantifies over the subset of standard points and forbids it.

The same construction characterizes other structures. Conjoining the first-order axioms for an ordered field with the second-order least-upper-bound sentence produces a sentence whose models comprise the isomorphs of the ordered field of real numbers and nothing else. Where first-order logic can only characterize classes of structures loosely, second-order logic can name individual structures.

The metatheorems fail

Every metatheorem that made first-order logic well-behaved fails for standard second-order semantics, and the same sentence shows why.

The witness is . Each finite subset mentions only and finitely many , so a large enough finite set satisfies it. But the whole set demands a structure that is not infinite yet has at least elements for every , which is impossible. First-order compactness depended on exactly the finiteness that defeats.

The Löwenheim–Skolem theorems fail too. Call the language with equality and no parameters other than the quantifier the language of equality; a structure for it is just a nonempty set, determined up to isomorphism by its cardinality.

The construction takes the sentence characterizing the real ordered field up to isomorphism, then existentially quantifies over its parameters — replacing each with a variable of the matching type. The result is true in a bare set precisely when that set can be organized into a copy of the reals, which happens exactly when its cardinality is . No first-order sentence can constrain a set's cardinality this way; downward Löwenheim–Skolem would immediately supply a countable model.

Finally, the enumerability of validity collapses.

The argument reruns Tarski's undefinability theorem: the second-order theory of is not second-order definable in . Because the categorical sentence — the arithmetic axioms conjoined with second-order induction — has only as a model,

so second-order validity is at least as complex as . It is therefore neither arithmetical nor recursively enumerable: the enumerability theorem, and with it any hope of a complete deductive calculus, fails for standard second-order logic.

PropertyFirst-order logicStandard second-order logic
Compactnessholdsfails
Löwenheim–Skolemholdsfails (cardinality is definable)
Completeness / effective axiomatizationholdsfails (validity is not definable)
Set of validitiesrecursively enumerablenot even arithmetical
Categorical for , impossibleyes
Defines infinite, cardinalitiesimpossibleyes

Second-order axioms versus first-order schemas

The contrast is sharpest at the induction principle, which appears in both logics but means different things. The second-order induction postulate is the single sentence

whereas its first-order counterpart is a schema — the infinite set of all sentences

as ranges over first-order formulas with one free variable.

The difference is which subsets the principle reaches. A model of the second-order postulate satisfies induction for every subset of its universe containing and closed under — so that subset must be the whole universe, forcing the model to be . A model of the first-order schema satisfies induction only for the definable subsets; undefinable subsets can escape it. A nonstandard model of with -chains satisfies the first-order schema — the set of standard points is not definable, so no instance of the schema pins it down — yet violates the second-order postulate outright.

The two induction principles differ in reach. The first-order schema constrains only the definable subsets; the second-order sentence constrains every subset of the universe.

The single sentence characterizes because it speaks about subsets no effective calculus can enumerate, which is why no effective calculus is complete for it. Expressive power and metatheoretic tameness trade off directly: Skolem functions and many-sorted logic keep second-order variables as a bookkeeping device over a first-order core, while general structures recover every lost metatheorem by shrinking the range of the quantifiers.

Footnotes

  1. Enderton, §4.1. The additional symbols, the two satisfaction clauses, Examples 1–5, and Theorems 41A–41C are drawn from this section; the standard semantics quantifies over the full power set, which is the source of both the expressive gains and the metatheoretic failures.

╌╌ END ╌╌