A Post canonical system, as created by Emil Post, is a string-manipulation system that starts with finitely-many strings and repeatedly transforms them by applying a finite set j of specified rules of a certain form, thus generating a formal language. Today they are mainly of historical relevance because every Post canonical system can be reduced to a string rewriting system, which is a simpler formulation. Both formalisms are Turing complete.
Definition
A Post canonical system is a triplet, where
A is a finite alphabet, and finite strings on A are called words.
I is a finite set of initial words.
R is a finite set of string-transforming rules, each rule being of the following form:
where each and is a specified fixedword, and each $ and $' is a variable standing for an arbitrary word. The strings before and after the arrow in a production rule are called the rule's antecedents and consequent, respectively. It is required that each $' in the consequent be one of the $s in the antecedents of that rule, and that each antecedent and consequent contain at least one variable. In many contexts, each production rule has only one antecedent, thus taking the simpler form The formal language generated by a Post canonical system is the set whose elements are the initial words together with all words obtainable from them by repeated application of the production rules. Such sets are recursively enumerable languages and every recursively enumerable language is the restriction of some such set to a sub-alphabet of A.
Example (well-formed bracket expressions)
Alphabet: Initial word: Production rules: $ → $ → $$ $1$2 → $1$2 Derivation of a few words in the language of well-formed bracket expressions: initial word by ][[ by ...
A string rewriting system is a special type of Post canonical system with a single initial word, and the productions are each of the form That is, each production rule is a simple substitution rule, often written in the form g → h. It has been proved that any Post canonical system is reducible to such a substitution system, which, as a formal grammar, is also called a phrase-structure grammar, or a type-0 grammar in the Chomsky hierarchy.