Begin with the variable typing judgment . Because is absent from this typing context, the lambda abstraction rule permits to have type :
Assign the entire lambda application type using the universal typing axiom, without attempting to assign a function type to . Then
Although is a free variable of the body, it is absent from its recorded typing context. Consequently the lambda abstraction rule allows any simple type for . Abstract over and then :
The side condition for holds because is absent; the side condition for holds because its recorded simple type is . Thus
The exact restriction in the ordinary simply typed lambda calculus is
Thus the unrestricted choice of available in part (c) fails. A reading of the printed sentence as asserting impossibility for every choice of is false. This issue occurs in the original PDF as well as its transcription.[ref]
To prove necessity, first observe why the ordinary rules cannot hide assumptions. Structural induction on a derivation proves
For a variable, both sides are the singleton containing that variable. For lambda application, both sides are the union of the two premise supports. For lambda abstraction, both sides delete the bound variable. There is no universal typing axiom to interrupt this equality.
Now invert the proposed derivation. Each outer lambda abstraction must have been introduced by the abstraction rule, since the other ordinary rules conclude a variable or a lambda application. The body must therefore have the typing judgment
The support equality just proved ensures that both displayed assumptions occur; consistency fixes their simple types to those specified by the outer function type. Inverting the lambda application gives a simple type for its argument and the following premises:
There is no flexibility in the supports: has the single free variable , whereas has both free variables . Invert the second lambda application. Its two premises must be
for some simple type . The variable rule is the only possible final rule for each premise. It forces and , yielding .
Conversely, suppose . The ordinary rules give
The typing contexts are consistent, so another lambda application gives the body type . Two lambda abstractions discharge and , establishing
This proves sufficiency and supplies a family of counterexamples to the literal impossibility claim. For a concrete failure of the unrestricted claim, choose and as atomic type variables. The type variable is not a function type , so no derivation exists for that fixed pair. Here the atomic type variables are fixed type expressions, rather than unknowns that one may change during type inference.
The reason for the restriction is the otherwise discarded lambda application : the ordinary rules still type-check it. Its subsequent disappearance under beta reduction does not license reversing that beta reduction while preserving every simple type of the result. The beta-normal form admits arbitrary , whereas the unreduced lambda term has the additional constraint just derived.
Again write for bracket abstraction. In combinatory logic, all variable occurrences are free variables. Under and , substitution for preserves the presence or absence of :
An existing is not replaced because ; replacing cannot introduce an because contains none. This ensures that the same clause of bracket abstraction applies before and after substitution.
Use structural induction on , respecting those clauses. If , then
because substitution leaves the S combinator, the K combinator and unchanged.
If is absent from , it is also absent from . Therefore
This includes : even when is a large application, the absence of means bracket abstraction still produces .
Finally, let with occurring in or . By the occurrence observation, also occurs in or , so the application clause applies on both sides. Apply the induction hypotheses:
Every step uses the definitions of substitution and bracket abstraction, without applying the equality axioms for the S combinator or the K combinator. Thus the result is the stronger syntactic identity
The side condition on is essential for this identity. For example, substituting for in gives , whereas , a different string.
A first-order theory admits quantifier elimination when every first-order formula has a quantifier-free formula , in the same first-order signature and with no additional free variables, such that
Thus all first-order models of agree that the two first-order formulas define the same tuples. This definition concerns first-order formulas with free variables, as well as first-order sentences; merely deciding closed assertions would be weaker. The existence of an effective procedure is an additional issue, supplied by the explicit construction in part (d).
The first-order terms are the smallest collection containing every variable and and containing whenever are first-order terms. The atomic formulas are exactly for first-order terms . Logical formulas are then obtained from atomic formulas by the logical connectives and quantifiers: if are logical formulas and a variable, then , , , , and are logical formulas. These closure rules, with no additional strings admitted, define the syntax; a presentation using fewer primitive connectives treats the others as abbreviations.
Semantic entailment is the condition
The same first-order variable assignment is used for all premises and the conclusion. This matters when free variables occur; for first-order sentences the truth value is independent of the first-order variable assignment.
Soundness states that formal derivability implies semantic entailment:
For first-order sentences this means that every first-order structure satisfying all assumptions also satisfies every first-order sentence formally derived from them. In the logical formula version one uses the usual restrictions on generalization from assumptions with free variables.
Strong completeness states the converse:
Equivalently, every syntactically consistent set of first-order sentences has a first-order model. Equality is interpreted as actual identity, and its usual logical axioms and substitution rules are part of the standard calculus. Both assertions hold for arbitrary sets of assumptions, rather than only finite sets.
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.
The assertion that is a first-order model of means that every first-order sentence belonging to is true in the first-order structure:
Equivalently each first-order sentence is true under every assignment in a first-order structure, since first-order sentences have no free variables. The first-order sentences must all hold in the same interpretation of the language; one cannot select a different first-order structure for each member of .
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.
For each term define an -formula expressing its value. Use fresh bound variables at every step:
Freshness includes avoiding all relevant free variables of the formula being translated. Define the atomic translation by
and extend through the logical operations: , , and . Fresh witnesses prevent variable capture and ensure the translation preserves the original free-variable set.
For an -structure , let have the graph relation of and singleton relation . Induction on terms proves that holds precisely when is the value of . Induction on formulas then proves
Conversely every -structure satisfying is uniquely the relational version of an -structure on that same domain. Hence, for arbitrary possibly infinite , semantic entailment on the left is equivalent to semantic entailment from on the right, with assignments retained in the free-formula case. Applying soundness theorem for first-order logic and Gödel's completeness theorem gives
The prohibition on completeness in the preceding direct equality question is local to that proof; here it supplies the clean semantic-to-syntactic transfer after the actual translation and model correspondence have been established.
Semantic consequence under an assignment means that for every first-order structure with the relevant first-order variable assignment into its domain,
More explicitly, in a fixed structure this is the satisfaction implication at ; logical consequence requires that implication in all structures and assignments. An assignment takes values in a particular domain, so a single set map is not silently shared between unrelated domains.
By induction on first-order formulas, their truth values depend only on the values of their free variables. A first-order sentence has none. If all formulas here are sentences, every displayed satisfaction statement, and therefore the consequence condition, is independent of .
A logical derivation is a finite proof in the specified calculus, with conclusion . Assumptions from and instances of A1–A7 are available; the rules are the modus ponens rule, universal generalization rule, and weakening.
In judgement form the universal generalization rule takes to only if is not free in any undischarged assumption in . Weakening permits to become . All instances of A4 and A5 must meet their stated substitution and free variable conditions. Derivability means existence of such a finite proof with assumptions contained in . Equivalently one tracks the finite assumption set used by each proof line.
A fixed-point combinator is a closed lambda term such that for every lambda term . It suffices to check this for a fresh free variable , since capture-avoiding substitution then gives every instance. Take
If , applying both sides to gives . Conversely suppose is a fixed-point combinator. Its application to a fresh has a head normal form, because it is beta equivalent to . Since is closed, head reduction of must first expose a lambda abstraction in itself. Thus , and
This establishes the needed abstraction equality by beta reduction, without assuming eta conversion. Abstracting now gives .
Two examples are the Curry fixed-point combinator and the Turing fixed-point combinator:
Writing , we have , while . Different displayed syntax alone would not prove that the two combinators are distinct under beta equivalence. Here is a reduct invariant that does. Every finite reduct of is , up to alpha equivalence: is beta-normal and the one remaining beta-redex is its self-application. No such reduct contains the closed subterm .
Every finite reduct of , in contrast, retains a closed subterm . The contraction recreates one. The only other redexes created by these expansions are abstractions applied to variables; contracting them substitutes a variable, so preserves any closed inside their bodies. This describes all redexes inductively: expansion inserts only a variable-headed application and a copy of , and a variable substitution preserves that description. Thus every finite reduct contains . A common reduct of and is impossible, so the Church-Rosser theorem proves .
Finally put , with . The fixed-point combinator equation gives
where is fresh. If had a head normal form with leading abstractions, then would have one with . A reduct of a head normal form preserves its initial abstraction count and variable-headed spine: only its argument subterms can still contract. These two head normal forms therefore cannot have a common reduct, contradicting the Church-Rosser theorem. Hence is unsolvable.
Let contain all free variables of . The lambda term is a solvable lambda term if there are closed lambda terms such that
Additional arguments beyond the first are allowed. A head normal form is a term with a variable at the head; its arguments need not be beta-normal.
If reduces to this head normal form, close its free variables and supply every resulting initial binder with the same closed projection
(take when ). The head variable becomes and discards all argument terms, even divergent ones, leaving . Thus a head normal form implies solvability.
Conversely suppose a closure and applications of yield . The standardization theorem for beta reduction supplies a finite successful head-reduction sequence. Until exposes a head variable, its head contractions lie within : a closing substitution cannot create a new head redex there, and supplied arguments cannot be used until an initial abstraction is exposed. Each such contraction commutes with the closing capture-avoiding substitution. Project the successful head computation back onto , ignoring contractions in supplied arguments and the consumption of its initial binders. If this projected head computation did not reach a variable-headed spine, the full computation could not reach either. It therefore gives a finite head reduction of to a head normal form. Consequently
The same head-trace argument shows that an unsolvable lambda term stays unsolvable under substitution and application. This also justifies the unsolvability conclusion in the preceding solution.
Choose fresh for and put , . The preceding coding equations give
Consequently
This self-quoting fixed point is valid even if has free variables, since the effective Gödel numbering codes open lambda terms too. Freshness of prevents variable capture.
The Böhm tree is if is an unsolvable lambda term. Otherwise choose a head normal form
Its root is labeled by the binder prefix and head variable, and its ordered children are . Repeat recursively, possibly forever. Bound names are identified by alpha equivalence; the Church-Rosser theorem makes this tree independent of the selected head reduct. An address is a finite sequence of child numbers; denotes the corresponding argument term encountered after these head reductions.
A Böhm transformation is a finite composition of capture-avoiding substitutions and applications to chosen auxiliary terms. Here is a constructive Böhm-out lemma. Along the finite path to , choose at least the number of children of each preceding head node, and define
Initially replace all relevant free variables by . At a head node with initial binders and children, supply its binders with . Its head is now and its arguments are the substituted children . Apply extra copies of as padding and then . Direct beta reduction gives
Repeat with the next child number. The term reached at each stage is the selected original child with the accumulated substitutions for its ancestors' binders. Thus the finite composite satisfies for a suitable substitution . The empty path uses the identity transformation. Tupling, rather than immediately replacing a head variable by a fixed projection, is important: the same variable can occur later where a different child must be selected.
For the Böhm separation theorem, two distinct closed normal forms for both beta reduction and eta conversion have finite Böhm trees with a genuine disagreement in a head label or argument structure. A Böhm transformation first extracts their common-prefix node. Projections at a differing head variable select different supplied Church Booleans; differing arities are handled by padding, with the exclusion of mere eta expansions ensuring a genuine disagreement. This yields a context separating the two normal forms. Distinct beta-normal forms that differ only by eta conversion are not covered by this separation statement.
The PDF prints a free in both the definitions of and . Taken literally, this makes the last request impossible. To see why, suppose , where , and choose a fresh . By solvability and its stability under substitution, has a head normal form . If , substituting either or leaves the same variable-headed spine; it cannot be in one case and in the other. If , obtaining requires and , hence . Substituting then leaves at least leading abstractions, whereas has two. A variable-headed normal form cannot lose initial abstractions under beta reduction. The Church-Rosser theorem rules out the required equality.
For the intended closed first projection and , an explicit answer is
Indeed , whereas . These computations solve the corrected closed-combinator version while identifying the obstruction in the literal printed one.
A combinatory logic term over free variables is formed from variables in , the constants , and application, with no abstraction binder. We may regard as primitive, or as the abbreviation . Application associates to the left. Weak combinatory reduction contracts
in any application context. Weak equivalence is the equivalence relation generated by these reductions. There is no additional rule identifying terms merely because they behave alike after application to a fresh argument.
Define bracket abstraction on combinatory terms by the following ordered clauses:
They cover every term: after excluding the variable case and the case with no free , the term must be an application. Induction gives ; no other variable is introduced or removed. For every argument , the same induction gives : the three cases use respectively the , , and reductions.
The required translation is
It has exactly the same set of free variables as the original lambda term, by the bracket-abstraction identity.
To compare the two reductions, expand the constants into lambda terms:
and expand variables and applications homomorphically. Every weak combinatory contraction becomes a finite sequence of beta reductions, so weakly equivalent terms have beta-equivalent lambda expansions. We also have
For , this is the expansion of . For , the expansion of beta-reduces to , after choosing the binder fresh. For an application, expanding gives
by induction and beta contraction. Thus, induction on the lambda syntax gives . Combining these facts proves
The reverse implication fails for this intensional translation. The beta-equivalent lambda terms and translate respectively to
Both are weak normal forms: has no argument, has too few arguments to contract, and the outer has only two arguments. They are syntactically distinct. By the assumed Church–Rosser property of weak combinatory reduction, two distinct weak normal forms cannot be weakly equivalent. The same argument works with , because both fully expanded terms remain distinct weak normal forms. Hence beta-equivalent lambda terms need not have weakly equivalent combinatory translations.
Every countable structure in a countable first-order language has a Scott sentence whose countable models are precisely its isomorphic copies. In particular two countable structures with the same countable infinitary logic sentences are isomorphic. Countability of both structures is essential to the back-and-forth conclusion; the sentence need not exclude uncountable models.
Let be a nonempty countable structure in a countable first-order language. The countable infinitary logic permits countable logical conjunctions and logical disjunctions, but only finite strings of quantifiers and finitely many free variables in each formula. We construct a Scott formula for every finite tuple from and every countable ordinal .
At stage zero, let be the conjunction of all atomic formulas true of and the negations of all atomic formulas false of . Include atomic formulas involving arbitrary terms and constants, not just relation symbols applied directly to variables. There are only countably many such formulas. This complete atomic description ensures that matching tuples determine a partial isomorphism of structures.
At successors put
At a nonzero limit ordinal , put . All these are formulas of countable infinitary logic: each indexing set is countable, and the free variables are only the fixed finite tuple. Rename bound variables when necessary. Transfinite induction also shows .
For tuples of the same length within , define by . Induction identifies this with the usual symmetric back-and-forth method equivalence: the tuples have the same atomic description at stage zero, and at a successor every one-element extension on either side has a matching extension at the previous stage. Thus these are decreasing equivalence relations, simultaneously for every finite tuple length.
There are only countably many pairs of finite tuples in . A pair can cease to be equivalent at most once. The supremum of the first separation stages of all pairs that separate below is a countable ordinal. Choose a countable at least that supremum. No pair can first separate at , so
This justifies stabilization without assuming that all tuples stabilize at one predetermined finite stage.
Now form the following Scott sentence, where the case has no displayed variables or quantifiers:
It is a sentence of countable infinitary logic, because the family of all finite tuples is countable. The stabilization above and the truth of show .
Suppose a countable structure satisfies . Start with the empty matching tuples, and maintain . The corresponding conjunct of upgrades this to . The existential conjuncts extend the match by any specified element of . The universal-disjunction conjunct extends it by any specified element of . The atomic formula information makes a new element on one side match a new element on the other, and makes repeated elements agree with their earlier matches.
Enumerate both structures and alternate these two extension steps, including the least element not yet covered at each step. The union is a bijection preserving and reflecting every atomic formula, hence an isomorphism; for function symbols, eventually include both a tuple and the value of its function term to see explicitly that the function is preserved. For finite structures the same construction stops when both are covered. Conversely every isomorphic copy of satisfies , since isomorphisms preserve formulas of countable infinitary logic by induction on their construction. Therefore
If countable have the same sentences, satisfies this Scott sentence of and is isomorphic to . This proves Scott isomorphism theorem.
Use the Gödel-Gentzen negative translation, writing for the translated first-order formula. On atomic formulas , including logical equality, put , and put . Extend recursively by
Logical negation abbreviates logical implication to logical falsity, so . The displayed logical disjunction and existential clauses are intuitionistically equivalent to the usual negative clauses and , respectively. Thus these clauses specify the same negative interpretation. Translation commutes with capture-avoiding substitution of terms for free variables.
First prove by structural induction the stability of a formula under double negation:
Every double logical negation is stable, since intuitionistic first-order logic proves ; logical falsity is stable as well. Stability passes to logical conjunction by obtaining double logical negation of each component. For a logical implication with stable , assume and . An assumption would give , a contradiction, so and then . For a universal first-order formula, implies for arbitrary fresh ; use stability pointwise and generalize. Logical disjunction and existential translations are already double negations. This proves all cases.
Now regard classical first-order natural deduction as intuitionistic natural deduction plus unrestricted double-negation elimination, and induct on a classical derivation. The rules for logical conjunction, logical implication, universal quantification and logical falsity translate directly. Logical disjunction introduction gives and then its double logical negation. For logical disjunction elimination, the translated premise is and the two translated branches yield the stable conclusion . Assuming makes each branch contradictory, giving and , hence , which contradicts the premise. We have and remove it by stability.
Existential introduction likewise adds a double logical negation to the ordinary witness introduction. In existential elimination, the witness branch has the original fresh-variable condition. Assuming makes that branch give ; generalization gives and therefore , contradicting the translated premise. Again stability supplies . The universal-rule side conditions are preserved because the translation introduces no new free variables.
For logical equality, reflexivity gives and then its double logical negation. For substitution, from and , temporarily assume . An assumption would transport to by intuitionistic logical equality substitution, so it gives a contradiction and hence . The first premise contradicts this. Thus holds and stability gives . Finally a classical double-negation elimination step translates precisely to , already proved. Every rule is therefore covered, giving negative translation of a classical proof:
In particular a classical thesis has an intuitionistic, constructive translated proof. If nonlogical assumptions are present, they must be translated too.
In classical logic, double-negation elimination gives on atoms. Structural induction propagates equivalence through logical conjunction, logical implication and both quantifiers, and removes the added double negations on logical disjunction and existence. Therefore
Omega-consistency forbids a logical formula of any complexity for which and for every standard . The difference from one-consistency is that the matrix is unrestricted. It implies first-order consistency.
For a complete first-order consistent classical first-order theory, theorem membership obeys the ordinary Boolean truth tables. For example, it proves a conjunction exactly when it proves both conjuncts; completeness and first-order consistency also make theoremhood of a negation the complement of theoremhood of the first-order sentence. Omega-consistency additionally gives the witness property
The reverse implication is existential introduction. For the forward implication, if no standard instance were provable, completeness would give a formal proof of each negated instance, violating omega-consistency. This works also after replacing additional free variables by numerals.
Now induct on logical formulas with their remaining free variables replaced by standard numerals. At the atomic level, the equivalence between theoremhood and standard truth follows from bounded completeness of an arithmetic theory and bounded soundness of an arithmetic theory from (b). The Boolean steps use the truth-table facts just proved. The existential step uses the witness property and the induction hypothesis on its matrix; universal quantification follows by negation. Hence
for every first-order sentence . Completeness ensures it decides each first-order sentence, and this equivalence ensures every decision is correct.