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.
Assignment in a first-order structure 2026-10-31
An assignment in a first-order structure chooses a domain element for each variable. It determines the value of every first-order term and the truth of every first-order formula, once the interpretations of symbols are fixed. A first-order sentence has no free variables, so its truth is independent of the assignment in a first-order structure. Quantification changes the value assigned to the bound variable while retaining the other values.
Bounded arithmetic sentence 2026-10-31
A bounded arithmetic sentence is an arithmetic bounded formula with no free variables. Every quantifier is restricted by an arithmetic first-order term. In the standard natural numbers such a first-order sentence has a definite truth value determined by finite bounded searches.
Let two first-order models satisfy a complete theory and suppose every element of the first is the value of a closed term. Send each such value to the value of the same first-order term in the second first-order model. Completeness decides all logical equality first-order sentences, making this map well-defined and injective. It also decides every logical formula with closed terms substituted, making the map elementary. Thus the first first-order model is prime.
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 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.
First-order unification Created 2026-10-20 Updated 2026-11-05
First-order unification solves a finite system of equations between first-order terms. A useful rule presentation deletes , orients to when is a variable, decomposes equal outer function symbols into argument equations, and rejects unequal outer function symbols. For , reject a nontrivial occurrence of in by the occurs check; otherwise propagate the substitution through the other equations. A solved system assigns distinct variables that do not occur in its right sides.[ref]
For example,first becomes . Propagating gives , hence a most general unifier. Keeping without composing the later substitution would leave an unsolved dependency.
The rules preserve the possible unifiers, apart from explicitly rejecting impossible equations. Decomposition works because identical first-order terms have identical constructors and arguments. At a solved system, any other unifier is obtained by instantiating its remaining free variables; this proves the most general unifier property. Efficient implementations share term graphs rather than repeatedly copying growing first-order terms.
First-order variable assignment 2026-10-31
For a first-order structure with domain , an assignment maps every individual variable to an element of . It extends recursively to first-order terms using the interpreted functions. To evaluate , vary only the value of over , holding the other values fixed. The truth value of a first-order formula depends only on its free variables; a first-order sentence is therefore independent of the assignment.
Free for substitution 2026-10-25
A first-order term is free for substitution for a variable in a first-order formula when no free variable of becomes bound after replacing a free occurrence of . Equivalently, at every free occurrence to be replaced, none of its enclosing quantifiers binds a variable appearing in . The test depends on occurrences and scopes, not merely on which variable names appear anywhere in the formula.
Function symbol 2026-10-31
A function symbol is part of the syntax of a first-order language, with a specified finite arity. In a first-order structure it is interpreted as a function from the corresponding finite power of the domain into the domain. Applying it to the appropriate number of first-order terms forms another term. The symbol itself is distinguished from its interpretation in a particular structure.
Ground clause 2026-10-31
A first-order clause containing no variables. Its first-order terms are ground terms, so resolution between such first-order clauses reduces to propositional logic on the ground atoms.
Ground term 2026-10-31
A first-order term containing no variables. Constant symbols are ground terms; applying a function symbol to ground terms produces another ground term.
Logical formula Created 2026-10-31 Updated 2026-11-05
A logical formula is a finite expression constructed by the formation rules of a formal language. Propositional formulas combine propositional variables by logical connectives. First-order formulas additionally contain terms, atomic relations and quantifiers. A logical formula is a syntactic object; its truth is determined only after specifying a suitable interpretation and values for its free variables.
Margaret J. Corasick 2026-11-05
Margaret J. Corasick coauthored the 1975 multi-keyword matching algorithm with Alfred V. Aho. Their Aho-Corasick algorithm builds a finite-state keyword-matching machine and scans the text once, reporting occurrences of all dictionary patterns.[ref]
A trie shares pattern prefixes, while failure links retain the longest useful suffix after a mismatch. For patterns
he and she, reaching the end of she must also report he; terminal suffix information is therefore part of matching, not merely following trie edges. The mechanism makes one text scan reusable across many search terms.By part (c), has a first-order model, so it is consistent. By part (d), every first-order sentence is equivalent modulo to a quantifier-free sentence. In the first-order signature consisting only of and first-order equality, there are no constant symbols, no ground first-order terms, and no nullary predicates. Thus a closed quantifier-free formula reduces to true or false, using the logical truth constants. All first-order models of therefore agree on every first-order sentence:
The construction in part (d) is effective. Conversion to disjunctive normal form, enumeration of finite equality partitions and adjacency patterns, and testing the finitely many witness cases are all terminating operations. Apply them recursively to a given first-order sentence and evaluate the final truth constant. This decides whether the first-order sentence belongs to , givingNo useful bound on the running time is needed for decidability; the potentially large enumeration still always terminates.
First convert the four first-order sentences to clausal form. In the first, pull the existential quantifier across the logical disjunction, then replace its witness by a fresh unary Skolem function . The usual nonempty-domain convention for first-order logic makes this transformation valid even when already holds. The four Skolem normal forms areThe Skolemization of preserves satisfiability in an expanded first-order signature; it does not assert logical equivalence for every arbitrary interpretation of the new Skolem function. The other three first-order sentences only require elimination of implications and movement of universal quantifiers.
For a ground resolution refutation, negate the desired conclusion and introduce a fresh constant for a person who is not merry. This adds the ground clause . Use these ground instances of the four universal first-order sentences:Here comes from with , after removing a duplicate negative literal. All first-order terms in these ground clauses are ground. Resolving givesRepeated positive literals in have again been removed. The empty ground clause proves unsatisfiability of the premises together with the negated conclusion. ThereforeThe key is to apply the first three premises to Lucy herself: either she is already happy, or she loves somebody, hence loves herself, which forces her happiness and activates the final premise.
For a first-order signature with at least one constant symbol, its Herbrand universe is the set of all ground terms built from its constant and function symbols. If necessary add a fresh constant to make this set nonempty. A Herbrand structure has exactly this domain; each constant denotes itself and each function symbol forms the corresponding syntactic first-order term. Its remaining choices are the truth values of the ground predicate atoms. For example, with constant and unary function , the Herbrand universe is .
One useful clausal form of Herbrand's theorem is the following. For a set of universally quantified, equality-free first-order clauses,Ground instances substitute ground terms for all variables. On the right, treat the ground predicate atoms as independent Boolean variables. Equivalently, is satisfiable if and only if it has a Herbrand model. A general first-order sentence can first be put into Skolem normal form and clausal form, with the new symbols included in the Herbrand universe.
An equivalent existential version says that a valid equality-free first-order sentence with quantifier-free formula has finitely many ground tuples such that is propositionally valid, adding a constant if needed. This explains why a finite ground resolution refutation can establish a consequence involving infinitely many possible ground terms.
The equality-free qualification matters. If first-order equality is present, one must handle its axioms and use a term model modulo a suitable congruence, or use the corresponding theorem with equality. Literal syntactic term interpretation alone cannot model a consistent requirement such as for distinct constant symbols.
Past exam of the logic and set theory course of the University of Oxford 2007 A 3 i Solution 2026-10-31
The first-order terms are the smallest collection containing every variable and and containing whenever are first-order terms. The atomic formulas are exactly for first-order terms . Logical formulas are then obtained from atomic formulas by the logical connectives and quantifiers: if are logical formulas and a variable, then , , , , and are logical formulas. These closure rules, with no additional strings admitted, define the syntax; a presentation using fewer primitive connectives treats the others as abbreviations.
Semantic entailment is the conditionThe same first-order variable assignment is used for all premises and the conclusion. This matters when free variables occur; for first-order sentences the truth value is independent of the first-order variable assignment.
Past exam of the logic and set theory course of the University of Oxford 2007 B 7 v Solution 2026-10-31
The family is a subset of all complex sequences, so its cardinality is at mostFor each , the sequence belongs to the family because its displayed series has just one nonzero first-order term. These sequences are distinct as varies, giving a lower bound . ThusThe source condition is convergence of , without absolute-value bars. The argument uses exactly that printed condition and makes no assertion that it is equivalent to square summability of complex sequences. The same upper and lower bounds would also work for the stronger absolute-square condition, but no alteration of the source is needed.