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.
Write for the paper's bracket abstraction and for the I combinator. Prove the result by structural induction following the three clauses of bracket abstraction.
For , the rules for the S combinator and the K combinator give
If does not occur in , then substitution for leaves unchanged and
These two cases cover all variables and constants as well as applications not containing .
In the remaining case, and occurs in at least one of . The bracket abstraction clause, the rule for the S combinator, the induction hypotheses and compatibility of equality with application give
The last line is the defining application clause of substitution. Therefore
The conclusion is equality in combinatory logic; it need not be literal identity of strings. There are no binders in a combinatory logic term, so this substitution introduces no variable capture.
Take an infinite supply of variables and the two distinguished constants of combinatory logic, the K combinator and the S combinator. The combinatory logic terms are exactly the finite expressions generated by
Thus every variable and each distinguished constant is a combinatory logic term, and the application of two combinatory logic terms is a combinatory logic term. Nothing else is a combinatory logic term. Application associates to the left, so means ; it is not assumed to be associative. The I combinator can be used as the abbreviation , without adding a new primitive constant.
The basic equality is the least relation containing the two axiom schemes
for all combinatory logic terms , and closed under the rules of equational reasoning:
The final rule permits replacing equal combinatory logic terms inside either side of an application; repeated use permits replacement at any depth. Uniform substitution of combinatory logic terms for variables preserves equality, either included as a rule or proved by induction on these derivations, since the displayed axioms are schemes. No rule equating two combinatory logic terms merely because they agree after an extra argument belongs to this basic theory. Its equality is the symmetric, reflexive and transitive closure of weak combinatory reduction.
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.
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
Choose as the domain of the new function type. Since , the assumption is consistent with and deleting leaves unchanged. The lambda abstraction rule gives
Use the universal typing axiom for , then the lambda application rule:
Therefore
The condition is about the typing context, not the free variables of . Some occurrences of in might have been hidden by a use of the universal typing axiom; the derivation above still follows the printed rules.
The universal typing axiom supplies for every lambda term . Use this as the argument premise of the lambda application rule. The empty typing context is consistent with , and its union with is :
Hence
The free variables of need not appear in the resulting typing context: the universal typing axiom deliberately assigns without recording them.
Use structural induction on the construction of , with the stronger induction claim that is an invertible lambda term: there is a lambda term satisfying both
The base constructor has exactly the two-sided inverse proved in part (c). Strengthening the claim is useful because the inductive construction needs inverses of its constituent lambda terms in both orders.
For the inductive constructor, let be the two-sided inverse supplied for . Thus, for a fresh variable , beta-eta equivalence gives
For , define
This lambda term reverses the cyclic permutation and applies the appropriate inverse to each argument. First use beta reduction to expand one order of composition of lambda terms:
For the other order, beta reduction gives
These computations close the stronger induction. For , each formula has the single argument involving and ; for , the constructor is and its inverse is . Every construction is finite, so the inverse is a finite lambda term. There is no requirement that this inverse itself belong to .
The argument order in is a cyclic permutation. Undo it by rotating in the other direction. For , choose the lambda term
Use fresh bound variables throughout. Substituting for the first argument of and then performing beta reduction gives
Indeed, the arguments received by are , so its last argument moves back to the front. Apply eta conversion successively, starting with the innermost lambda abstraction. At each step the bound variable being removed is absent from the preceding expression. Thus the last expression is related to by beta-eta equivalence, and consequently
For the induction needed in the next part, also compute the reverse composition of lambda terms:
So this is a two-sided inverse. The empty argument list at means ; choose . For , both displayed rotations give , which is also related to by eta conversion. These boundary cases require no exceptional inverse construction.
Write for the I combinator, and choose outside the free variables of . Both orders of composition of lambda terms first give the same lambda abstraction by beta reduction:
The freshness condition is exactly the side condition for eta conversion, which contracts to . Therefore
Here eta conversion matters: a free variable is already in beta-normal form, as is , and beta equivalence alone does not equate them.
Choose all auxiliary bound variables fresh for the free variables of ; alpha equivalence permits this. The operation is composition of lambda terms, so expand its definition and use beta reduction:
The two lambda terms have the same reduct, up to alpha equivalence, hence they are related by beta equivalence:
No eta conversion is needed for this associativity calculation.
The satisfiability problem is . Partition the positive facts according to their predicate symbols. Let contain those using description logic concepts or description logic roles from . Run an ordinary ALC knowledge base consistency procedure on . Return no if it is inconsistent, and yes otherwise.
The no answer is sound because any model of the whole knowledge base would restrict to a model of . For the converse, take a model of that ALC part. Keep its domain, individual interpretations and TBox predicates. Interpret every predicate used by the positive Datalog rules as the full relation of its arity on this same domain. This is possible because those predicates are disjoint from the TBox predicates. Every Datalog rule head is then true under every variable assignment, so every positive rule and every remaining positive fact is satisfied. Predicates occurring only in facts can likewise be interpreted as full relations. Any individual name not already interpreted can denote an arbitrary domain element.
Consequently,
The argument depends on both restrictions in the question: disjoint predicate vocabularies and positive rule heads. A rule concluding would not be made true by filling all relations. Sharing constants alone causes no problem, since the expansion uses the same domain and the same interpretations of those constants.
A safe one-rule Datalog with negation example with no stable model is
There are no variables, so no safety condition is violated. If is absent from a proposed stable model, its reduct contains the fact , whose least Herbrand model contains . If is present, the rule is deleted, and the reduct has empty least Herbrand model. Either choice disagrees with its reduct's least Herbrand model. Additional unsupported atoms cannot repair the disagreement. Hence there is no stable model.
A Herbrand interpretation is a stable model when it is the least Herbrand model of its stable model reduct . To form the reduct, ground the rules, delete each rule with a premise for which , and remove the remaining occurrences of not and their atoms.
For , the rules concerning in the reduct are
together with . No rule has a divisibility atom in its head, so forward chaining produces no divisibility facts and no leap fact. Ground rules for the other constants cannot fire because their year premises are absent. Thus
Therefore .
For , the rule using is deleted. The common-year rule is retained without its negative premise, since is absent. Crucially, the reduct does not convert atoms already in into facts. Its least Herbrand model is again . The two divisibility atoms in have no support. Hence
Inspecting these two interpretations alone is not sufficient for skeptical entailment. That requires every stable model to contain . Here we can finish the argument: every reduct has no rule deriving divisibility atoms, so every stable model has empty divisibility relation. Its leap relation must then be empty as well. The common-year rule consequently derives , and the only year fact is . Thus is the unique stable model, and
This final uniqueness argument, rather than the examination of just two candidate interpretations, establishes the required universal claim.
A disjunctive Datalog knowledge base can have several incomparable minimal Herbrand models without a least Herbrand model. Take the single disjunctive fact
Both and are Herbrand models. Any least Herbrand model would have to be contained in both, hence contained in . But the empty Herbrand interpretation falsifies the disjunctive fact. This is a contradiction. Taking the intersection of all models therefore fails because that intersection need not itself be a model.

There are unlisted articles, also show them or only show them.