Alberto Martelli 2026-11-05
Alberto Martelli coauthored An Efficient Unification Algorithm by Alberto Martelli and Ugo Montanari in 1982. With Ugo Montanari, he developed a term-equation algorithm whose acyclicity check is built into the implementation rather than treated as an expensive separate afterthought.[ref]
Unification asks for a substitution making terms identical; the most general unifier captures every solution through further substitution. This is stronger than finding one arbitrary matching assignment. The paper's equation transformations preserve the solution set while detecting incompatible constructors and cyclic finite-term requirements, connecting a declarative specification to an efficient procedure.
Backward chaining 2026-10-31
Goal-directed rule evaluation that replaces a goal by premises of a matching rule. Shared variables require consistent answer first-order substitutions across the premises.
Bound variable 2026-10-25
A variable occurrence in a first-order formula is bound when it lies in the scope of a quantifier binding that name. The same name can have both bound and free occurrences in one formula. A first-order substitution replaces only free occurrences; a fresh renaming of bound occurrences and their binder preserves the formula up to alpha equivalence.
Capture-avoiding first-order substitution 2026-10-25
To perform a first-order substitution, first rename each conflicting bound variable to a fresh name, then replace the designated free occurrences. The fresh names must avoid the formula's relevant free names and all names in the inserted first-order term. For instance, substituting for in requires renaming the binder, producing rather than . The latter would change the intended meaning by capturing .
Equational unification 2026-11-05
Equational unification asks for a first-order substitution making two first-order terms equal under specified identities, rather than requiring them to become literally the same first-order term. Writing for equality justified by those identities, a solution satisfies .
For example, the first-order terms and have no syntactic unifier when are distinct constant symbols and is an uninterpreted binary function symbol. If the specified identity is commutativity, , then the unchanged first-order terms are already equal modulo that identity: the empty first-order substitution is an equational unifier.
The identity set changes the problem. Ordinary first-order unification can decompose equal outer constructors because equality of free first-order terms forces equality of corresponding arguments. Modulo commutativity, argument positions can be exchanged, so that decomposition alone would reject legitimate solutions. A useful implementation must state its identities and its notion of solution, rather than treating equality of interpreted values as syntactic equality.
First-order resolution 2026-10-31
A rule that combines first-order clauses by unifying complementary first-order literals and retaining the other literals under the resulting first-order substitution. Completeness requires the appropriate calculus and search conditions.
J. A. Robinson 2026-11-05
J. A. Robinson introduced the resolution principle in his 1965 paper on machine-oriented logic. His clause-based resolution calculus, using unification, supports a complete refutation procedure for first-order logic: an unsatisfiable clause set has a derivation of the empty clause.[ref]
For example, resolving with uses the first-order substitution and produces . The rule separates the logical justification of a step from the search for useful clauses. A complete search procedure can still run indefinitely on a satisfiable input; completeness does not supply a decision algorithm for all first-order logic.
The algorithm is . Its recursive calls return only Booleans. They do not return and propagate the first-order substitutions obtained while satisfying earlier rule premises.
Take distinct constants , factsand the single Datalog ruleAsk for . The head matches the goal without binding . In line 15, the recursive call for succeeds by first-order unification with , but returns only
true. The next recursive call still receives with unbound, and succeeds by first-order unification with . Neither subgoal is the visited head , so the visited test does not stop these calls. Both recursive results are true, and the algorithm returns true for .However, the least Herbrand model is just . No single constant makes both and true, so the rule cannot derive . The two individually successful premises need one consistent first-order substitution. A correct backward chaining procedure must thread answer first-order substitutions through the remaining premises and backtrack when they cannot be extended; forward chaining on ground Datalog instances is another way to avoid this error.
The term is free for substitution for . The only free occurrence of the target is in the outside disjunct , beyond both quantifier scopes. The occurrences under are bound variables and are not replaced. Therefore no renaming is required, andThe new and in the last disjunct are free. First-order substitution replaces the original free occurrences once; it does not recursively substitute into the inserted term.
Resolution 2026-10-31
An inference rule deriving a clause from two clauses containing complementary literals. In propositional logic the displayed rule eliminates the atom . For first-order clauses, complementary atoms can first be made identical by a suitable first-order substitution.
SLD resolution 2026-11-05
SLD resolution is a goal-directed inference rule for definite first-order Horn clauses. It selects an atom from the current goal, matches it with a suitably renamed clause head using a most general unifier, and replaces it by that clause's body, applying the same first-order substitution throughout the goal. Reaching the empty goal supplies a successful derivation.[ref]
For example, the rule
ancestor(X,Y) :- parent(X,Y) reduces the query ancestor(ada,Y) to parent(ada,Y). Matching the fact parent(ada,ben) then gives Y=ben. Alternative matching clauses create a search tree. Prolog normally selects the leftmost goal and searches clauses in order with backtracking; a recursive branch can therefore run indefinitely before another branch's valid answer is reached. The logical inference rule and the strategy traversing its alternatives are separate choices. Unifier 2026-11-05
A unifier of first-order terms is a first-order substitution for which . The first-order substitution replaces variables by first-order terms; it does not alter function symbols. For example, unifies with .
A most general unifier leaves every identification not forced by the original equations available for later choice. For , one solution is . The remaining variable is free. Replacing it by any finite first-order term gives a more specific unifier; arbitrarily choosing during the initial computation would discard that generality.
Not every pair is unifiable. Distinct constant symbols cannot be made equal by replacing variables, and the occurs check rejects for finite first-order terms. These are structural restrictions, not numerical inequalities. Unifiers allow a resolution step to align the relevant atomic formulas before the logical inference is performed.[ref]
An Efficient Unification Algorithm by Alberto Martelli and Ugo Montanari. Introduction and Section2, substitutions and solved equation systems