Unification: substitutions that leave room for later choices
合一算法
Solve finite first-order term equations with an occurs-check, compose idempotent most general unifiers, and keep variable scopes separate.
unificationMake two descriptions agree without guessing extra details
Two symbolic descriptions name the same parcel, but leave different parts unspecified:
The three argument positions must agree. The first requires X = wrap(Z). Using that information in the second gives wrap(Y) = wrap(Z), hence Y = Z. The third then requires Z = a. One substitution makes both descriptions identical: X becomes wrap(a), while Y and Z become a.
Unification finds such a substitution or reports that none exists. It may replace variables on either side. This differs from one-way pattern matching, where only the pattern’s variables may change. It also differs from evaluating an expression: wrap(a) is a symbolic term, not a function call the solver executes.
The more useful answer often leaves something open. For X = wrap(Y), the substitution X ↦ wrap(Y) is enough. Choosing Y = a as well would discard other possibilities for no reason. A most general unifier (MGU) retains that freedom, so later reasoning can specialize it.
This chapter works with finite first-order terms and syntactic equality. It does not implement quantified formulas or a proof search. Those belong to first-order logic and resolution.
A substitution has an order of application
A term is a variable or a function symbol applied to a fixed number of argument terms. A constant is a function symbol with zero arguments. The symbols are free constructors: two constructed terms are equal exactly when their outer symbols, arities and corresponding arguments agree. Thus distinct constants a and b do not unify. This is a claim about syntax; an arbitrary logical interpretation could assign them the same denotation.
Variables can stand for terms, but cannot stand for predicate or function names. Unifying the arguments of two atoms is meaningful only after their predicate symbols and arities agree. No arithmetic, commutativity or other equations about function symbols are assumed.
A substitution σ is a finite map from variables to terms; unlisted variables stay unchanged. Applying it is simultaneous. An inserted replacement is not immediately processed again by the same substitution. If σ = {X ↦ Y, Y ↦ a}, then Xσ = Y, not a. Applying σ a second time yields a. Such a substitution is valid as a map but is not idempotent.
Write σ;δ for “apply σ, then δ.” Composition must update the old replacement terms and include δ’s bindings for variables absent from σ’s domain:
The order matters: applying {Y ↦ a} before {X ↦ Y} leaves X as Y. Robinson’s definitions distinguish substitution from composition; the program follows this distinction instead of treating a dictionary lookup as an instruction to chase bindings indefinitely. 1965 paper, definitions 5.1 to 5.5
A unifier θ of an equation set E makes both sides of every equation identical. It is most general when every other unifier can be obtained by applying a further substitution to θ’s result. With V the variables appearing in E, the condition is:
This definition compares effects on the problem’s variables, not arbitrary bindings outside the problem. It does not demand a unique printed dictionary. For X = Y, either {X ↦ Y} or {Y ↦ X} is an MGU. Both express the same freedom with a different surviving variable. Pfenning’s lecture explains most-generality through precisely this ability to factor other solutions through the computed substitution. Lecture 21, section 3
An output substitution is idempotent when applying it again changes nothing:
Our solver maintains the stronger, easily checked invariant that no variable in the substitution’s domain occurs in any of its replacement terms. If it first binds X to wrap(Y) and later binds Y to a, it updates the earlier binding to X ↦ wrap(a). This gives a direct answer rather than a chain that another component must resolve.
There is one necessary refusal. After eliminating X = X as an identity, a remaining equation X = t cannot be solved by binding X to t if X occurs inside t. For example, a finite solution of X = f(X) would require a finite term u satisfying:
where size counts term nodes. No finite size satisfies that equation. The occurs-check detects this obstruction. It must also detect indirect cycles: X = Y followed by Y = f(X) becomes Y = f(Y) after applying the existing substitution.
Decompose equations and compose each binding
The complete Python 3.10+ example uses immutable tagged tuples. V('X', 'rule1') represents a variable with identity (scope, name). F('a') is a constant; F('wrap', X) is a unary function term. Function-head identity here includes the name and argument count. A name used with different arities therefore clashes during unification; a surrounding language may instead reject that signature earlier.
unify validates a finite list or tuple of term pairs. Every term is a three-element tuple with tag v or f, nonempty string names, and tuple-valued function arguments. Constructors V and F only assemble terms; validation happens at the solver boundary. Malformed input raises ValueError. The helper functions for substitution, composition, occurrence testing and display assume already valid finite terms and variable-to-term maps.
The worklist starts in input order. For each equation, apply the current idempotent substitution to both sides, then do one of the following:
- Delete equal terms, including X = X.
- Orient a variable to the left when necessary. If it does not occur in the other term, bind it and compose that binding into the accumulated substitution.
- For matching function heads, replace the equation with corresponding argument equations, processed left to right.
- Reject an occurs-check failure or a mismatch of function symbols or arities.
Pending equations are instantiated when popped; they are not all rewritten after every binding. Previous substitution values are rewritten immediately. This combination keeps the substitution idempotent while avoiding one kind of eager worklist rewrite. It still may expand large terms.
status='unified' returns an MGU in substitution; status='failure' returns None there and identifies occurs or clash. Failure concerns the whole equation set, even if some earlier bindings succeeded. An empty equation set succeeds with {}, the identity substitution; do not confuse an empty successful answer with failure by testing its Boolean truthiness. This implementation has no step budget. Runtime exceptions such as exceeding Python’s recursion limit are not unification-failure certificates.
def V(name, scope='query'):
return ('v', scope, name)
def F(name, *arguments):
return ('f', name, tuple(arguments))
def valid(term):
if type(term) is not tuple or len(term) != 3:
return False
if term[0] == 'v':
return all(type(s) is str and s for s in term[1:])
if term[0] == 'f':
return (type(term[1]) is str and bool(term[1])
and type(term[2]) is tuple and all(valid(t) for t in term[2]))
return False
def substitute(term, sigma):
# Simultaneous substitution on validated finite terms; do not chase replacements.
if term[0] == 'v':
return sigma.get(term, term)
return F(term[1], *(substitute(t, sigma) for t in term[2]))
def occurs(variable, term):
return term == variable or (term[0] == 'f' and any(occurs(variable, t) for t in term[2]))
def compose(first, after):
# t(first; after) = (t first) after. Helpers assume valid substitutions.
result = {v: substitute(t, after) for v, t in first.items()}
result.update((v, t) for v, t in after.items() if v not in first)
return {v: t for v, t in result.items() if v != t}
def unify(equations, trace=False):
if (type(equations) not in (list, tuple)
or any(type(e) not in (list, tuple) or len(e) != 2
or not all(valid(t) for t in e) for e in equations)):
raise ValueError('equations must be a list/tuple of valid finite term pairs')
if type(trace) is not bool:
raise ValueError('trace must be Boolean')
pending = list(reversed([tuple(e) for e in equations]))
sigma, events = {}, []
steps = bindings = decompositions = 0
def emit(*event):
if trace:
events.append(event)
def finish(reason=None):
return dict(status='failure' if reason else 'unified', reason=reason,
substitution=None if reason else sigma.copy(), steps=steps,
bindings=bindings, decompositions=decompositions, events=tuple(events))
while pending:
left, right = pending.pop()
left, right = substitute(left, sigma), substitute(right, sigma)
steps += 1
emit('equation', left, right)
if left == right:
emit('delete')
continue
if left[0] != 'v' and right[0] == 'v':
left, right = right, left
if left[0] == 'v':
if occurs(left, right):
emit('fail', 'occurs')
return finish('occurs')
sigma = compose(sigma, {left: right})
bindings += 1
emit('bind', left, right)
elif left[1] != right[1] or len(left[2]) != len(right[2]):
emit('fail', 'clash')
return finish('clash')
else:
children = tuple(zip(left[2], right[2]))
pending.extend(reversed(children))
decompositions += 1
emit('decompose', len(children))
return finish()
def show(term):
if term[0] == 'v':
return repr((term[1], term[2]))
name = term[1] if term[1].isidentifier() else repr(term[1])
return name + ('(' + ','.join(show(t) for t in term[2]) + ')' if term[2] else '')
def show_substitution(sigma):
return None if sigma is None else {(v[1], v[2]): show(t) for v, t in sigma.items()}
X, Y, Z = V('X'), V('Y'), V('Z')
a, b = F('a'), F('b')
EQUATIONS = ((F('parcel', X, F('wrap', Y), Y), F('parcel', F('wrap', Z), X, a)),)
result = unify(EQUATIONS, trace=True)
print('main:', result['status'], show_substitution(result['substitution']))
print('counts:', result['steps'], result['bindings'], result['decompositions'])
print('unconstrained:', show_substitution(unify(((X, F('wrap', Y)),))['substitution']))
print('indirect cycle:', unify(((X, Y), (Y, F('wrap', X))))['reason'])
print('same name, fresh scope:', unify(((V('X', 'rule1'), F('wrap', V('X', 'rule2'))),))['status'])
print('simultaneous:', show(substitute(X, {X: Y, Y: a})))
print('composed:', show_substitution(compose({X: Y}, {Y: a})))
The main result is:
main: unified {('query', 'X'): 'wrap(a)', ('query', 'Y'): 'a', ('query', 'Z'): 'a'}
counts: 5 3 2
unconstrained: {('query', 'X'): "wrap(('query', 'Y'))"}
indirect cycle: occurs
same name, fresh scope: unified
simultaneous: ('query', 'Y')
composed: {('query', 'X'): 'a', ('query', 'Y'): 'a'}
steps counts equations popped from the worklist, including equalities that are deleted or equations that fail. bindings counts accepted variable eliminations; decompositions counts splits of equal function heads. The example takes five steps: split parcel, bind X, split wrap, bind Y, then bind Z. The output composition rewrites X and Y when Z becomes a. These counts do not measure visited term nodes.
Displayed substitution keys are actual (scope, name) pairs, so punctuation in a legal name cannot merge two bindings. Variable occurrences display that same pair; nonidentifier function names are quoted to distinguish a constant named a(b) from the term a(b). This is a display format, not a term parser.
trace=True records instantiated equation pairs and their actions. The input terms and equation containers are not modified. Immutable terms may share Python objects; this sharing does not change simultaneous-substitution semantics.
Finite terms, fresh variables and potentially large answers
The algorithm’s transformations preserve the equation problem. Equal terms add no restriction. Free-constructor equality decomposes into argument equality, while incompatible heads cannot become equal through variable substitution. For X = t with X absent from t, every solution must give X the same value as t. Eliminating X therefore preserves all remaining freedom; composing the binding carries that restriction into earlier answers. Induction over these transformations establishes soundness and the factorization property of an MGU. The occurs-check rejects precisely the cyclic binding that would require an infinite term at that step.
Termination needs a different argument from “the equation list keeps getting shorter”: a decomposition can add several equations. There are only finitely many input variables, and each accepted binding eliminates one from future instantiated equations and substitution ranges. Between bindings, consider the total node count of the fully instantiated pending equations. Decomposition removes the two outer constructor nodes, and deletion removes an equation. This count strictly decreases until another binding occurs or the process ends. Bindings may enlarge terms, but there can be only finitely many of them. The resulting procedure is complete for these finite, syntactic first-order equations.
Variable identity must follow scope. Reusing the printed name X in two independently quantified rules does not make it the same variable. Before combining separate rule instances, rename each instance’s variables to fresh identities, consistently across that whole instance; this is standardizing apart. The same variable repeated inside one instance must remain the same variable. Renaming each occurrence independently would incorrectly let pair(X,X) unify with pair(a,b) for distinct a and b.
The code makes this responsibility visible through scope tags. V('X','rule1') can unify with wrap(V('X','rule2')); using the same scope on both sides instead creates the failing equation X = wrap(X). Callers must allocate scope names that are fresh across all combined instances. The solver does not infer quantifier scopes or automatically rename inputs. Pfenning discusses fresh clause instances and repeated-variable hazards in section 4. Lecture 21, sections 3 and 4
There are no binders inside this term representation. Substituting into a quantified formula additionally requires avoiding capture of free variables by quantifiers; that is a separate operation. Likewise, omitting the occurs-check changes the intended objects if cyclic bindings are accepted. Some systems support rational trees, potentially infinite unfoldings with a finite graph representation. Our recursive tuple implementation does not implement that semantics. Simply removing the check does not turn it into a correct rational-tree solver.
The short code is not a linear-time implementation. Let N be the input size in unfolded term nodes plus equation headers, P the number of popped equations, M the largest total unfolded size of the currently retained worklist, substitution ranges and instantiated pair, including intermediate constructions, and H the total unfolded size of retained trace records. With unit-cost symbol operations and expected constant-time dictionary access, conservative bounds are O(1+N+P(1+M)+H) time and O(1+N+M+H) space. Traversal, structural equality, occurs-checks and composition all contribute; recursive traversal also needs a stack proportional to term depth. These are operational bounds using the sizes actually created, not polynomial bounds in N. Displaying a substitution additionally costs its rendered output length.
A small family shows why input size alone is misleading. Use equations Xᵢ = pair(Xᵢ₊₁,Xᵢ₊₁) for i from 0 through k−1, followed by Xₖ = a. The input has O(k) nodes, but the fully expanded replacement for X₀ has 2ᵏ⁺¹−1 nodes. The program takes only k+1 equation steps while producing this expansion; the tests check k = 0 through 8. Shared term graphs can represent repeated subterms compactly, but a different representation and careful algorithms are needed to benefit consistently from that sharing.
Keep the answer as general as the equations allow
-
Recompute the parcel substitution. List the bindings as they are discovered and explain why the final X binding changes.
Answer: Splitting the first equation gives X = wrap(Z), wrap(Y) = X and Y = a. Bind X ↦ wrap(Z). After applying that substitution, split wrap(Y) = wrap(Z) and bind Y ↦ Z. The last equation now reads Z = a. Composing the final binding gives {X ↦ wrap(a), Y ↦ a, Z ↦ a}. Keeping the earlier value X ↦ wrap(Z) would fail the promised idempotent-output invariant. Both original terms become
parcel(wrap(a),wrap(a),a). -
Find the unnecessary restriction. For X = wrap(Y), is {X ↦ wrap(a), Y ↦ a} a unifier? Is it most general?
Answer: It is a unifier, but is not most general. The MGU {X ↦ wrap(Y)} also allows Y = b or a larger term. The proposed answer is obtained from that MGU by a further substitution {Y ↦ a}; no further substitution can recover a free Y from the already fixed constant a. The solver therefore leaves Y unbound.
-
Check both kinds of cycle. What happens for X = X, for X = Y together with Y = X, and for X = Y together with Y = f(X)?
Answer: X = X succeeds with the empty substitution because equality is checked before occurrence. The second system succeeds with {X ↦ Y}: its remaining equation becomes Y = Y. The third first binds X ↦ Y, then encounters Y = f(Y), so it fails the occurs-check. A finite substitution map {Y ↦ f(Y)} is not a finite-term unifier of that equation: one simultaneous application gives f(Y) on the left and f(f(Y)) on the right.
-
Use scope and composition deliberately. Why can fresh rule copies change the outcome of X = wrap(X)? With σ = {X ↦ Y} and δ = {Y ↦ a}, what does X(σ;δ) become?
Answer: If both occurrences identify the same variable, finite unification fails. If the names came from independent rule instances, they should first become X₁ and X₂, making X₁ = wrap(X₂) solvable by {X₁ ↦ wrap(X₂)}. This does not permit splitting repeated occurrences of one variable within one rule. For composition, Xσ = Y and Yδ = a, so X(σ;δ) = a; the complete composite is {X ↦ a, Y ↦ a}.
Read the substitution definitions before optimizing
Robinson’s A Machine-Oriented Logic Based on the Resolution Principle appeared in the January 1965 issue of the Journal of the ACM, volume 12, pages 23 to 41. Section 5 defines substitution, standardization, composition, unification and its algorithm. The paper selects disagreements between expressions; this chapter uses an original equation worklist with decomposition and explicit composition rather than copying that presentation or code. Original paper, section 5
Frank Pfenning’s Lecture Notes on Unification, dated April 6, 2023, provide a second route through composition, variable cases, the occurs-check and most-generality. Sections 3 and 4 are the relevant parts; later material on saturation is outside this chapter. Its notation places substitution on the left, whereas this chapter defines application and composition on the right. The formulas above make the order explicit. CMU 15-317, Lecture 21
The accompanying tests compare the solver with an independent term-node equivalence-class algorithm: merge equal nodes, propagate equal constructor arguments, reject incompatible heads, then detect cycles in the quotient graph. They separately apply returned substitutions to every original equation and check idempotence. Bounded ground assignments test whether their solutions factor through the returned MGU; that finite enumeration alone would not prove most-generality over the infinite universe of terms. The transformation argument supplies the general claim. Variable renaming, reversed equation order and repeated-variable failures test properties that one successful example cannot establish.
Make a prediction, then check
In one scope, the equations are X=Y and Y=f(X). What should finite-term unification do?
Learning objectives
- Implement finite first-order multi-equation unification, distinguishing identity deletion, function decomposition, variable elimination, head/arity clashes and direct/indirect occurs-check failure.
- Explain simultaneous substitution, composition order, idempotent output and MGU factorization, handling scopes, standardization apart and term-expansion cost correctly.
Prerequisites & connections
Explore related knowledge →References
- A Machine-Oriented Logic Based on the Resolution Principle
J. A. Robinson · 1965 - Lecture Notes on Unification, 15-317 Constructive Logic, Lecture 21
Frank Pfenning · 2023
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Codex · 2026-09-05 · Codex technical check: primary-source locations, original runnable models, independent finite-state oracles, bilingual review and second-agent cross-checks; not independent human peer review.
- Author AI reread both complete articles; five displays, identical full Python, six stable anchors and four answered exercises align. Distinguishes free-constructor syntax from possible co-denotation, variables replacing terms only, simultaneous substitution without chasing, composition order, MGU comparison on problem variables, domain/range-disjoint idempotence, no budget and runtime errors not serving as failure certificates. Not human peer review.
- Nine tests passed. The independent decision oracle merges term-node equivalence classes and equal-head arguments, rejects head clashes, then detects directed cycles in the quotient graph; it does not call the author’s elimination/substitution/occurrence helpers. Eight small terms give 64 equations, and 2,145 empty/single/two-equation systems with repetition are checked. Each enumerates assignments to two variables from {a,b,f(a),f(b),f(f(a)),f(f(b))}, giving 77,220 bounded total assignments; every solution is checked for factorization through the returned MGU. This finite enumeration is not presented as a proof over the infinite term universe.
- For 700 seeded systems over four variables, constants a/b and unary/binary f/g terms of generation depth at most two, each has zero through five equations. Original, bijectively renamed and reversed systems give 2,100 independent decision comparisons. Checked every original equation after substitution, idempotence, binding count at most original variables and unchanged input. Renaming preserves status/reason/three counters and corresponding substitutions; successful reversed-order results mutually instantiate through one-way matching, rather than requiring identical dictionaries.
- Executed main MGU X→wrap(a), Y→a, Z→a with five steps/three bindings/two decompositions; the parameter example binds only X→wrap(Y). Checked identity/empty success, X=Y/Y=X success, direct/indirect cyclic failure, consistent/inconsistent repeated variables, constant/function/arity clashes, empty equation sets, same printed names in distinct scopes and malformed/Boolean rejection. Thirty-six substitution pairs across five terms give 180 composition-versus-sequential-application checks, including non-idempotent and self-containing finite maps, ensuring simultaneous substitution is not silently replaced by recursive chasing.
- Actually checked nine expansion chains k=0 through eight: the unfolded X0 result has 2^(k+1)-1 nodes, with k+1 steps/bindings and zero decompositions. Complexity uses input N, actual steps P, maximum unfolded working size M and log H: O(1+N+P(1+M)+H) time and O(1+N+M+H) space, explicitly not a linear/polynomial bound in input size. Separately explains finite variable elimination, decreasing pending node size during fixed-substitution decomposition/deletion, and MGU factorization. Rational trees and capture-avoiding formula substitution are not claimed as implemented.
- Edited with repository-pinned English/Chinese Humanizer guides and passed the targeted prose scan; Chinese parenthetical terms use strong. Both locales compiled with current MDX, repository math plugins and strict:error/throwOnError:true KaTeX, then rendered via React: five displays/six headings/four strong answers, no KaTeX errors or emphasis remnants outside code. Initial compilation caught raw substitution braces parsed as MDX expressions; escaped them in both locales and rechecked. Only /tmp/aiwiki-next-unification is written, review:written; no whole-site check/build, shared-registry edits, browser visual QA or human-review claim.
- A separate AI reviewer found that colon-concatenated display keys could overwrite distinct (scope,name) variables. Switched to actual tuple keys, tuple displays for variables and quoted nonidentifier function names, updating both output blocks. A new regression preserves both formerly colliding bindings, distinguishes 49 legal punctuation-containing variables and seven constants, and separates constant a(b) from the function term a(b). The unification algorithm itself is unchanged.
- A second AI agent read both complete articles, example.py, the original eight and revised nine tests, and metadata without edits. No mathematical/core-algorithm defect: simultaneous replacement without chasing inserted terms, composition order, domain/range-disjoint idempotence, MGU factorization on problem variables, scope/standardization apart, direct/indirect occurs-check and free-constructor clashes are correct. Termination uses finite binding count plus decreasing node count between bindings; complexity explicitly uses actual unfolded working/log sizes rather than input-polynomial claims.
- The independent reference flattens terms into prefix tokens, finds the first disagreement across the two whole equation forests, then eagerly splices a binding through both forests and earlier substitution ranges. It calls none of author substitute/compose/occurs/unify as its reference and does not use the author-test equivalence-class quotient graph. Eight small terms give64 equations; empty, single and all ordered two-equation systems yield4,161 cases. Adding1,000 seeded systems with zero through six variables/equations, depth3 and function arities0–3, plus expansion chains k=0–10, gives5,172 systems. Success/failure reasons and successful MGU dictionaries agree.
- Across4,161 small systems, assigned X/Y each one of eight finite replacement terms that may contain variables:266,304 candidate substitutions. All8,440 actual unifiers factor through the computed MGU under an independent prefix one-way matcher. Candidates may contain their own variables and are applied simultaneously, without being misclassified as idempotent answers. Another800 random substitution pairs ×four terms give3,200 composition-versus-sequential-application checks, including non-idempotent/cyclic finite maps. These finite checks do not constitute a formal proof over the infinite term universe.
- Found and requested correction of a display overwrite: V(c,a:b) and V(b:c,a) had distinct true bindings but old colon-concatenated keys collapsed them. The author switched to actual(scope,name) tuple keys, tuple variable displays and repr-quoted nonidentifier function names. Reread those changes and both output blocks; on the final snapshot independently checked100 scoped/name combinations containing colons, quotes, backslashes, newlines and Chinese, with no lost binding, plus two function-label regressions. No remaining defect; the core unification algorithm is unchanged.
- Reran all nine final author tests,5,172 independent cases, non-ground factorization and3,200 composition checks successfully. Executed the final MDX program and compared both text output blocks byte-for-byte with stdout; five displays/six anchors/four answers and code align. Independent strict KaTeX/MDX plus React static HTML gives five displays/four strong answers per language with no math/emphasis errors. Wrote only /tmp review scripts/records, without author/repository edits, browser/whole-site checks or human peer review.
- Promotion preserves full prose, equations, program and exercises. Tests load published articles only, with draft fallback/skip paths removed and the first-order review assertion updated to checked; algorithm and independent oracle logic are unchanged. Final review binds both MDX SHA-256 hashes.
- After group publication, reread the navigation paragraph and changed completed first-order logic, unification or resolution directory entries to their articles, removing stale pending wording. Algorithms, derivations, prior sources and exercises are unchanged; final MDX hashes bind this scoped navigation revision.
Source locations checked:
- A Machine-Oriented Logic Based on the Resolution Principle · Actually opened/read the Tufts PDF. Page 23 footer/extracted lines 38–39 establishes January 1965, volume 12 no.1, pages 23–41. Definitions 2.2 and 2.6 at lines 80–96 cover function arities, zero-arity constants and terms. Definitions 5.1–5.5, printed page 31, lines 315–354, distinguish finite substitution, simultaneous instantiation, standardization and ordered composition; definitions 5.7–5.9, pages 32–33, lines 380–398, give unification, an occurs-checked disagreement algorithm and finite-variable termination. Read the unification theorem and factorization proof, pages 33–34, lines 428–460. The chapter supplies its own worklist invariant/finite-size explanation and does not claim to implement the paper’s resolution calculus.
- Lecture Notes on Unification, 15-317 Constructive Logic, Lecture 21 · Actually read official PDF title lines 0–5 for author/course/Lecture21/date2023-04-06; section 3, pages L21.2–L21.4, lines 55–171, for fresh variables versus bound variables, paired-equation composition, equal-variable/constant/function cases, occurs-check and the factorization meaning of most general. Read section 4, page L21.5, lines 181–210, for fresh copies, repeated-variable hazards and occurs-check context. Our scope-tag interface is explicit and separate from the notes’ quantifier notation; composition is defined on the right, while their notation applies substitutions on the left. Did not reuse later saturation examples or make current-product performance claims.
- A Machine-Oriented Logic Based on the Resolution Principle · Independently opened the Tufts-hosted original 19-page PDF and read printed p31 §§5.1–5.5 (web lines315–354) for simultaneous substitution, standardization and ordered composition; pp32–34 §§5.7–5.9 and unification theorem/proof (lines380–460) for occurs-check, variable elimination termination and MGU factorization. Same paper was separately read at the Stanford archive during resolution authoring, but no Tufts scan visual inspection is claimed for this review.
- Lecture Notes on Unification, 15-317 Constructive Logic, Lecture 21 · Independently opened official nine-page lecture PDF. Title lines0–5 confirms Frank Pfenning,15-317,Lecture21,April6,2023. Read §3 L21.2–L21.4 (lines55–171) for fresh variables, simultaneous effects, composition direction, same-variable/constructor cases, occurs-check and MGU factorization; §4 L21.5 (lines181–210) for fresh clause copies and repeated-variable hazards. Did not adopt its broad Prolog implementation remarks or claim lecture-code execution.
Related topics