You get a bonus - 1 coin for daily activity. Now you have 1 coin

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Lecture



In mathematics, linguistics, computer science, and logic, rewriting covers a wide range of methods for replacing subterms of a formula with other terms. Such methods can be implemented using rewriting systems (also known as rewrite systems, rewriting engines, or reduction systems). In their simplest form, they consist of a set of objects and relations that determine how these objects are transformed.

Rewriting can be non-deterministic. A single rule for rewriting a term may be applicable to it in several different ways, or several rules may be applicable at once. In such a case, rewriting systems provide not an algorithm for replacing one term with another, but a set of possible ways in which the rules can be applied. However, when combined with an appropriate algorithm, rewriting systems can be viewed as computer programs, and some theorem provers and declarative programming languages are based on term rewriting.

Rewriting — a broad range of techniques, methods, and theoretical results related to the procedures of sequentially replacing parts of formulas or terms of a formal language according to a given scheme — a system of rewriting rules. In its most general form, it refers to a collection of a set of objects and rules — relations between these objects that indicate how to transform this set.

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Rewriting can be non-deterministic. For example, a system of rewriting rules may include a rule that can be applied to the same term in several different ways, without specifying which particular way should be applied in any given case. If a rewriting system is nevertheless formulated as an unambiguously understood algorithm, it can be regarded as a computer program. A number of interactive theorem-proving systems and declarative programming languages are based on rewriting techniques.

Examples

The basic properties of rewriting systems can be formulated without resorting to a specific implementation of them as operations on terms. For this purpose, the notion of an Abstract Reduction System or ARS (short for Abstract Reduction Systems) is often used. An ARS consists of some set A and a set of binary relations (→α)α∈IRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic on it, called reductions. It is said that a reduces or rewrites to b in one step with respect to a given ARS if the pair (a,b) belongs to some →αRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. The most important properties of reduction systems are:

  • Confluence — if a can be reduced in some number of steps to both b and c, then there exists an element d to which both b and c can be reduced.
  • Termination — every chain of one-step reductions is always finite, that is, an element is eventually reached that can no longer be reduced.
  • Local (or weak) confluence — the same as confluence, but under the condition that a rewrites to b and c in exactly one step.
  • Weak termination — for every element there exists a terminating chain of its successive reductions.
  • Canonicity or the Church-Rosser propertyconfluence plus termination.

Obviously, confluence implies weak confluence, and termination, correspondingly, implies weak termination. However, confluence and termination are not related to each other. For example, a system consisting of the single rule a•b → b•a is confluent but not terminating. A system consisting of the two rules a → b and a → c is terminating but not confluent, while all three rules together form a system that is neither terminating nor confluent.

Termination of a reduction system makes it possible to assign to each element its normal form — an element to which it can be reduced but which can itself no longer be reduced. If confluence also holds, then such a normal form will always be unique, or canonical. In this connection, the Church-Rosser property is especially valuable, since it allows the problem of the equality of two elements a and b to be solved quickly and efficiently with respect to the system of equalities corresponding to the set of reductions without regard to direction. For this, it suffices to compute the normal forms of both elements. Since in this case the normal form will also be canonical, the elements will be equal if and only if the results coincide.

Logic

In logic, the procedure for obtaining the conjunctive normal form (CNF) of a formula can be implemented as a rewriting system. [ 6 ] For example, the rules of such a system would be as follows:

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic(double negation elimination)

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic(De Morgan's laws)

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic(distributivity)

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

In each rule, every variable denotes a subexpression, and the symbol ( Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic) means that the expression corresponding to the left-hand side can be rewritten as the expression corresponding to the right-hand side. In such a system, each rule is a logical equivalence, so rewriting an expression according to these rules does not change its truth value. Other useful rewriting systems in logic may not preserve truth values, see, for example, equisatisfiability.

Arithmetic

Term rewriting systems can be used to compute arithmetic operations on natural numbers. To do this, each such number must be encoded as a term. The simplest encoding is used in the Peano axioms and is based on the constant 0 (zero) and the successor function S. For example, the numbers 0, 1, 2, and 3 are represented by the terms 0, S(0), S(S(0)), and S(S(S(0))) respectively. The following term rewriting system can then be used to compute the sum and product of given natural numbers.

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

For example, the computation of 2+2, resulting in 4, can be reproduced by rewriting the term as follows:

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic →(2)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic →(2)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

where the label above each arrow indicates the rule used for each rewrite step.

As another example, the computation of 2⋅2 looks like this:

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic →saRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

where the last step involves the calculations from the previous example.

Linguistics

In linguistics, phrase structure rules, also called rewrite rules, are used in some systems of generative grammar [ 8 ] as a means of generating grammatically correct sentences of a language. Such a rule usually has the form Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, where A is the label of a syntactic category, for example, a noun phrase or a sentence, and X is a sequence of such labels or morphemes, expressing the fact that A can be replaced by X when forming the structure of the sentence. For example, the rule Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logicmeans that a sentence may consist of a noun phrase (NP) followed by a verb phrase (VP); further rules will specify what subcomponents the noun phrase and verb phrase may consist of, and so on.

Abstract Text Rewriting Systems: Annotation Rewriting System

From the examples given above, it is clear that we can consider rewriting systems abstractly. We need to specify a set of objects and rules that can be applied to transform them. The most general (one-dimensional) realization of this concept is called an abstract reduction system [ 9 ] or an abstract rewriting system (abbreviated ARS). [ 10 ] An ARS is simply a set A of objects together with a binary relation → on A, called the reduction relation, the rewriting relation [ 11 ], or simply the reduction. [ 9 ]

Many concepts and notations can be defined in the general ARS setting. →∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is the reflexive transitive closure of →Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. ↔Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is the symmetric closure of →Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. ↔∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is the reflexive transitive symmetric closure of →Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. The word problem for an ARS consists in determining, for given x and y, whether x↔∗yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. An object x in A is called reducible if there exists some other y in A such that x→yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic; otherwise it is called irreducible or a normal form. An object y is called "a normal form of x" if x→∗yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, and y is irreducible. If the normal form of x is unique, this is usually denoted x↓Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. If every object has at least one normal form, the ARS is called normalizing. x↓yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, or x and y are said to be joinable, if there exists some z with the property that Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. An ARS is said to have the Church-Rosser property if x↔∗yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic implies x↓yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. An ARS is confluent if for all w, x and y in A, Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic implies x↓yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. An ARS is locally confluent if and only if for all w, x and y in A, x←w→yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic implies x↓yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. An ARS is called terminating or Noetherian if there is no infinite chain Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. A confluent and terminating ARS is called convergent or canonical.

Important theorems for abstract rewriting systems are that an ARS is confluent if and only if it has the Church-Rosser property, Newman's lemma (a terminating ARS is confluent if and only if it is locally confluent), and that the word problem for an ARS is in general undecidable.

String rewriting systems

A string rewriting system (SRS), also known as a semi-Thue system, uses the free monoid structure of strings (words) over an alphabet to extend a rewriting relation, RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, to all strings in the alphabet that contain the left- and right-hand sides of some rules as substrings. Formally, a semi-Thue system is a pair (Σ,R)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic where ΣRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is a (usually finite) alphabet, and RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is a binary relation between certain (fixed) strings in the alphabet, called the set of rewrite rules. The one-step rewriting relation →RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic induced by RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic on Σ∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is defined as follows: if s, tRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic are some strings, then Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic if there exist Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic such that Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, and uRvRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. Since →RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is a relation on Σ∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, the pair (Σ∗,→R)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic fits the definition of an abstract rewriting system. Since the empty string is in Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is a subset of →RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. If the relation RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is symmetric, the system is called a Thue system.

In an SRS, the reduction relation Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is compatible with the monoid operation, meaning that x→R∗yRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic implies uxv→R∗uyvRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic for all strings x,y,u,v∈Σ∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. Similarly, the reflexive transitive symmetric closure of Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, denoted Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, is a congruence, that is, an equivalence relation (by definition), and is also compatible with string concatenation. The relation ↔R∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is called the Thue congruence generated by Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. In a Thue system, i.e. if RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is symmetric, the rewriting relation →R∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic coincides with the Thue congruence ↔R∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic.

The notion of a semi-Thue system essentially coincides with a monoid presentation. Since ↔R∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is a congruence, we can define the quotient monoid MR=Σ∗/↔R∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic of the free monoid Σ∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic with respect to Thue. If the monoid Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic M is isomorphic to Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, then the semi-Thue system (Σ,R)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is called a monoid presentation of MRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic.

We immediately find very useful connections with other branches of algebra. For example, with the alphabet Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic and the rules Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, where εRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is the empty string, this is a presentation of the free group on one generator. If instead the rules are simply Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, then we obtain a presentation of the bicyclic monoid. Thus, semi-Thue systems provide a natural foundation for solving the word problem for monoids and groups. In fact, every monoid has a presentation of the form (Σ,R)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, that is, it can always be represented by a semi-Thue system, possibly over an infinite alphabet.

The word problem for a semi-Thue system is in general undecidable; this result is sometimes called the Post-Markov theorem. [ 12 ]

Term rewriting systems

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Fig.1: Schematic triangle diagram of the application of the rewrite rule Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic at position pRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic in the term, with the corresponding substitution σRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Fig.2: Left-hand-side term rule Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic matched within the term Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

A term rewriting system (TRS) — is a rewriting system whose objects are terms, that is, expressions with nested subexpressions. For example, the system shown above in the «Logic» section is a term rewriting system. The terms in this system consist of the binary operators (∨)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic and (∧)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic and the unary operator (¬)Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. The rules also contain variables, which represent any possible term (although one variable always represents the same term within a single rule).

Unlike string rewriting systems, whose objects are sequences of symbols, the objects of a term rewriting system form a term algebra. A term can be represented as a tree of symbols, with the set of allowed symbols fixed by a given signature. As a formalism, term rewriting systems have all the power of Turing machines, that is, every computable function can be defined by a term rewriting system. [ 13 ]

Some programming languages are based on term rewriting. One such example is Pure, a functional programming language for mathematical applications.

Formal definition

«Redex» redirects here. For the drug, see Tadalafil.

A rewrite rule is a pair of terms, usually written as l→rRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, to indicate that the left-hand side l can be replaced by the right-hand side r. A term rewriting system is a set R of such rules. A rule l→rRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic can be applied to a term s if the left-hand term l matches some subterm of s, that is, if there is some substitution σRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic such that the subterm of sRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic rooted at some position p is the result of applying the substitution σRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic to the term l. The subterm corresponding to the left-hand side of the rule is called the redex, or reducible expression. [ 16 ] The resulting term t of applying this rule is the result of replacing the subterm at position p in s with the term rRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic to which the substitution σRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic has been applied, see figure 1. In this case, sRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is said to be rewritten in one step, or rewritten directly, to tRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic by the system RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, formally denoted as s→RtRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, s→RtRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, or as s→RtRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic by some authors.

If a term t1Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic can be rewritten in several steps to a term tnRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, that is, if t1→Rt2→R⋯→RtnRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, the term t1Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is said to rewrite to tnRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, formally denoted as t1→R+tnRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic. In other words, the relation →R+Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is the transitive closure of the relation →RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic; the notation →R∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic is also often used to denote the reflexive-transitive closure of →RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, that is, Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic if s=tRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic or s→R+tRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic Term rewriting given by a set RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic of rules can be regarded as an abstract rewriting system, as defined above, with terms as its objects and →RRewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic as its rewriting relation.

For example, Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logicis a rewrite rule commonly used to establish normal form with respect to the associativity of ∗Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and LogicThis rule can be applied to the numerator in the term Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic with the corresponding substitution Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, see figure 2. Applying this substitution to the right-hand side of the rule gives the term Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, and replacing the numerator with this term gives Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic, which is the result of applying the rewrite rule. In general, applying the rewrite rule achieved what is called «applying the law of associativity to Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic"in elementary algebra. Alternatively, the rule could have been applied to the denominator of the original term, giving Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic.

Termination

Questions of termination of rewriting systems in general are discussed in the section «Abstract rewriting system#Termination and convergence» . For term rewriting systems in particular, the following additional subtleties should be considered.

Termination is undecidable even for a system consisting of a single rule with a linear left-hand side. Termination is also undecidable for systems using only unary function symbols; however, it is decidable for finite ground systems.

The following term rewriting system is normalizing, but not terminating, and not confluent: Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

The following two examples of term rewriting systems are due to Toyama:

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

and

g(x,y)→x,Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

g(x,y)→y.Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic

Their union is a system that is not terminating, since

Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and LogicThis result refutes a conjecture of Dershowitz [ 23 ] , who claimed that the union of two term rewriting systems R1Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic and R2Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic again terminates if all left-hand sides of R1Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic and right-hand sides of R2Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic are linear, and there are no « overlaps » between the left-hand sides of R1Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and Logic and right-hand sides of R2Rewriting (Term Replacement System) in Mathematics, Linguistics, Computer Science, and LogicToyama's examples satisfy all of these properties.

See the sections Rewrite order and Path order (term rewriting) for information on the ordering relations used in termination proofs for term rewriting systems.

Higher-order rewriting systems

Higher-order rewriting systems are a generalization of first-order term rewriting systems to lambda terms, allowing the use of higher-order functions and bound variables. Various results about first-order TRSs can also be reformulated for HRSs. [ 25 ]

Graph rewriting systems

Graph rewriting systems are another generalization of term rewriting systems, operating on graphs instead of (ground) terms / their corresponding tree representation.

Trace rewriting systems

Trace theory provides a means for discussing multiprocessing in more formal terms, for example, through the trace monoid and the history monoid. Rewriting can also be carried out in trace systems.

Classical rewriting theory

Although the concept of rewriting was originally introduced for the lambda calculus, the main body of results and applications today concerns first-order rewriting. Rewriting systems of this kind are called Term Rewriting Systems, or TRS.

Higher-order rewriting

Higher-order rewriting systems are a generalization of first-order term rewriting systems to lambda terms, allowing higher-order functions and bound variables. Various results about first-order term rewriting systems can also be reformulated for higher orders.[

See also

  • Critical pair (logic)
  • Compiler
  • Knuth-Bendix completion algorithm
  • L-systems define rewriting that is performed in parallel.
  • Referential transparency in computer science
  • Regulated rewriting
  • Interaction nets
  • Lambda calculus
  • Rewriting system
  • Group presentation
  • Refal

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Logics"

Terms: Logics