Strongly normalising
   HOME

TheInfoList



OR:

In
abstract rewriting In mathematical logic and theoretical computer science, an abstract rewriting system (also (abstract) reduction system or abstract rewrite system; abbreviated ARS) is a Formalism (mathematics), formalism that captures the quintessential notion and ...
, an object is in normal form if it cannot be rewritten any further, i.e. it is irreducible. Depending on the rewriting system, an object may rewrite to several normal forms or none at all. Many properties of rewriting systems relate to normal forms.


Definitions

Stated formally, if (''A'',→) is an
abstract rewriting system In mathematical logic and theoretical computer science, an abstract rewriting system (also (abstract) reduction system or abstract rewrite system; abbreviated ARS) is a formalism that captures the quintessential notion and properties of rewriting s ...
, ''x''∈''A'' is in normal form if no ''y''∈''A'' exists such that ''x''→''y'', i.e. ''x'' is an irreducible term. An object ''a'' is weakly normalizing if there exists at least one particular sequence of rewrites starting from ''a'' that eventually yields a normal form. A rewriting system has the weak normalization property or is ''(weakly) normalizing'' (WN) if every object is weakly normalizing. An object ''a'' is strongly normalizing if every sequence of rewrites starting from ''a'' eventually terminates with a normal form. An abstract rewriting system is ''strongly normalizing'', ''terminating'', ''noetherian'', or has the (strong) normalization property (SN), if each of its objects is strongly normalizing. A rewriting system has the ''normal form property'' (NF) if for all objects ''a'' and normal forms ''b'', ''b'' can be reached from ''a'' by a series of rewrites and inverse rewrites only if ''a'' reduces to ''b''. A rewriting system has the ''unique normal form property'' (UN) if for all normal forms ''a'', ''b'' ∈ ''S'', ''a'' can be reached from ''b'' by a series of rewrites and inverse rewrites only if ''a'' is equal to ''b''. A rewriting system has the ''unique normal form property with respect to reduction'' (UN) if for every term reducing to normal forms ''a'' and ''b'', ''a'' is equal to ''b''.


Results

This section presents some well known results. First, SN implies WN. Confluence (abbreviated CR) implies NF implies UN implies UN. The reverse implications do not generally hold. is UN but not UN as b=e and b,e are normal forms. is UN but not NF as b=c, c is a normal form, and b does not reduce to c. is NF as there are no normal forms, but not CR as a reduces to b and c, and b,c have no common reduct. WN and UN imply confluence. Hence CR, NF, UN, and UN coincide if WN holds.


Examples

One example is that simplifying arithmetic expressions produces a number - in arithmetic, all numbers are normal forms. A remarkable fact is that all arithmetic expressions have a unique value, so the rewriting system is strongly normalizing and confluent: :(3 + 5) * (1 + 2) ⇒ 8 * (1 + 2) ⇒ 8 * 3 ⇒ 24 :(3 + 5) * (1 + 2) ⇒ (3 + 5) * 3 ⇒ 3*3 + 5*3 ⇒ 9 + 5*3 ⇒ 9 + 15 ⇒ 24 Examples of non-normalizing systems (not weakly or strongly) include counting to infinity (1 ⇒ 2 ⇒ 3 ⇒ ...) and loops such as the transformation function of the
Collatz conjecture The Collatz conjecture is one of the most famous unsolved problems in mathematics. The conjecture asks whether repeating two simple arithmetic operations will eventually transform every positive integer into 1. It concerns integer sequence, seq ...
(1 ⇒ 2 ⇒ 4 ⇒ 1 ⇒ ..., it is an open problem if there are any other loops of the Collatz transformation). Another example is the single-rule system , which has no normalizing properties since from any term, e.g. ''r''(4,2) a single rewrite sequence starts, viz. ''r''(4,2) → ''r''(2,4) → ''r''(4,2) → ''r''(2,4) → ..., which is infinitely long. This leads to the idea of rewriting "modulo commutativity" where a term is in normal form if no rules but commutativity apply. The system (pictured) is an example of a weakly normalizing but not strongly normalizing system. ''a'' and ''d'' are normal forms, and ''b'' and ''c'' can be reduced to ''a'' or ''d'', but the infinite reduction ''b'' → ''c'' → ''b'' → ''c'' → ... means that neither ''b'' nor ''c'' is strongly normalizing.


Untyped lambda calculus

The pure untyped lambda calculus does not satisfy the strong normalization property, and not even the weak normalization property. Consider the term \lambda x . x x x (application is left associative). It has the following rewrite rule: For any term t, : (\mathbf x . x x x) t \rightarrow t t t But consider what happens when we apply \lambda x . x x x to itself: : \begin (\mathbf x . x x x) (\lambda x . x x x) & \rightarrow (\mathbf x . x x x) (\lambda x . x x x) (\lambda x . x x x) \\ & \rightarrow (\mathbf x . x x x) (\lambda x . x x x) (\lambda x . x x x) (\lambda x . x x x) \\ & \rightarrow (\mathbf x . x x x) (\lambda x . x x x) (\lambda x . x x x) (\lambda x . x x x) (\lambda x . x x x) \\ & \rightarrow \ \cdots\, \end Therefore the term (\lambda x . x x x) (\lambda x . x x x) is not strongly normalizing. And this is the only reduction sequence, hence it is not weakly normalizing either.


Typed lambda calculus

Various systems of
typed lambda calculus A typed lambda calculus is a typed formalism that uses the lambda-symbol (\lambda) to denote anonymous function abstraction. In this context, types are usually objects of a syntactic nature that are assigned to lambda terms; the exact nature of a ...
including the
simply typed lambda calculus The simply typed lambda calculus (\lambda^\to), a form of type theory, is a typed interpretation of the lambda calculus with only one type constructor (\to) that builds function types. It is the canonical and simplest example of a typed lambda c ...
,
Jean-Yves Girard Jean-Yves Girard (; born 1947) is a French logician working in proof theory. He is the research director (emeritus) at the mathematical institute of the University of Aix-Marseille, at Luminy. Biography Jean-Yves Girard is an alumnus of the ...
's
System F System F (also polymorphic lambda calculus or second-order lambda calculus) is a typed lambda calculus that introduces, to simply typed lambda calculus, a mechanism of universal quantification over types. System F formalizes parametric polymorph ...
, and Thierry Coquand's
calculus of constructions In mathematical logic and computer science, the calculus of constructions (CoC) is a type theory created by Thierry Coquand. It can serve as both a typed programming language and as constructive foundation for mathematics. For this second reason, ...
are strongly normalizing. A lambda calculus system with the normalization property can be viewed as a programming language with the property that every program terminates. Although this is a very useful property, it has a drawback: a programming language with the normalization property cannot be
Turing complete Alan Mathison Turing (; 23 June 1912 – 7 June 1954) was an English mathematician, computer scientist, logician, cryptanalyst, philosopher, and theoretical biologist. Turing was highly influential in the development of theoretical co ...
, otherwise one could solve the halting problem by seeing if the program type-checks. That means that there are computable functions that cannot be defined in the simply typed lambda calculus (and similarly there are computable functions that cannot be computed in the
calculus of constructions In mathematical logic and computer science, the calculus of constructions (CoC) is a type theory created by Thierry Coquand. It can serve as both a typed programming language and as constructive foundation for mathematics. For this second reason, ...
or
System F System F (also polymorphic lambda calculus or second-order lambda calculus) is a typed lambda calculus that introduces, to simply typed lambda calculus, a mechanism of universal quantification over types. System F formalizes parametric polymorph ...
), for example a
self-interpreter In computer science, an interpreter is a computer program that directly execution (computers), executes instructions written in a Programming language, programming or scripting language, without requiring them previously to have been Compiler, co ...
.


See also

*
Canonical form In mathematics and computer science, a canonical, normal, or standard form of a mathematical object is a standard way of presenting that object as a mathematical expression. Often, it is one which provides the simplest representation of an ...
*
Typed lambda calculus A typed lambda calculus is a typed formalism that uses the lambda-symbol (\lambda) to denote anonymous function abstraction. In this context, types are usually objects of a syntactic nature that are assigned to lambda terms; the exact nature of a ...
* Rewriting *
Total functional programming Total functional programming (also known as strong functional programming, to be contrasted with ordinary, or ''weak'' functional programming) is a programming paradigm that restricts the range of programs to those that are provably terminating. ...
*
Barendregt–Geuvers–Klop conjecture __NOTOC__ In the branches of mathematical logic known as proof theory and type theory, a pure type system (PTS), previously known as a generalized type system (GTS), is a form of typed lambda calculus that allows an arbitrary number of sorts and d ...
*
Newman's lemma In mathematics, in the theory of rewriting systems, Newman's lemma, also commonly called the diamond lemma, states that a terminating (or strongly normalizing) abstract rewriting system (ARS), that is, one in which there are no infinite reduction s ...
*
Normalization by evaluation In programming language semantics, normalisation by evaluation (NBE) is a style of obtaining the normal form of terms in the λ-calculus by appealing to their denotational semantics. A term is first ''interpreted'' into a denotational model of th ...


Notes


References

{{DEFAULTSORT:Normal Form (Term Rewriting) Computability theory Formal languages Rewriting systems Lambda calculus Logic in computer science