Logical variable 2026-10-31
A logical variable is a symbol whose value is supplied by the semantics of a logical language. A propositional variable receives a truth value under a Boolean valuation. An individual variable of first-order logic receives an element of a structure under an assignment. These are different kinds of variable and should not be identified.
Start with the propositional variables as atomic symbols and close under the two formation operations
The set of propositional formulas is the smallest set satisfying these conditions: every logical formula has a finite construction from logical variables by negation and logical implication, and no other strings qualify. In particular, parentheses belong to the binary logical implication formation rule; they cannot be added or removed arbitrarily. Each symbol is one token, regardless of how its index is printed.
The unique readability theorem says that every propositional formula has exactly one of the following forms: a unique propositional variable; for a unique logical formula ; or for a unique ordered pair of logical formulas . These three alternatives are disjoint. Consequently each logical formula has a unique formula syntax tree and a uniquely determined principal logical connective whenever it is not a logical variable.
First note that a substring which is itself a logical formula must coincide with a subtree of the formula syntax tree of the surrounding logical formula. Indeed, a logical formula can begin only at a logical variable, a negation symbol or an opening parenthesis. Every such position in a valid logical formula is the start of one of its parsed subtrees. If is the logical formula at that subtree and is another logical formula starting at the same position, one is an initial segment of the other; prefix-freeness of fully parenthesized formulas from the preceding part forces .
Now consider a final subformula. For a logical variable, it can only be the whole logical formula. For a binary logical implication , every proper subtree is contained in or and finishes before the final closing parenthesis of the whole expression. It therefore cannot be a final substring of the whole. The only remaining possible outer formation is negation. Thus
The second alternative is a necessary possibility, not a claim that every negated logical formula has every one of its subformulas as a suffix.
A useful consequence of the formation rules is that logical formulas form a prefix-free set of strings. To see this, describe a deterministic parser that reads one logical formula from its starting position. On a logical variable it consumes that one symbol. On a negation symbol it recursively reads one following logical formula. On an opening parenthesis it recursively reads a left logical formula, requires a logical implication symbol, recursively reads a right logical formula, and requires the closing parenthesis. Induction on formation proves that, if a valid logical formula begins at the current position, this procedure consumes exactly that logical formula and stops at its end.
Suppose now that both and are logical formulas and . The same parser, started at their common first symbol, must stop both at the end of and at the end of . Its deterministic stopping position cannot differ, so is empty. Hence
This argument applies to symbol strings; it does not use truth values or logical equivalence.
A propositional variable is a single symbol of the alphabet. Its only nonempty substring is that symbol itself. Every propositional formula is nonempty, so the only substring that is a logical formula is . Therefore
The subscript is part of the name of an atomic token; it does not introduce additional symbol positions inside the logical variable.
Fix the particular occurrence of that is being replaced. The subformula analysis above makes it a node of the formula syntax tree of . Proceed by structural induction on the surrounding logical formula.
If this node is the root, the subformula replacement gives , already a logical formula. Otherwise, if , the chosen occurrence lies inside . The induction hypothesis gives a logical formula after the subformula replacement there, and the whole result is the logical formula . If , a proper chosen occurrence lies in exactly one of the two children. Replacing inside that child gives either or , each a logical formula by the formation rule. A logical variable has no proper subformula, so there is no additional base case.
Therefore replacing the designated subformula occurrence by any logical formula preserves well-formedness. The argument concerns one chosen occurrence; it does not require simultaneous subformula replacement of every occurrence of the same string.
A collection of logical connectives is functionally complete, or adequate, if every Boolean function of finitely many propositional variables is represented by a logical formula using only those logical connectives. More explicitly, for every and every there is a logical formula whose truth value under each Boolean valuation is . Constant functions with Boolean values may use an otherwise irrelevant logical variable, for example for truth and for falsity.
An -structure consists of a nonempty domain , an element for each constant symbol, a function for each -ary function symbol, and a relation for each -ary predicate symbol. When equality is part of the logic it is interpreted as actual identity on .
An assignment in a first-order structure is a function from logical variables to . It induces a term valuation of first-order terms recursively:
For an atomic formula, substitute these first-order term values into the interpreted relation, or compare them for equality. Extend satisfaction for a set structure through the truth tables of the logical connectives, and through the quantifier clauses
Thus the first-order structure and assignment in a first-order structure together determine truth values for all logical formulas. A first-order sentence has no free variables, so its truth does not depend on the assignment in a first-order structure.
Gödel's completeness theorem for first-order sentences says that, in a standard sound first-order Hilbert calculus,
Equivalently every first-order consistent set of first-order sentences has a first-order model: apply this existence statement to for the consequence formulation.
For the first-order model existence formal proof use a Henkin construction. Enlarge the language by fresh constant symbols and adjoin Henkin witness axioms
Freshness of preserves first-order consistency. In detail, if a contradiction followed after adjoining one witness axiom, the deduction theorem for first-order logic would yield its negation, from which one obtains both and over the old theory. Since the new constant symbol does not occur in that theory or in , replace it by a fresh logical variable and generalize to derive , a contradiction. Finitely many witness additions preserve first-order consistency successively, and unions preserve first-order consistency because formal proofs are finite. Iterate the enlargement so that logical formulas involving newly introduced constant symbols also receive witnesses. Include at least one constant symbol to guarantee closed terms.
Extend the resulting first-order consistent witnessed first-order theory to a maximal consistent set of first-order sentences . In the equality-free case make the domain the set of closed terms. Interpret constant symbols and function symbols by their formal first-order term constructions; interpret an atomic formula by
The truth lemma for a Henkin term model follows by induction on logical formulas with closed terms substituted for their free variables. The logical connective steps use maximal consistency of a first-order theory. In the existential step, membership of supplies a witness constant and hence a first-order term satisfying ; conversely a satisfying closed term gives the existential sentence by an inference of the calculus. The term model consequently satisfies and the original theory. Equality is absent here, so distinct closed terms may remain distinct domain elements without further identifications.
Bounded completeness of an arithmetic theory means that every bounded arithmetic first-order sentence true in the standard natural numbers is provable in . If is first-order consistent and proves a false bounded arithmetic sentence , bounded completeness of an arithmetic theory also proves its true bounded negation, a contradiction. Conversely, if every bounded theorem is true, cannot be inconsistent, because inconsistency would prove the false bounded arithmetic sentence . Thus
If is one-consistent and proves with bounded matrix, that existential sentence cannot be false: otherwise every would be a true bounded arithmetic sentence and hence provable, contrary to one-consistency. Thus has Sigma-1 soundness.
Conversely, Sigma-1 soundness excludes inconsistency. If , it supplies a standard witness with true. Bounded completeness of an arithmetic theory proves , so first-order consistency forbids a formal proof of . Hence there cannot simultaneously be refutations of all standard instances. Therefore
Finite blocks of existential logical variables are treated as finite tuples of witnesses, with the same argument.
Use the first-order language with one equivalence relation . Let have exactly two equivalence classes, one countably infinite and one uncountable, with no further first-order structure. Its complete theory says that there are exactly two classes and both are infinite.
This first-order theory has quantifier elimination. To eliminate one existential logical variable from a conjunction of atomic formulas and negated atomic formulas, a logical equality either fixes its value, or finitely many inequalities exclude finitely many points. Its required equivalence-class membership is determined by the finitely many existing classes represented among the parameters. A required unused class exists exactly when fewer than two classes have already been used. Once its class is possible, infinitude supplies a point avoiding the finite exclusions. These tests are quantifier-free logical equality and equivalence conditions on the parameters. Disjunctive normal form and induction eliminate all quantifiers and also show completeness.
Thus a finite tuple's complete type is isolated by its finite equality-and-equivalence pattern. Every realized finite-tuple partial type is principal, so is atomic. In particular all individual elements have the same complete one-type, isolated by .
Choose in the countable class and in the uncountable class. Any automorphism taking to would give a bijection from their whole equivalence classes, impossible because their cardinalities differ. Therefore
Its uncountability is precisely what avoids the conclusion of (iii).
An arithmetic logical formula is , or bounded, if all its quantifiers are bounded by arithmetical first-order terms. A logical formula has an initial block of existential quantifiers followed by a bounded matrix, up to the usual logical transformations. Soundness of an arithmetic theory at a given level means that every first-order sentence of that level proved by the first-order theory is true in the standard natural numbers. Here -completeness means that every true bounded arithmetic sentence is provable.
A first-order theory is one-consistent if there is no bounded arithmetic formula for which it proves while proving for every standard natural number . This is a restricted form of omega-consistency. In particular one-consistency implies first-order consistency, since an inconsistent first-order theory proves every first-order sentence and its negation.
Suppose a -complete first-order theory is first-order consistent. If it proved a false bounded arithmetic sentence , the true bounded arithmetic sentence would also be provable by completeness, contradicting first-order consistency. Thus is -sound. Conversely -soundness excludes inconsistency because an inconsistent first-order theory proves the false bounded arithmetic sentence . Therefore
If is one-consistent but proved a false existential sentence with bounded matrix, every standard instance would be true and hence provable. This violates one-consistency. Thus it is -sound. Conversely, -soundness implies first-order consistency by the previous argument, since bounded arithmetic sentences are included at the existential level. If proved , soundness of an arithmetic theory would give a standard witness with true. Bounded completeness of an arithmetic theory would then give , so first-order consistency prevents simultaneous formal proofs of all the negated instances. Hence
Multiple existential logical variables can be treated as a finite tuple of witnesses; the same reasoning applies.
An -structure has a nonempty underlying set . It assigns to each constant symbol an element , to each -ary function symbol a function , and to each -ary predicate symbol a relation contained in . Logical equality, when included as logical equality, is interpreted as actual identity.
The arities belong to the specification of the first-order language. An assignment of logical variables to elements of then evaluates first-order terms recursively and determines satisfaction of logical formulas through the logical connectives and quantifiers. A first-order sentence has no free variables, so its truth in the first-order structure is independent of the assignment.
Take the first-order theory of an infinite set in the first-order language of logical equality alone, with an axiom asserting at least distinct elements for each positive integer . It is complete and eliminates quantifiers: a new logical variable either equals a specified old logical variable or is required to avoid only finitely many existing values, which an infinite domain permits.
For every infinite cardinal , any two first-order models of size are isomorphic because every bijection between their underlying sets preserves logical equality, the whole first-order language. Thus
Its complete -types record only the partition of coordinate indices according to logical equality. There are finitely many such partitions, and each is isolated by the corresponding logical equalities and inequalities. Ryll-Nardzewski therefore recovers countable categoricity; there are no nonprincipal complete finite-arity partial types to omit in this example.
The same complete theory of an infinite pure set provides this property directly. For logical variables, each complete type specifies exactly which logical variables are equal. First-order consistency requires an equivalence relation on the finite index set, and infinitude ensures every such partition is realizable. Hence
where is the th Bell number, counting partitions of an -element set. For example the first values are , and . The isolating conjunction lists logical equality within blocks and inequality between blocks. This explicitly verifies the hypothesis which Ryll-Nardzewski identifies with -categoricity.
Use the first-order theory of a bijection with named inverse and no finite cycles. Its axioms are
Every first-order model is a disjoint union of free two-sided integer orbits. Write for positive powers of and for powers of when is negative.
This first-order theory is complete and eliminates quantifiers. Every first-order term reduces to , and atomic logical formulas reduce to statements . To eliminate an existential logical variable in a conjunction of literals, first remove self-equalities using the no-finite-cycle axioms. If an equation fixes that logical variable as an integer translate of another logical variable, substitute that value. If no such equation remains, only finitely many points are excluded by the remaining inequalities, so some value exists in the infinite domain. Apply this to disjunctive normal form and then induct on logical formulas. The resulting parameter-free first-order sentences are decided, proving completeness.
For each fixed finite , a complete type records a partition of the logical variables into common orbits and finitely many integer offsets within each block. There are countably many possibilities. Countable first-order models with one orbit and with two orbits are not isomorphic, so the first-order theory is not -categorical.
Thus this example has the source's explicitly defined countable-type property. In fact it also satisfies ordinary omega-stability: over a countable parameter set, an element is either a specified integer translate of a parameter, giving countably many possibilities, or lies in an entirely new orbit, giving one further complete one-type. The same finite-orbit-pattern description handles finite tuples. Therefore
The source prints the label “-stable”; the construction meets its stated definition as well as the usual stronger omega-stability condition. The difference between countably many and finitely many partial types is exactly why Ryll-Nardzewski does not yield categoricity here.
Reuse the complete free-bijection theory from part (e). Quantifier elimination shows that every one-variable atomic statement is already decided by the no-finite-cycle axioms. Thus there is exactly one complete one-type, isolated by .
For two logical variables, each integer gives a different complete type isolated by
There is also the complete type
saying that the two elements lie in different orbits. These exhaust the possibilities by quantifier elimination. In particular
The last complete type is a nonprincipal complete type. Any logical formula uses only finitely many integer offsets after quantifier elimination; a pair in a single orbit with a sufficiently different offset agrees with a different-orbit pair on those tests. Hence no single logical formula can isolate .
The one-orbit first-order model omits , while a two-orbit first-order model realizes it. This illustrates the omitting types theorem and shows concretely why finitely many complete one-types alone cannot replace the all-arities condition in Ryll-Nardzewski.
The Ryll-Nardzewski theorem says that for a complete theory in a countable first-order language with infinite first-order models, the following are equivalent: is -categorical; for every positive integer , the set of complete parameter-free -types is finite; every such finite-arity complete type is isolated by a logical formula. The countable-language hypothesis and the requirement for every finite arity are important.
In the grammar , no logical formula is a proper initial segment of another. A recursive parser reads one variable, or a negation followed by one formula, or a parenthesized pair of formulas separated by implication. Structural induction shows that this parser consumes precisely one whole formula. Its deterministic stopping position proves prefix-freeness. Consequently any formula substring in a valid formula coincides with the formula of a syntax subtree.