HOME

TheInfoList



OR:

In
theoretical computer science Theoretical computer science is a subfield of computer science and mathematics that focuses on the Abstraction, abstract and mathematical foundations of computation. It is difficult to circumscribe the theoretical areas precisely. The Associati ...
, in particular in
term rewriting In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewrite engines, or reduc ...
, a path ordering is a
well-founded In mathematics, a binary relation is called well-founded (or wellfounded or foundational) on a set (mathematics), set or, more generally, a Class (set theory), class if every non-empty subset has a minimal element with respect to ; that is, t ...
strict total order In mathematics, a total order or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation \leq on some set X, which satisfies the following for all a, b and c in X: # a \leq a ( ref ...
(>) on the set of all terms such that :''f''(...) > ''g''(''s''1,...,''s''''n'')   if   ''f'' .> ''g''   and   ''f''(...) > ''s''''i'' for ''i''=1,...,''n'', where (.>) is a user-given total precedence order on the set of all function symbols. Intuitively, a term ''f''(...) is bigger than any term ''g''(...) built from terms ''s''''i'' smaller than ''f''(...) using a lower-precedence root symbol ''g''. In particular, by
structural induction Structural induction is a proof method that is used in mathematical logic (e.g., in the proof of Łoś' theorem), computer science, graph theory, and some other mathematical fields. It is a generalization of mathematical induction over natural ...
, a term ''f''(...) is bigger than any term containing only symbols smaller than ''f''. A path ordering is often used as reduction ordering in term rewriting, in particular in the
Knuth–Bendix completion algorithm The Knuth–Bendix completion algorithm (named after Donald Knuth and Peter Bendix) is a semi-decision algorithm for transforming a set of equations (over terms) into a confluent term rewriting system. When the algorithm succeeds, it effectively ...
. As an example, a term rewriting system for " multiplying out" mathematical expressions could contain a rule ''x''*(''y''+''z'') → (''x''*''y'') + (''x''*''z''). In order to prove termination, a reduction ordering (>) must be found with respect to which the term ''x''*(''y''+''z'') is greater than the term (''x''*''y'')+(''x''*''z''). This is not trivial, since the former term contains both fewer function symbols and fewer variables than the latter. However, setting the precedence (*) .> (+), a path ordering can be used, since both ''x''*(''y''+''z'') > ''x''*''y'' and ''x''*(''y''+''z'') > ''x''*''z'' is easy to achieve. There may also be systems for certain general recursive functions, for example a system for the
Ackermann function In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total function, total computable function that is not Primitive recursive function, primitive recursive. ...
may contain the rule A(''a''+, ''b''+) → A(''a'', A(''a''+, ''b'')), where ''b''+ denotes the
successor Successor may refer to: * An entity that comes after another (see Succession (disambiguation)) Film and TV * ''The Successor'' (1996 film), a film including Laura Girling * The Successor (2023 film), a French drama film * ''The Successor'' ( ...
of ''b''. Given two terms ''s'' and ''t'', with a root symbol ''f'' and ''g'', respectively, to decide their relation their root symbols are compared first. * If ''f'' <. ''g'', then ''s'' can dominate ''t'' only if one of ''ss subterms does. * If ''f'' .> ''g'', then ''s'' dominates ''t'' if ''s'' dominates each of ''ts subterms. * If ''f'' = ''g'', then the immediate subterms of ''s'' and ''t'' need to be compared recursively. Depending on the particular method, different variations of path orderings exist. The latter variations include: * the multiset path ordering (mpo), originally called recursive path ordering (rpo) * the lexicographic path ordering (lpo) * a combination of mpo and lpo, called recursive path ordering by Dershowitz, Jouannaud (1990) Dershowitz, Okada (1988) list more variants, and relate them to Ackermann's system of ordinal notations. In particular, an upper bound given on the order types of recursive path orderings with ''n'' function symbols is φ(''n'',0), using Veblen's function for large countable ordinals.


Formal definitions

The multiset path ordering (>) can be defined as follows: where * (≥) denotes the
reflexive closure In mathematics, the reflexive closure of a binary relation R on a set X is the smallest reflexive relation on X that contains R, i.e. the set R \cup \. For example, if X is a set of distinct numbers and x R y means "x is less than y", then the refl ...
of the mpo (>), * denotes the
multiset In mathematics, a multiset (or bag, or mset) is a modification of the concept of a set that, unlike a set, allows for multiple instances for each of its elements. The number of instances given for each element is called the ''multiplicity'' of ...
of ''s''’s subterms, similar for ''t'', and * (>>) denotes the multiset extension of (>), defined by >> if can be obtained from ** by deleting at least one element, or ** by replacing an element by a multiset of strictly smaller (w.r.t. the mpo) elements. More generally, an order functional is a function ''O'' mapping an ordering to another one, and satisfying the following properties:Huet (1986), sect.4.3, p. 58 * If (>) is transitive, then so is ''O''(>). * If (>) is
irreflexive In mathematics, a binary relation R on a set X is reflexive if it relates every element of X to itself. An example of a reflexive relation is the relation " is equal to" on the set of real numbers, since every real number is equal to itself. A ...
, then so is ''O''(>). * If ''s'' > ''t'', then ''f''(...,''s'',...) ''O''(>) ''f''(...,''t'',...). * ''O'' is
continuous Continuity or continuous may refer to: Mathematics * Continuity (mathematics), the opposing concept to discreteness; common examples include ** Continuous probability distribution or random variable in probability and statistics ** Continuous ...
on relations, i.e. if ''R''0, ''R''1, ''R''2, ''R''3, ... is an infinite sequence of relations, then ''O''(∪ ''R''''i'') = ∪ ''O''(''R''''i''). The multiset extension, mapping (>) above to (>>) above is one example of an order functional: (>>)=''O''(>). Another order functional is the
lexicographic Lexicography is the study of lexicons and the art of compiling dictionaries. It is divided into two separate academic disciplines: * Practical lexicography is the art or craft of compiling, writing and editing dictionaries. * Theoretical lex ...
extension, leading to the lexicographic path ordering.


References

{{reflist Rewriting systems Order theory