Full semantics for second-order logic Created 2026-10-06 Updated 2026-10-14
Under full semantics for second-order logic, a second-order relation variable of arity ranges over exactly , the external power set of the appropriate Cartesian product. Thus
and universal quantification over checks every such subset. Here the power set is taken in the ambient mathematical universe, not merely among relations definable by formulas or represented by objects inside .
For , a unary second-order relation variable has eight possible values, including the three singletons needed by the second-order encoding of three-colorability. The three unary witnesses can range independently over those eight subsets, giving candidate triples before the first-order sentence is checked; only six triples pass for the complete graph . For , there are candidate triples and none passes. Distinguishing the range of candidates from the constraints on valid witnesses clarifies both full semantics for second-order logic and the verifier view of NP.
The appeal of full semantics for second-order logic is its literal reading of assertions about every subset or every relation. A first-order structure fixes the second-order ranges automatically, in contrast to Henkin semantics. That expressive force comes with a limitation: there is no effective, sound deductive system complete for all valid second-order logic sentences under full semantics for second-order logic. This limitation and the change of intended models motivating Henkin semantics are described at the start of [ref].
For a domain , an external functional graph with all its individual ordered pairs in is therefore available, even if the whole graph does not belong to . More generally, a binary second-order relation variable can denote any external subset of ; its ordered pairs need not themselves be elements of the individual domain. Having endpoints in the domain is what matters. This distinction between internal objects and externally available relations is essential when applying second-order logic to the cumulative hierarchy.
Henkin semantics Created 2026-10-06 Updated 2026-10-14
In Henkin semantics, a domain is accompanied by designated ranges for second-order relation variables of each arity . A formula searches only , and checks only . These ranges can be proper subcollections of the external power set. Keeping and its input relations fixed therefore need not fix the truth of a second-order logic sentence.
As a toy illustration of restricted quantification, take and unary range . The sentence
is true under full semantics for second-order logic, but false with this selected range, because neither singleton is available. Likewise, on the complete graph , the unary range admits no witness for the second-order encoding of three-colorability, even though a usual proper vertex coloring exists. This toy range illustrates the truth definition only: it fails second-order comprehension for the formula , and is not a model of a system requiring that comprehension instance.
Admissible Henkin semantics for a specified deductive system must satisfy its axioms, including its chosen second-order comprehension requirements or analogous closure conditions for predicate abstraction. Closure is relative to the permitted formulas and parameters, rather than a blanket property of every selected family. In particular, on a finite domain, allowing logical equality, individual parameters, all finite logical disjunctions, and comprehension for those formulas forces every finite-arity relation to be available: enumerate its tuples and disjoin the formulas naming them. Thus a proper restricted finite range cannot satisfy that entire scheme.
Treating each as an additional sort, with an application relation between its members and individuals, translates this relational presentation into first-order logic with several sorts. Include axioms saying that predicates with the same members are equal, together with whatever second-order comprehension the system requires. This makes Henkin semantics useful for bringing first-order logic methods to reasoning about predicates; it does not license conclusions about all external relations.
Leon Henkin's Completeness in the Theory of Types, Journal of Symbolic Logic 15 (1950), pp. 81–91 develops general models and proves completeness for his typed deductive system. Its opening footnote 5 explicitly discusses closure under operations associated with formula formation. Henkin later described the discovery process in his [ref]; that later account is a historical recollection, distinct from the original publication.
A useful precise form of the Ehrenfeucht-Mostowski theorem is this: for an infinite structure and any linear order , a model of can be generated as a Skolem hull by distinct order indiscernibles . Every order automorphism of extends to an automorphism of that hull in the chosen Skolem language. One may first name all elements of , giving an elementary extension containing the original structure. The generation and uniqueness assertions concern this specified expansion, not arbitrary automorphisms of its reduct.
Choose a Skolem expansion : for each existential formula add a function selecting a witness whenever one exists. Introduce constants for . Take the theory of , distinctness of these constants, and all equivalences
The formulas here are in the fixed expanded language, without the newly added as extra parameters. If naming , use its complete elementary diagram and allow those original names in the formulas.
Every finite fragment has a model by Ramsey's theorem. Only finitely many formulas and constants occur. Take a sequence of distinct elements of . For each arity appearing, color the increasing tuples from this sequence by the finite vector of truth values of all formulas of that arity. Successive Ramsey thinning gives an infinite subset homogeneous for each of these finitely many colorings. Assign the finitely many constants in increasing order to distinct elements of this subset. This satisfies every displayed equivalence in the fragment; the original theory is satisfied because the underlying structure remains . Compactness now gives a model of the full theory, with the required order-indiscernible sequence.
The substructure generated by the constants under the Skolem functions is elementary: any existential formula with parameters which are terms in the generators has its Skolem witness in that same hull. If is an order automorphism of , define
Indiscernibility makes this well-defined, by applying it to the equation between any two term representations using the increasing tuple of all their indices. The same argument preserves every relation and function; supplies the inverse. It is unique in the generated Skolem structure. This completes the Ramsey proof, rather than stopping at the existence of indiscernibles.
For simple typed set theory with atoms, use sorts and membership only from to . A set predicate distinguishes sets from atoms, extensionality compares sets of the same positive type, and comprehension produces in type every subset of defined by a well-typed formula. Atoms have no members. First-order models use Henkin semantics; they are not required to have their next domain equal to the full external power set. Typical ambiguity is the schema for each closed sentence, where every sort index in is raised by one.
We show finite satisfiability of this entire typed theory with ambiguity. Choose a list of ranks above , spaced by at least two. For a finite increasing selection of ranks , let
where is the set of objects declared to be sets at type . Membership from to is ordinary membership restricted to objects of ; all other type- objects are atoms. The spacing puts inside . Thus comprehension and set extensionality hold exactly, and atoms have no typed members. There are infinitely many objects at every visible type, so any usual typed infinity requirement also holds.
The auxiliary rank provides a uniform interpretation if a set predicate is allowed at type zero; no type-minus-one domain is used in the theory. This avoids artificially declaring all type-zero objects to be atoms, which would not be invariant under type-raising. If the language has no type-zero set predicate, simply ignore this auxiliary interpretation.
A finite set of ambiguity instances uses finitely many closed sentences of bounded highest type, say at most . Color increasing -tuples of ranks by their finite truth vector in the structure with visible domains and the auxiliary preceding rank. Ramsey's theorem gives an infinite homogeneous rank set. Choose consecutive ranks from it and build the hierarchy on all these ranks. The first window evaluates each original sentence; shifting the window one place evaluates its uniform type-raise. Homogeneity makes the truth vectors equal. All finite typed axioms and the selected ambiguity instances therefore hold together. Choosing large enough covers every sort needed by the finite fragment. Many-sorted compactness, equivalently ordinary first-order compactness after encoding sorts, yields
This is a model existence argument in the ambient set theory; no equality of adjacent type cardinalities is claimed. The gaps between ranks supply atoms, and the ambiguity is about truth of sentences, not a bijection between domains.
For the Ehrenfeucht-Mostowski theorem, let be an infinite first-order structure and any linear order. Choose a full Skolem expansion : add witness functions for existential formulas, repeat in the expanded languages, and take their union. We will construct a model of its theory containing distinct generators , , forming an order-indiscernible sequence.
Adjoin the elementary diagram of , the inequalities for , and for every expanded-language formula and every two increasing -tuples of indices, the sentences
Every finite subcollection is satisfiable in . To prove this, choose a countably infinite sequence of distinct elements of , and for each of the finitely many relevant arities color its increasing index tuples by the finite vector of truth values of the formulas of that arity. Repeated applications of the Ramsey's theorem give an infinite subsequence homogeneous for all these finitely many finite colorings. Interpret the finitely many mentioned by its elements in their index order. All indiscernibility and distinctness constraints hold, and the finite diagram fragment holds because the ambient structure is still .
By compactness theorem, a model of the full enlarged theory exists. Its Skolem hull generated by the is elementary: whenever an existential formula with parameters in holds in , its chosen witness function returns a value in , so the Tarski-Vaught test applies. Its reduct is a model of . If the index order has size , the hull has size at most , and it contains distinct generators.
Every order automorphism of induces the automorphism
To check well-definedness, write any two terms being compared over the same increasing list of their generators. Their equality is an expanded-language formula; indiscernibility of the order-indiscernible sequence preserves its truth under . The same argument preserves each relation, and the term construction preserves the functions. Applying gives the inverse. The extension is unique in the specified Skolem language since every hull element is a term in the generators; no uniqueness among all automorphisms of the reduct is being asserted. This proves the Ehrenfeucht-Mostowski theorem, including its usual automorphism consequence.
For simple typed set theory with atoms, use sorts , predicates for sets, and typed membership from sort to sort . Atoms have no members, extensionality compares sets, and every well-typed formula defines a set of the next sort. Typical ambiguity is the schema for every closed typed sentence, where the superscript raises all types by one.
Here are concrete full typed models before imposing the ambiguity schema. Choose increasing natural numbers and set
The auxiliary merely interprets the set predicate at the lowest sort. Define typed membership by
Then the other objects of are atoms, regardless of their old membership. Every subset of has its representative in , giving comprehension even for formulas with higher-sort quantifiers and parameters. Extensionality holds for the set representatives and atoms have no typed members. The rank gaps leave infinitely many atoms at each sort, and all sorts are infinite.
Consider finitely many ambiguity instances with unraised sentences , and choose a fixed window length sufficient to include every sort used and its auxiliary predecessor. Color every increasing -tuple of natural numbers by the vector of truth values of these unraised sentences in its finite rank-window interpretation. There are only colors. The Ramsey's theorem gives an infinite homogeneous set. Choose successive points from it. The first points and last points have the same color, while the latter interpretation of is exactly the former model's interpretation of . The auxiliary predecessor shifts too, so this remains true for sentences mentioning the lowest set predicate. Extend the chosen rank sequence arbitrarily to interpret the remaining sorts. This yields a model of typed set theory satisfying all the specified ambiguity instances.
Thus every finite subset of the typed axioms together with all ambiguity instances has a model. Applying multisorted compactness theorem gives
The final model satisfies first-order typed comprehension, with quantification over its own sorts and sets as in Henkin semantics.
The axiom of infinity excludes and all smaller stages, so the cardinal is uncountable. Full semantics for second-order logic is decisive: every externally specified functional relation whose ordered pairs lie in is an allowed class parameter, even if the relation itself is not an element of .
If , choose an external cofinal function . Its graph is an allowed class parameter: each input, output and ordered pair has rank of a set below the infinite cardinal , which is a limit ordinal. The domain belongs to . The second-order form of Axiom schema of replacement would give its range as an element of . But a cofinal subset of has rank of a set and cannot belong to . Therefore .
If for a cardinal , choice supplies an external surjection . The domain belongs to and the ordered pairs of its graph have ranks below . Applying Axiom schema of replacement to this external functional class would put its range, the ordinal , in , again impossible. Hence for every .
Consequently
These are exactly the defining conditions for a strongly inaccessible cardinal. This full second-order replacement rank obstruction would not follow from Henkin semantics, where the available class relations may exclude the external functions just used.
Second-order comprehension is a scheme asserting the existence of a second-order relation variable whose members are exactly the tuples satisfying a permitted formula:
Here is not free in , and the displayed individual and relation parameters are universally closed in each instance. Under full semantics for second-order logic, the selected external subset of is always available. Under Henkin semantics, the selected subset must lie in for every allowed assignment of parameters. Different systems permit different formula classes: for example, arithmetical comprehension theory restricts comprehension to formulas without bound set variables, while still permitting set parameters. Consequently, the exact formula and parameter policy must accompany any claim that a restricted range satisfies second-order comprehension.
Second-order logic Created 2026-10-06 Updated 2026-10-14
Second-order logic extends first-order logic by allowing existential quantification and universal quantification over second-order relation variables, as well as over individual objects. In the relational presentation used here, an individual variable ranges over a domain , while a second-order relation variable of arity denotes a subset of . Unary second-order relation variables denote subsets of ; binary ones denote binary relations. Presentations with function variables can instead describe their graphs by second-order relation variables, with first-order formulas requiring a unique output for every input.
For a graph with vertices and fixed graph adjacency , the first-order sentence says that every vertex has a neighbour. It selects individual vertices while retains its given interpretation. By contrast,
selects an entire subset and says that it is a nonempty independent set. Here is a unary second-order relation variable, rather than a symbol in the input first-order signature. This particular property also has a simple first-order sentence on simple graphs; the example illustrates the change in what can be selected, rather than proving a separation in expressive power.
The usefulness of second-order logic is that one can describe a whole proposed solution, such as a graph coloring, and then impose local constraints on it. Syntax alone does not specify which proposed relations are available: full semantics for second-order logic permits all external subsets of , whereas Henkin semantics supplies designated ranges. The second-order encoding of three-colorability makes this distinction concrete.
Objects have sorts , with membership allowed only from sort to sort . A set predicate distinguishes sets from atoms; atoms have no members, extensionality applies to sets, and every well-typed formula defines a set in the next sort by comprehension. First-order models may have only a specified collection of subsets, as in Henkin semantics. For a full finite-type model, take at widely separated increasing ranks, represent sets at level by , and treat the remaining objects as atoms under typed membership.