First-order substitution 2026-10-25
Replacing every free occurrence of variable in a first-order formula by a first-order term . Bound occurrences of are left alone. The operation requires either that be free for substitution at those occurrences or that conflicting bound variables first be renamed, as in capture-avoiding first-order substitution.
The term is not free for substitution for . The occurrence of in is under , which would capture the inserted . The other occurrence, in the outside disjunct , has no enclosing quantifier. The inner does not bind the occurrence of in its antecedent, so it creates no additional capture at that substitution site.
Rename the bound to a fresh , then carry out capture-avoiding first-order substitution. The result isThe inserted in remains free because it lies outside the scope of . One may additionally rename that bound for readability, but it is not necessary for correctness.
The occurrence of in lies under the quantifier . Directly inserting the term would capture its free : the result would make the inserted bound and change the intended dependence on the original free value. Therefore the term is not free for the literal substitution requested.
Perform capture-avoiding first-order substitution by first renaming bound variables to fresh names. Renaming the first binder to is necessary; renaming the second to is optional but makes the result especially clear. These renamings give the equivalent formula . Substituting only the free occurrences of now givesBoth and in the inserted term remain free variables. The original has scope only over its own disjunct and would not capture the inserted in the first disjunct; its optional renaming is not a necessary capture repair. This distinction avoids confusing reuse of a letter elsewhere with binding within the relevant scope.
Use broad scope up to the enclosing parenthesis, consistent with (c). Thus the first conjunct is read as is not free for substitution for . The free occurrence of in lies under ; inserting there would capture its . Rename that bound variable to a fresh first, using alpha equivalence. The capture-avoiding first-order substitution is thenEvery occurrence of in the original formula is free, so all four are replaced. The variable introduced by the term remains free, and the final is unchanged.