Predicate symbol 2026-10-31
A predicate symbol of arity is interpreted as a subset of the th Cartesian power of a structure's domain. Applying it to first-order terms gives an atomic formula. In a singleton domain there is only one possible argument tuple at each arity, but a predicate may still be interpreted as either the empty relation or the full relation.
Rational tree 2026-11-05
A rational tree is a possibly infinite tree with only finitely many distinct rooted subtrees. It therefore has a finite representation as a term graph, possibly with cycles. Here “rational” describes finite representability, not values in the rational numbers.
For example, the equation describes the infinite expression . A single node labeled with an edge back to itself represents it. There is no solution among finite first-order terms: the occurs check rejects binding a variable to a first-order term containing that variable. Unification over rational trees instead admits this cyclic representation, so implementations must specify which semantics they use. SWI-Prolog explicitly supports cyclic terms for many term operations.[ref]
Subterm 2026-11-05
A subterm of a first-order term is a term appearing at a node of its syntactic tree, including the whole term. Recursively, a variable or constant has only itself as a subterm; the subterms of are the full term together with every subterm of every . A proper subterm excludes the full term.
For , the distinct subterms are , and . The subterm occurs twice, so a subterm value and a subterm occurrence are different notions. Replacing a particular occurrence requires its position in the tree, not only its text.
The subterm relation organizes structural induction, recursive evaluation and term rewriting. Every proper subterm has smaller syntactic size in the usual finite term grammar, so recursive definitions can terminate by descending through the tree. A substring of printed notation is not automatically a subterm: the tree structure determines which expressions are complete terms.
In a first-order structure, an interpretation assigns a relation of the specified arity to each predicate symbol, a total function of the specified arity to each function symbol, and an element to each constant symbol. Evaluation of first-order terms and truth of logical formulas are then defined recursively. This specifies how symbols acquire their meanings on the underlying set.
Term graph 2026-11-05
A term graph represents the structure of first-order terms with labelled nodes and ordered argument graph edges. For finite acyclic first-order terms, the representation can be a directed acyclic graph, allowing identical subterms to share nodes rather than being copied into separate branches of a tree.
The first-order term has five occurrences in its ordinary syntax tree: one , two and two . A shared term graph can use only three nodes, with the two argument graph edges of pointing to the same node. Sharing a variable node is also useful: identifications made by a unification algorithm can be represented once and followed from every occurrence.[ref]
Sharing changes storage, not the meaning of an acyclic finite first-order term. A cycle is different. A node labelled whose argument points back to itself unfolds to an infinite rational tree; it cannot represent a finite solution to . An implementation must therefore state whether it supports infinite rational trees or enforces the finite-term occurs check.
Term valuation Created 2026-10-31 Updated 2026-11-05
A first-order structure and an assignment determine the value of every term recursively: a variable has its assigned value, a constant has its interpreted value, and a compound function term is evaluated by applying the interpreted function to the recursively evaluated arguments. This operation supplies the input values for the satisfaction clauses of atomic formulas.
Ugo Montanari 2026-11-05
Ugo Montanari coauthored the 1982 unification algorithm with Alberto Martelli. Their paper treats first-order terms as equations and derives an efficient implementation from simpler transformation rules, integrating the acyclicity test needed for finite terms.[ref]
For example, decomposing gives and , whereas has no finite-term solution and must be rejected. The point is to compute a most general unifier without expanding or repeatedly traversing shared term structure unnecessarily. Such unification supports automated deduction and logic programming.
Unification Created 2026-10-20 Updated 2026-11-05
Unification finds a substitution making given first-order terms syntactically identical. In first-order unification, a substitution replaces variables by first-order terms while leaving function symbols fixed. A most general unifier captures the necessary identifications: every other unifier follows by a further substitution.[ref]
For example, and have most general unifier . The variable remains free; assigning it a particular first-order term gives a more specific unifier. Requiring forces both and , so distinct constant symbols make it impossible.
Syntactic identity is essential. With addition treated as a binary function symbol, the first-order terms and are different even though their values agree under ordinary arithmetic. Equational unification incorporates specified identities and is a different problem. For finite first-order terms, the occurs check rejects : a finite first-order term cannot equal one of its proper subterms. Unification makes resolution possible by aligning atomic formulas before inference.
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]
Quantifier-free logical formulas have the same truth value in a substructure and its ambient first-order structure on tuples from the smaller carrier. First-order term evaluation agrees; atomic relations agree by restriction; Boolean connectives preserve agreement. A universally quantified quantifier-free matrix true on all ambient tuples is therefore true on all substructure tuples.