Manuscript Offprint
arXiv:2609.11385Beyond the Turing threshold: Productive grammars generate essentially undecidable languages
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
Abstract
Emil Post’s productive sets are not even semi-computable, let alone computable, being thus essentially incomputable. Accordingly, formal languages whose set of words is a (completely) productive set are essentially undecidable. In this article, I elaborate on Post productivity from the viewpoint of formal language theory: I design formal grammars that emulate the construction of productive sets of natural numbers and are thus beyond Turing-decidability.
1 Introduction
A core construct in formal language theory is the (extended) Chomsky hierarchy: It distinguishes formal languages into Turing-decidable and only Turing-recognizable, leaving us essentially ignorant with respect to the uncountably infinitely many languages that are beyond the grasp of the Turing machine (see Fig. 1), which since Turing (1936) remains—and is bound to remain—as the decider of what is or is not computable in the mathematical universe of functions, sets, and relations. This result is well-known in the literature as the Church-Turing Thesis.
Regardless of whether one's philosophy of mathematics favors construction over discovery or vice-versa, productive sets must be taken under the viewpoint of set construction. These infinite sets, originally constructed in Post (1944), are incomputable; in fact, they are not even semi-computable, being thus essentially incomputable. Thus, one naturally wonders what generation or construction processes yield such sets. If we consider them—as I shall do here—from the viewpoint
Published as a working paper under the same title in of Formal Languages, 2, 35-65; submitted for standard publication in September 2026.
A rather intuitive formulation of this thesis is as follows: A function that is effectively calculable is a function that can be computed by a Turing machine. This formulation goes beyond Church’s Thesis, which merely states that any effectively calculable function is so if and only (abbr.: iff) if it is recursive. Tellingly, the so-far purely hypothetical range of computations beyond the limitations imposed by the Turing machine is called super-computation.

Figure 1: The Chomsky hierarchy and beyond. (Source: Augusto, 2021.)
of the Chomsky hierarchy of formal languages, then productive word sets are wholly outside it, i.e. they are not Turing-recognizable, let alone -decidable, and thus justify our focusing on them for providing an adequate framework to study essentially undecidable languages. From this viewpoint, one might wish to find answers to questions such as: What kind of formal system(s) generate(s) such languages? Is there a class of formal grammars that can be associated with them? I address these questions in this paper. The aim of this study is thus to reduce our ignorance with respect to the uncountably infinitely many languages that are not amenable to the recognition or decision powers of the Turing machine. More specifically, I shall show that productive grammars, outside the Chomsky hierarchy and its extensions, generate productive languages, i.e. sets of words that behave like productive sets of natural numbers.
Except for Dekker (1955), productive sets are typically studied as the complements of creative sets, and thus the literature on these sets is rather scarce. In effect, creativeness is seen as the one property that “is shared by all the naturally arising unsolvable problems discovered by Church, Turing, and others in the 1930s and after” (Cooper, 2004), but there are uncountably many productive sets without a creative set as their complement, which allows for research on them independently from the larger research on creative sets. Here, I am interested in productive sets per se, namely inasmuch as they provide the adequate framework to approach the questions specified above. I draw mostly on Post (1944) and Dekker (1955), with the odd bits from standard monographs or textbooks, to wit, Cutland (1980), Rogers (1967), Smullyan (1993), and Soare (2016).
The present article is developed within two subjects that are more often than not conflated, to wit, recursiveness and computability. Computability theory is frequently just the name given to recursion theory when we are more interested in practical computing than in the associated mathematical formalisms and structures, but in fact the two are not necessarily one and the same subject. Take the concepts computable and recursive all too often seen as synonymous to characterize a set. This synonymy is however not complete. When defining a computable set in the
See Table 1 for the nomenclature used in Figure 1.
context of computability theory, we might—and perhaps ought to—take physical resources into consideration.
Example 1. Consider the following set:
We ask whether is computable. Given a polynomial over such as , we ask if . In other words, we want to know if . There is indeed an algorithm to test for this decision problem: We evaluate for the values one at a time successively; if for some it is the case that , then (cf. Def. 6 below). Nevertheless, we have no guarantee that this algorithm will ever terminate: It will only eventually terminate if indeed ; otherwise, it is obvious that it will run forever, because is an infinite set. Thus, is in fact incomputable, though it is semi-computable.
The physical resource at play in this example is time, but we could consider space instead. When in recursion theory we say that a set is recursively enumerable—seen as a synonym for semi-computable—but not recursive, we say basically the same thing, but we prove it by either showing that there is a recursively enumerable (abbr.: r.e.) set A whose complement is not r.e. or by diagonalization, it being the case that in either case a contradiction is reached; the example given is almost always the set , and as it will be seen below finite time, or any other physical resource or constraint, plays no role whatsoever in the proof.
It seems to me thus that this disparity in perspective is more than a simple nuance; it shows that Church's concept of effective calculability is taken with fundamentally different meanings in the two subjects. More specifically, this concept, originally given in Church (1936), is taken in a practical sense in computability theory and rather intuitively in recursion theory, it being the case that mathematical intuition entails here the notion of induction, as argued in Soare (1996, 1999). Importantly, a function need not be recursive to be computable, as the zero function and the projection function show (cf. Def. 3 below). In any case, I shall use the terms computable and recursive differentially: I shall reserve the latter for functions and the former for sets. To these two terms I shall add a third, to wit, decidable to characterize word sets that are computable. In Section 3, I duly justify this addition to a terminology that often requires clarification of its synonyms, precisely because recursion, computability, and decidability are concepts that have emerged and undergone nuanced developments in three subjects that largely overlap.
2.1 Some Remarks on Functions and Sets from the Viewpoint of Recursion Theory
2.1.1 2.1.1. Recursiveness and computability
I begin by recalling some core concepts of recursion theory on functions and sets.
To be sure, the proofs by the Complementation Theorem or by diagonalization assume (often implicitly) Church’s Thesis, i.e. a method of effective calculability such as a Turing machine, which in turn assumes an algorithmic procedure. But the onus of the proofs in recursion theory does not fall on the inefficiency of any such procedure, as in Example 1: They show instead by reductio ad absurdum that there cannot be any algorithm that computes K.
Definition 2. Let , be the set of the natural numbers. is a well-ordered set, as every subset of has a least element. An n-ary function over s.t. is said to be total if it is defined for every element in its domain, denoted by , and partial if it is defined only for a subset of its domain. The range of is here denoted by .
A function that is partial is denoted by . I shall consider indifferently or . As usually, I write to denote that the (partial) function is defined for all the in , and otherwise. Instead of the subscript “” (or “”) we write “”, the index of (or ), i.e. the Gödel number of a given program s.t. computes (respectively ). (In this article, will be employed to identify an arbitrary program, and thus no actual computation of a Gödel number will be carried out.) Indices other than will also occur, as any number is an index of a (partial) function if .
Definition 3. A function is said to be primitive recursive if it can be generated from the functions , , and —known as zero function, successor function, and projection function, respectively—by zero or more applications of the following schemata known as the composition or substitution schema (1) and the primitive recursive schema (2):
(1)
If
(3)
known as minimalization schema and where R is a relation symbol, is also applied then the function obtained is partial recursive.
Definition 4. (Church, 1936) A function f is recursive iff it is total and effectively calculable; it is partial recursive (p.r.) iff it is effectively calculable.
The following example introduces two functions that, albeit elementary, will play a major role in the elaboration below on productive sets.
Example 5. The functions , known as the identity function, and , known as the diagonal function, are recursive. In effect, is the successor function in Definition 3, and it is obviously total; is called diagonal function because it is applied only on the elements in the diagonal of an infinite table or matrix A s.t. we have
Recall that is the cardinality of a countably infinite set, i.e. a set whose elements can be put in a 1-1 correspondence with N.
Enumerations will start with 0 or 1, according to convenience.
for every element of a given set . The diagonal function will be denoted by . Then, we have s.t. for every s.t. is , because . The identity function, denoted by and which is also obviously total, is the special case of schema (2) when , i.e. . (Alternatively, we can see the identity function as the projection function .) The relationship between these two functions is that, as given by , the diagonal function is never the identity on ; hence, set is incomputable, as there is no effective method to enumerate the rows of .
Definition 4 is actually Church’s Thesis; in this, effective calculability is associated with an algorithmic procedure, i.e. a function f is effectively calculable iff there is an algorithm that outputs a value given a certain input value. (Note that an algorithm has only a finite number of instructions that are applied in a finite number of steps.)
Definition 6. Let there be given a set . is computable if the characteristic function of with respect to is effectively calculable:
A is semi-computable if the semi-characteristic function of x with respect to A is effectively calculable:
Thus, if is computable, then there is an effective method that calculates whether or for all , denotes the complement set of . If there is an effective method to calculate , but no such method to calculate , then is said to be semi-computable.
Remark 7. As anticipated in the Introduction, I am henceforth writing computable (instead of recursive) and semi-computable (instead of recursively enumerable) for a set A whenever there is an effective method—i.e. an algorithm—to calculate the (semi-)characteristic function for A. I leave the above terminology for functions unchanged, because no function is computable (i.e. effectively calculable) if it is not a primitive recursive function or a composition of primitive recursive functions.
Definition 8. A set A that satisfies the condition
for all and a p.r. (unary) function, is called an index set.
Remark 9. The reader should keep in mind the case when , where is the identity function. Clearly, if and is an index set, then .
Theorem 10. (Rice’s theorem) The problem is undecidable if or .
Intuitively put, Rice’s theorem formulates the result that the only computable index sets are and . These two index sets are said to be trivial, because contains no index of any p.r. function and contains all its indices. The meaning of this result is that any non-trivial property of p.r. functions is undecidable, a term that will be properly defined below; because the set of all p.r.
(unary) functions is semi-computable this means that every non-trivial property of semi-computable sets is undecidable.
The following definitions and results draw on Post (1944). Effective calculability and enumeration are tightly associated and indeed we have:
Definition 11. A set is semi-computable if its members can be enumerated as
or, equivalently,
where f is recursive and e is the index for A.
Recall that “semi-computable” is taken here as a synonym for “recursively enumerable” when speaking of sets; this explains why “computably enumerable,” a term also often found in the literature, is a synonym for “semi-computable.” The fact that a set A is semi-computable does not mean that it is computable.
Example 12. Let us consider the set , known as Gödel's diagonal set, and called in Post (1944) the complete set, because every semi-computable set is computable in . is semi-computable. In effect, is the domain of the p.r. function
which is effectively calculable by applying an algorithm—say, a program —to input . But is incomputable. If had an effectively calculable characteristic function, then the following function would be effectively calculable:
Then, for every , which shows that cannot be recursive. Indeed, let ; then, we have , and , which is impossible. Hence, is semi-computable but incomputable.
Besides by a diagonalization argument, as in Example 12, we can show that a semi-computable set fails to be computable by Post's Complementation Theorem.
Theorem 13. (Complementation Theorem) A semi-computable set is computable iff its complement is also semi-computable
Proof. ( ) If , then put in . Otherwise, put in . Hence, both and are semi-computable.
(⇔) Let be semi-computable sets s.t. and . Given some , generate successively comparing with . Obviously, the end result of our generation and comparison must be that either or , so in a finite number of steps we shall find the or the that is identical with . This is thus an effective method to determine the membership of any to either or . Hence, is computable.
The concept of generated set introduced in the -direction of Post's proof of Theorem 13 will play an important role in this work. We have the following important result (which here is a Proposition, but is just part of the main text of Post's paper):
Proposition 14. Every generated set of positive integers is semi-computable.
Proof. This can be restated in two statements, to wit, (a) every generated set is effectively calculable, and (b) every effectively calculable set of positive integers is semi-computable. With respect to (a), “effectively calculable” just means the same as “effectively enumerable,” i.e. all one need have is an effective process to enumerate elements into a set as belonging to it; any recursive function f will be such a process. We have then the set , which is semi-computable by Def. 5, and we are done with (b).
With respect to the set of the proof above, we have the following remark:
Remark 15. The set , is finite, is computable. The set is computable iff it admits of a recursive enumeration in order of magnitude, and non-computable otherwise. In other words, every finite set is computable, and an infinite semi-computable set is computable iff it is the range of an increasing function . Importantly, this also tells us that semi-computable sets that are incomputable are always infinite.
Theorem 16. Every infinite semi-computable set A contains an infinite computable subset .
Proof. Generate in order the elements of the recursive enumeration of an infinite set and let . As for , let , i.e. the first greater than , and so on successively; because is a recursive enumeration we are assured that for every there is an later in s.t. . We thus generate the set without repetitions in order of magnitude. Clearly, is a subset of that is infinite and computable.
Theorem 17. There is a semi-computable set A of positive integers that is incomputable.
Proof. By Post’s Complementation Theorem, is not semi-computable. We show this by the diagonalization method. Let . “s.c.” abbreviates “semi-computable”, be a set of generated elements; then, is semi-computable by Proposition 14. More precisely, is the set of all the semi-computable sets. A positive integer thus is, or is not, in according as it is, or is not, in the -th set . So, if is not in , then it must be in ; but then it is not in the -th semi-computable set in , and differs from each semi-computable in the presence or absence of at least one positive integer. Hence, is not semi-computable. Now, make , and QED.
Example 18. The set is semi-computable but incomputable. This was shown in Example 12 by an application of diagonalization (i.e. by employing the diagonal function). This also means that is not semi-computable. Assume otherwise that is also semi-computable. Then, for some we must have , thus giving
We get a contradiction when making , so we conclude that is not semi-computable.
Recall that a function over is increasing, or order-preserving, if whenever for .
Corollary 19. An incomputable set that is not semi-computable is essentially incomputable.
Proof. (Informal) Example 18 above shows that the attempt to compute leads to a contradiction. In effect, note the paradoxical character of , kindred with Russell's paradox: As it is possible to have , then we have . Hence, is essentially incomputable.
2.1.2 2.1.2. Infinite sets
Above, a few references, explicit or implicit, were made with respect to infinite sets. Infinity plays a central role in this work, namely in relation to the following result, which is directly connected with the proof of Corollary 19 immediately above:
Proposition 20. Every incomputable set is always infinite.
For the present study, it suffices to grasp the concept of natural order, i.e. the well-ordering of the natural numbers, denoted by the symbol “<”. I assume that the reader is acquainted with the principle of induction. With this principle in hand, one way to define infinity mathematically is by the following statement that elaborates formally on the fact that there exists an infinite set:
Infinity Axiom: There exists at least a set s.t. (i) , and (ii) if , then also . Formally:
Definition 21. Let I be a set. We say that I is an inductive set, and we write , iff I is a witness to the Infinity Axiom, i.e.:
We can then account constructively for the existence of the set N in the following way:
Proposition 22. There is a unique set s.t. for every inductive set .
Proof. (Sketch) Starting from (1) is an inductive set, and (2) for , we let
and
we show that (a) is an inductive set, (b) for every we have , and (c) if is an inductive set and for every inductive set we have , then .
More intuitively, if we let in the sense that the set represents the natural number , then
This can be expressed in the intuitive principle that each natural number n should have n elements. Then, by applying induction we have
This is one of the seven axioms of the axiomatization of set theory known as Zermelo-Fraenkel set theory with the Choice Axiom (ZFC for short). See Augusto (2020) for a brief discussion and references to the standard literature.
for every , and is the smallest inductive set in the sense that
The formulation above of the Infinity Axiom implies that , and if additionally we know that , then we can formulate it as the induction property of :
Remark 23. It is now obvious that we can rephrase the Infinity Axiom as: There exists a reflexive set. In effect, if we consider as a first element, we have the set
where the notion of ordering is evident: We have
s.t. is the successor of , etc. Denoting this relationship by for , we have:
Let us now start with the first element ; then we have
By correlating every with , we obtain a one-to-one mapping of onto a proper subset of .
There are three notations used to denote infinity, to wit, , , and N. They are not equivalent in the present work, though. As mentioned above, we have typically
but we prefer to settle things so that N denotes the infinite set of natural numbers and
i.e. denotes the cardinality of N, also often denoted by , without regard to order.
Remark 24. But the two notations and may coincide in the notion of tending to infinity. Recall that an infinite sequence is defined as
where denotes the -th term of infinitely many terms belonging to or . Let now be the identity function , i.e. , , ...; then we have
where and just is the conventional notation of mathematical analysis, but because we may write instead . In particular, if we consider as a superscript times
s.t. the n-th term coincides with the n-th potency in a sequence s.t. , then we have for an unbounded sequential function :
Example 25. Let and s.t. . Then, , , ..., , and
Note that provides us with a means to represent finitely the infinite string 011011011... corresponding to

a rather cumbersome representation. That is to say that we employ the notation to denote an infinite sequence ordered by (or any infinite subset of ); in effect, is the standard symbol for the first infinite ordinal. Thus, I shall employ the notation also for infinite cardinality if an infinite sequence is implied.
Remark 26. One way to explain intuitively the difference between the two notations for infinity, and , is as follows: Let there be given some infinite set ; if we look upon this set statically as a constructed set, then we write , but if our view on it is dynamic, in the sense that we are interested in how it is constructed, i.e. how its elements get to belong to it one by one, or sequentially, then we write . An important aspect of this dynamic viewpoint on infinity is that at any one time of this construction we can stop and see the obtained objects (e.g., strings of
The natural numbers less than are also called finite ordinals, because a set is said to be finite if there is a one-to-one mapping of onto some . By starting with , , ..., and using the operation we reach the next ordinal after all the ordinal numbers, i.e. . Thus, is the first infinite ordinal. By applying now the operation , we obtain the infinite sequence of ordinals , , , ..., which in turn is followed by infinitely more infinite ordinals , , ..., etc.
symbols) as constituting a finite set. Take for example the number ; we denote the infinite character of its decimal expansion by , but we write to denote that there are infinitely many 5's in the decimal expansion of , the first 5 in the 4th decimal position, etc. We can thus call these two perspectives respectively static infinity and dynamic infinity.
2.2 Productive Sets
Recall now from Rice’s theorem (cf. Theorem 10) that the set of the natural numbers N, just like , is a trivial index set. Above, N was approached dynamically, i.e. it was shown how each natural number iff for , i.e. there is a recursive function s.t. . It follows that N is effectively enumerable; in fact, N is computable, as for every s.t. , . In effect, let , , , ..., and apply the identity function to , which is obviously order-preserving, as for . We then have:
so that we have:
What happens now if we construct a set, say , that is obviously inductive but s.t. for every it is the case that , i.e. there is a number in not in ? We then have and for , and is incomputable, though it is inductive; in particular, clearly has an infinite semi-computable subset . Such a set is said to be productive, and its relationship with Rice's theorem can be formulated as follows: If or , then is either productive or the complement of a productive set. This result is directly mirrored in complexity theory in the following way: The productive sets, as well as their (semi-computable) complements, constitute essentially undecidable problems. In effect, productive sets are constructed in analogy with the well-known diagonal method to prove the incomputability of the interval ; in other words, there is no effective method (e.g., a Turing machine) to enumerate the elements of a productive set. Hence, and paradigmatically, the complete theory of the natural numbers is productive and the system of Peano arithmetic is creative.
These correspond to the sets
Definition 27. A set is called productive if there is a recursive function s.t. for any ,
We say that is a productive function for A and A is productive relative to .
Remark 28. This definition entails that we have
where denotes “greater than by (at least) one element”, i.e. no semi-computable subset of A is A, or, equivalently, there is always one element n in A that does not belong to any of its subsets . Clearly, we have (cf. Remark 26).
These results will be formally proven below.
Definition 29. A set of positive integers whose complement is a productive set is called co-productive. A productive function for is a co-productive function for .
Example 30. The prototypical example of a productive set is ; thus is a co-productive set with respect to (cf. Example 18). The productive function for (the co-productive function for ) is the identity function . Examples of other productive sets, where “other” is to be taken in the sense that is the prototypical productive set, are:
This example shows that for a productive set we can effectively find a natural number that is in but not in . Such a number is called a witness (that ). Importantly, Remark 26 also entails the following results:
Lemma 31. For a recursive function, there is a recursive function s.t. for every we have
and the set A s.t. is productive relative to .
Proof. Define
and
where is first-order predicate language with identity, denotes the axiomatization of Peano arithmetic, and is the Gödel number of . See Augusto (2020) for the symbol “ ”, which denotes logical consequence.
“Prototypical,” in turn, is taken in the sense of , where “ ” denotes (Turing-)reducibility. Note that (as well as ) is an index set (cf. Def. 8). In effect, for two index sets and we have the result: If is productive and , then is productive. The reader is referred to any of the cited texts on computability for elaborations on reducibility. Interestingly, in the case of the sets Tot and Fin, we have both and , and also both and .
Then, we have
Let now ; it is readily seen that is productive relative to .
Theorem 32. If is productive, then has an infinite semi-computable subset.
Proof. Let be productive with productive function abbreviates the index , and let . Because is productive, we have . Obtain now s.t. , then an element s.t. , etc. The set is a generated set, and hence it is semi-computable by Proposition 14, but , so for every natural number . Hence, the set is an infinite semi-computable set.
The above results allow us to redefine a productive set in the following way:
Definition 33. A set is productive iff there is a recursive function s.t. for all ,
Corollary 34. If is productive, then is not semi-computable.
Proof. If were semi-computable, there could be no positive integer in not in the semi-computable subset . But where , and consequently is not semi-computable. In effect, we would have it that there would be a natural number , an absurdity.
Definition 35. A set is completely productive (c.p.) if there is a recursive function s.t. for every we have
or equivalently
The function is said to be a c.p. function of A and A is said to be c.p. relative to .
Example 36. is c.p. with as c.p. function. In effect, by the definition of the set , and .
Proposition 37. Every c.p. set A is productive.
Proof. implies that .
(It is not known whether there is a productive set that is not c.p.)
Remark 38. Obviously, , and so again we have , and is a witness for the fact that is c.p.
Definition 39. Let be a productive set and an effective procedure to find for every semi-computable subset of a witness to the fact that . The set of all witnesses of , called the productive center of with respect to , is denoted by .
Clearly, .
Definition 40. Let be productive relative to . Then, the set is called the productive center of relative to . The subset of is called a productive center of if for some productive function of .
Proposition 41. If is a productive center of the productive set , there is a productive center of s.t. and .
Proof. Let be a productive function for s.t. we have . Let now for a recursive function s.t. , where . Let now . Then, it is easy to see that is a productive function of and . Hence, is an infinite semi-computable subset of and .
The following statements are left without proof. The objective is to give an idea of the infinite productivity of productive sets.
Corollary 42. Every productive set A has a productive center s.t. .
Theorem 43. Every productive set has exactly countably many productive centers and exactly countably many productive functions.
Theorem 44. Let be productive relative to and let . Then, is productive relative to and .
Corollary 45. If A is productive relative to , then is also productive relative to .
Corollary 46. Every productive set induces exactly k productive sets.
3 Productive Grammars and Essentially Undecidable Languages
3.1 Review of terminology and notation
In this Section, I recall the basic aspects of formal language theory that are relevant for the main subject of this paper. For convenience, I divide it into two smaller Sections, one recalling the core aspects of formal language theory and another reviewing Turing-decidability.
The proofs can be found in Dekker (1955).
3.1.1 3.1.1. Basics of formal language theory
Definition 47. Let be a set of symbols (also: letters) called an alphabet. If precedes , etc. up to , a property denoted by , then is said to be in lexicographic order. A word over the set is a finite sequential factorization
, of symbols over s.t. is the length of , a property denoted by . The intervals , , and of a word are called subwords, respectively.
-
The substring is called a (word) prefix.
-
The substring is called a (word) suffix.
-
The substring is called a (word) infix.
Examples of alphabets in lexicographic order are the Roman alphabet or subsets thereof and the alphabet . From the above definition, we have it that every prefix and every suffix is an infix. By comparison to , the above subwords are said to be a proper suffix, a proper prefix, and a proper infix, respectively, as any word can be seen as a suffix, a prefix, or an infix of itself. We denote an arbitrary (sub)word over an alphabet by the final letters of the Roman alphabet .
Definition 48. A word language L over is a set of words w over .
Henceforth, I write only “language(s),” as I do not discuss any formal languages other than word languages.
Definition 49. A word s.t. is called the empty word, denoted by (or ). Then, denotes the set of all words, including the empty word, over . A language over just is a subset of , i.e. (and any subset of , including , is a language). More formally, we define a language intensionally as:
This definition gives us the complement of a language L as:
If a language over does not include the empty word, then we write , i.e. . Note that , where denotes the length of the words that are elements of . As , we have .
Example 50. Consider the language . This extensional definition corresponds to the intensional definition:
The complement of this language is constituted by words like , , for , etc.
Note in the above definition that denotes that the words built over the alphabet are of length for ; this is simply a specification of . It should be obvious that if , then , but if , then is infinite, and because formal languages over just are subsets of , they are in infinite number, too. However, a language over an alphabet can be finite or infinite.
Example 51. The languages , , and (where Hamlet denotes the set of all the words in Shakespeare's play identically entitled) are finite. The language of Example 50 above is infinite.
A language can also be infinite if its words are infinite words. This requires a disambiguation of the expression “infinite language.”
Definition 52. Let denote the infinite iteration of the -th letters of the finite word over an alphabet . Then, , where , is called a periodic -word and is a periodic -language. A periodic -word s.t. is a suffix is called an ultimately periodic -word.
Example 53. Given , any word in which there are infinitely many iterations of (e.g., , , , , ) is an infinite word over and thus constitutes a language . For instance, the language is an -language, namely an ultimately periodic -language. In effect, we have:
I shall abbreviate “(ultimately) periodic -word” and “(ultimately) periodic -language” as, respectively, “ -word” and “ -language.” The disambiguation between an infinite language and an -language, respectively denoted by and , consists formally in the following result, which requires the specification :
Proposition 54. For and languages of finite and infinite words, respectively, we have
Proof. (Informal) For , we have , but . Clearly, . We now apply induction on : It is obvious that whenever , and again we have .
Let us now restrict the discussion to the case when, for a word s.t. where , we have
i.e. when the j-th letters of a word w correspond to a (proper) prefix thereof.
Definition 55. The prefix factorization of a word s.t. consists of prefixes s.t. , , etc., up to . Then, the prefix closure of is defined as:
s.t.
Note that , a fact to take into consideration for a language over , as we then have
for ; then, is factorized into prefixes and the closure of the word s.t. is given by .
Definition 56. A language is said to be prefix-closed, denoted by , if we have the (possibly infinite) union
for every .
Remark 57. Clearly, the language is prefix-closed, as we have , but is not prefix-closed, as we have .
Example 58. For instance, for the language over the prefix closure of is the set:
In effect, we have for the word ,
and .
The -languages can also be prefix-closed. Below, in Remark 68, I account formally for this anti-intuitive result.
Example 59. The prefix-closure of the word is . For the word , we have the prefix-closure , i.e. .
Languages are generated by formal grammars, in the sense that upon the application of syntactic rules on strings over a given alphabet words are derived that belong to a specific language or . I next provide the definitions of these core terms.
Definition 60. A formal grammar is a 4-tuple , where is a set of variable symbols and is a set of terminal symbols, with , is the start symbol, and is a set of rewriting rules of the form
where “LHS” and “RHS” abbreviate “left-hand side” and “right-hand side,” respectively, denoting that string can be rewritten as string iff has at least one variable symbol.
Rewriting rules are also called production rules or productions; hence the P. In order to distinguish clearly between variables and terminals uppercase and lowercase letters, respectively, are used. The first production rule is always . The language generated by a formal grammar is denoted by .
Definition 61. A derivation of a word from is a finite sequence of steps each of which is the application of some production rule in :
\mathcal{D}_{w}=S\xrightarrow[{}_{r_{1}}]{1}\alpha_{1}\xrightarrow[{}_{r_{i}}]{2}\alpha_{2}\xrightarrow[{}_{r_{i}}]{3}\ldots\alpha_{n}\xrightarrow[{}_{r_{i}}]{n}wA derivation is said to be leftmost (rightmost), denoted by (respectively ), if at each step a production is applied to the leftmost (respectively rightmost) variable in . Accordingly, a grammar that generates leftmost (rightmost) derivations is called a left-derivation (right-derivation) grammar.
Definition 62. The sequence of the k rules of a leftmost grammar applied in n steps in a derivation is called a parse and is defined as
where , denotes that rule is the j-th rule applied for .
Every leftmost (rightmost) grammar can be converted into a rightmost (leftmost, respectively) grammar, but here I shall focus on leftmost grammars (henceforth just “grammars”). A parse is typically constructed by means of a tree where is the set of nodes, labeled by variables in the case of the root or the interior nodes and by the terminals in if they are leaves, and is the set of edges joining two nodes. Clearly, every derivation corresponds to a parse , and reciprocally. The above definition allows for the conception of an alphabet as , as we have for a given string , but we have . That is to say that no string is a word if it contains at least one variable; this, in turn, entails that no LHS of a production rule may consist entirely of terminal symbols. This defines a Chomsky grammar if (i) is finite and (ii) is associated with a machine model s.t. in the sense that is recognized by , where by “recognition” it is understood that can completely process an input word one symbol at a time halting then in an accepting state. Table 1 provides all the information on Chomsky grammars required in this work. Note that this table schematizes more precisely the extended Chomsky hierarchy, i.e. the hierarchy of the languages generated by the four grammar types 0 through 3, known as Chomsky grammars, extended by the recursive languages, for which no grammar is (yet) known (cf. Fig. 1; see Table 1 for the nomenclature). Note the following result about the Chomsky hierarchy:
Proposition 63. The Chomsky hierarchy is a proper inclusion hierarchy:
Proof. Trivial. There are regular languages that are not context-free languages, there are context-free languages that are not context-sensitive languages, and there are context-sensitive languages that are not recursively enumerable languages.
Recall that a recursively enumerable set is a semi-computable set and a recursive set is a computable set. In the (extended) Chomsky hierarchy, the recursion-based nomenclature has been kept for languages, despite a move to differentiate the terminology of recursion theory and computability theory, as noted in the Introduction.
| Grammar | Language Class & Prototypical Language | Recognizers | |
|---|---|---|---|
| Type 0 Unrestricted | Recursively enumerable () | Turing machines (TMs) | |
| Recursive () | Total TMs (Deciders) | ||
| Type 1 Context-sensitive | Context-sensitive () | Linear-bounded automata | |
| Type 2 Context-free | Context-free () | Pushdown automata | |
| Type 3 Regular | Regular () | Finite-state automata |
Table 1: The extended Chomsky hierarchy. (Adapted from Augusto, 2021.)
Remark 64. We also have
if we consider the extended Chomsky hierarchy, which simply means what we call recursively enumerable languages are word sets whose complements are not recursively enumerable, i.e. semi-computable.
I can now define a language more precisely as follows:
Definition 65. Let be a formal grammar. The language generated by is defined as
where “” denotes a derivation step s.t. we have for the string in derivation steps, and “*” (Kleene star) denotes the reflexive and transitive closure of the relation .
This definition applies directly to the Chomsky languages.
Example 66. Consider the formal grammar with
This is a Type-1 Chomsky grammar. The language generated by this formal grammar is:
The derivation of the word is:
The parse of this word is constructed by means of a tree as displayed in Figure 2.
This language is prefix-closed: For example, for the word aaab we have the prefix closure:
Note that , but it is a proper prefix of .

Figure 2: Parse tree .
We can extend Definition 65 above to the -languages by specifying for
where G is an -grammar.
Definition 67. A formal grammar s.t. P contains at least one rule of the form
where , , and , is called an -grammar if .
Note that I abbreviated the rules by using “|”; in fact, there are five rules in this grammar, but its simplicity allows for this abbreviation.
The notation denotes that one (at least) or more variables in V is/are infinitely iterated. Let it be the case that the RHS of a rule is and we have ; then, we have the partial derivation
where is an -word, but denotes an infinite sequence of s.
Remark 68. The rule is thus a continuous mapping that is in fact an extension of an unbounded sequential function . In effect, consider that for , denoting that a subword is iterated times, we have . This allows for the prefix closure of an -language, inasmuch as we have for a given -word ,
where , and but extensionally finitely representable.
Example 69. Consider the -language . The -grammar where
generates this language. As seen above in Example 59, this -language is prefix-closed. A derivation of is:
S\xrightarrow[r_{1}]{}AB^{\omega}\xrightarrow[r_{2}]{}aB^{\omega}\xrightarrow[r_{3}]{}abB^{\omega}\xrightarrow[i]{}ab^{i+1}B^{\omega}\xrightarrow[\substack{r_{3}]{}ab^{\omega}}The parse tree is displayed in Figure 3, where the ellipsis denotes the infinite derivation .

Figure 3: Parse tree .
The fact that, as pointed out above in Remark 68, the set for an -word is extensionally finitely representable, allows for the recognition of -languages by finite automata. The class of
Of course, an -word can coincide with an infinite sequence, say, or ; in other words, an infinite sequence of terminal letters is any of a prefix, a suffix, or an infix. In the literature, -words are typically restricted to words of the form where and . See, e.g., Staiger (1997) for a formal discussion of these -languages.
recognizers for the -languages is the so-called -automata, of which the Büchi automata are the prima inter pares. See Staiger (1997) for the case of the ultimately periodic -languages, and Augusto (forthcoming) for the class of the -regular languages, a special subclass of these languages.
3.1.2 3.1.2. Turing-decidability for languages
Recall from the remark on Definition 62 above that every word derivation corresponds to a word parse , and reciprocally. However, it might not be easy to construct a parse tree for a given derivation. This is typically the case for the Type-0 Chomsky grammars.
Example 70. Consider the formal grammar with
This is a Type-0 Chomsky grammar. The language generated by this grammar is:
We can derive the word as follows:
The parse tree for this word is shown in Figure 4.

Figure 4: Parse tree .
Definition 71. Let be a language. The decision problem for , denoted by , consists in finding a Turing machine capable of answering the question , known as the membership problem. Then, is said to be Turing-decidable if there is a Turing machine that computes
s.t. we have the sets
where denotes an accepting state, and
where denotes a rejecting state.
Remark 72. This is to say that a Turing machine decides a language iff it halts on every input word , whether in an accepting or a rejecting state. If halts in an accepting state when for a given language , but fails to halt in a rejecting state whenever , then we say that is a semi-decidable language. If never halts on an input word , then s.t. is undecidable.
Recall Remark 64 above. We have the following result:
Theorem 73. Every Chomsky grammar of Types 3 through 1 generates decidable languages.
Proof. (Informal) In the extended Chomsky hierarchy, we have the strict inclusion relation:
Definition 74. Note that I am employing here a Turing machine as a 7-tuple where is a finite set of states, is the tape alphabet, is the blank-cell symbol, is the input alphabet, is the initial state, for is the set of halting states, and is the transition function with denoting left and right motion, respectively. A configuration for is a pair indicating that is in state ( for the initial configuration ) with the current tape string and reading the symbol . Configuration yields configuration in one step or move, written , iff the transition changes configuration to configuration , i.e. iff we have where , is the (new) symbol on the tape, and . A computation for is a finite sequence of configurations s.t. is the set of all the configurations of when computing a given input word .
For simplicity, unless otherwise stated a Turing machine is deterministic, i.e. for every and . Clearly, the Turing machine in the definition above effectively calculates the characteristic function (cf. Def. 6 above) if we make “1” stand for “ ” and “0” do so for “ .” In other words, a language is Turing-decidable iff the set is Turing-computable,
The decision problem is also known in the literature as the Entscheidungsproblem, because of its first formulation in German (for logical formulas) by the mathematician D. Hilbert. Cf. Hilbert & Ackermann (1928).
a property denoted by . An alternative formal way to formulate this is by the notion of enumeration, which was already discussed above, but before I address that subject let us agree—with Post (1944)—that “recursive” is the technical term corresponding to the more intuitive “effectively calculable” when speaking of functions. Turing (1936) precisely defined Church’s effective calculability as mechanical computability; in fact, he showed that all computable numbers are effectively calculable by means of the Turing machine. This, now known as Turing’s thesis, allows us to exchange the term “recursive” by the term “Turing-computable” in view of the short discussion in the Introduction, and because no function is computable if it is not computable by a Turing machine we shall henceforth satisfy ourselves with the abbreviation “computable.”
Lemma 75. No configuration of a Turing machine is a proper prefix of a configuration .
Proof. For every word w s.t. , we have
where every , , is a unique configuration of .
Definition 76. Let be a Turing machine with tapes, , s.t. the content on tape , , is a word w, denoting the word on the -th tape. (We may consider that every w is a word that has been accepted by so that is the language recognized by .) On every -th tape the content is w = , , with symbol at the leftmost cell of the tape and s.t. is immediately followed by an infinite number of empty cells. Let tape 1 of this Turing machine be a one-way write-only tape s.t. at the end of the computation the content of tape 1 is where all 's are different and denotes that is the -th word on the sequence. This enumerates . enumerates all the strings of in canonical order if shorter strings precede longer strings and strings of the same length are alphabetically ordered.
Clearly, a Turing machine enumerates a language in canonical order iff it computes , i.e. iff (a) for every word it computes and (b) in such a way that and where denotes the -th letter of the -th prefix of the -th word.
Theorem 77. For every language , is semi-Turing-decidable iff there is a Turing machine that enumerates , and is Turing-decidable iff there is a Turing machine that enumerates the elements of in canonical order.
Proof. (Informal) If simply enumerates , then is clearly a semi-computable set, but if enumerates in canonical order, then both and must be semi-computable by the Complementation Theorem (cf. Theorem 13).
Corollary 78. A language L is Turing-decidable iff it is a prefix-closed language .
Proof. (Informal) By Lemma 75, every Turing machine can compute for a given language . If a language is not prefix-closed, its words cannot be enumerated by a Turing machine in canonical order. In particular, for every word , there is a prefix s.t. computes , , but fails to compute s.t. .
The Turing machine is a wholly abstract machine; in effect, it is equipped with one or more infinite tapes. In practice, we work with parsers, also called syntax analyzers. An interesting aspect of parsers is that they emulate the workings of a Turing machine almost to perfection: Given some grammar G with alphabet , there might be input words in on which they do not stop. This means that a parser is as good a Turing machine as we can get an implementation thereof. For this reason, I henceforth write simply “decidable,” instead of “Turing-decidable” with respect to a language .
Example 79. Consider again the language generated by the grammar of Example 70 above. The parser implemented by the software jflap accepts all words in but it does not halt on any word in that does not belong to this language; more precisely, this parser is unable to construct the parse tree of any such word, entering into an infinite node generation. Hence, this Type-0 grammar generates a semi-decidable language.
3.2 Productive grammars and productive languages
As seen above, a set may be only semi-computable or even computable, the latter case depending on whether both and its complement are semi-computable sets. Languages are just sets of words; in the jargon of formal languages here adopted, a language is called decidable if its is a computable set and semi-decidable if it is only semi-computable. This terminology was set by employing Turing machines. In Section 2.2 above, it was shown that productive sets are incomputable. Then, if we construct languages that behave like productive sets, we have languages that are not only undecidable, but actually essentially undecidable languages; in this case, there is no Turing machine that can decide for each word , where is defined intensionally, whether is one of the words in .
Definition 80. Let be a grammar. If has at least one production rule on strings of letters that mimics a productive function on , called a productive rule, then is called a productive grammar. A language , where is a productive grammar, is called a productive language.
Example 81. Consider the grammar with:
The subscript “l” in rule on “→” prescribes that this rule is compulsorily a leftmost-derivation rule. We have , but it is evident that for any s.t. is a prefix. This is so because there is a single infinite derivation
s.t. is never applied and there is no terminal word . Clearly, no Turing machine can enumerate this language, let alone enumerate it in canonical order, as for every it is the case that , but halts neither in an accepting nor in a rejecting state. In effect, has no means to determine, for any , that is a proper prefix of . Thus, is essentially undecidable.
Note with respect to this language that, were a Chomsky grammar (of Type 1 or 0), we would have , because rule hinders the derivation of any string .
Theorem 82. Productive languages are outside the Chomsky hierarchy.
Proof. (Informal) The set in a Chomsky grammar is a set of production rules. Whenever there is a rule s.t. prevents the rightmost or leftmost derivation of a word, then we have . If in a grammar s.t. is a productive rule, then , and is a productive language.
A similar theorem can be stated for the -languages and the proof is based on the fact that no productive language has a rule of type specified in Definition 67 above. The distinction between Chomsky or -languages and productive languages falls thus on the productive rules. I next analyze formally these rules.
Definition 83. Let be a prefix of a word . Clearly, is a proper prefix of , and because is only one letter away from let us call it the terminal proper prefix of . For every , we define the function s.t. , i.e. sends the terminal proper prefix of to itself. I shall call the word terminating function.
Clearly, is total and it is an increasing function. Hence, is a recursive function even if . Then, the set
is computable even if its domain is infinite, and because L is a language, i.e. a word set, we say that L is decidable.
Example 84. Consider the language . We have
It is easy to see that a Turing machine can enumerate the words of in canonical order. We thus have and is a decidable language. This language could be generated by a regular grammar, but because we are interested in Turing-decidability let us construct a Type-0 grammar for it. This can be the grammar with:
It is also easy to see that is also semi-decidable, so the language generated by this grammar is actually decidable.
Definition 85. Let us now set , for a given language . If we now make
then is a productive function for L and L is a productive language.
In effect, is an infinite semi-computable set, but for any subset of . This means that is not a prefix-closed language, being thus an undecidable language. In the formalism of productive sets (cf. Section 2.2 above), we have the set , i.e. the productive center of relative to the productive function . Then we have
for a recursive function s.t. by defining
We can then apply the results constituted by Proposition 41 through Corollary 46 to a productive language L.
Consider again the language of Example 84, but now generated by the grammar of Example 81 above. It is easy to see that is undecidable, because for any word we have it that . But contains an infinite semi-computable subset:
Additionally, is semi-computable. Thus, G is a productive grammar and is the productive language generated by G.
4 Conclusions
In the Introduction to this article, I justified the study of productive languages by the need to reduce our ignorance with respect to the infinitely large class of undecidable languages. There are in effect infinitely many undecidable languages, and uncountably infinitely many for that matter, a fact that finds its theoretical support in the following results in recursion or computability theory.
Lemma 86. There are exactly countably infinitely many p.r. functions and there are exactly countably infinitely many recursive functions.
I now convert this result into the framework of Turing machines:
Theorem 87. Let M be the set of all Turing machines. Then, , i.e. there are countably infinitely many Turing machines.
Proof. (Informal) There are as many Turing machines as (partial) recursive functions.
Let us now denote an uncountable infinity by and remark that , a result that follows from Cantor's theorem, which equates with stating that the power set of is uncountable. Then, it follows that there are languages that are not Turing-recognizable—a result that I have proven above constructively via the productive languages. Formally, we have:
Corollary 88. There are uncountably infinitely many languages that are undecidable.
Proof. Let denote the class of all productive languages. I have shown above constructively that, alone for , we have already .
References
Augusto, L. M. (2020). Logical consequences. Theory and applications: An introduction. 2nd ed. London: College Publications.
Augusto, L. M. (2021). Languages, machines, and classical computation. 3rd ed. London: College Publications.
Augusto, L. M. (forthcoming). Regular languages and their automata.
Church, A. (1936). An unsolvable problem of elementary number theory. American Journal of Mathematics, 58(2), 345-363.
Cooper, S. B. (2004). Computability theory. Boca Raton, etc.: Chapman & Hall/CRC.
Cutland, N. J. (1980). Computability. An introduction to recursive function theory. Cambridge, etc.: Cambridge University Press.
Dekker, J. C. E. (1955). Productive sets. Transactions of the American Mathematical Society, 78, 129-149.
Hilbert, D. & Ackermann, W. (1928). Grundzüge der theoretischen Logik. Berlin: Springer.
Post, E. L. (1944). Recursively enumerable sets of positive integers and their decision problems. Bulletin of the American Mathematical Society, 50, 284-316.
Rogers, H. (1967). Theory of recursive functions and effective computability. New York, etc.: McGraw Hill.
Smullyan, R. M. (1993). Recursion theory for metamathematics. New York & Oxford: Oxford University Press.
Soare, R. I. (1996). Computability and recursion. Bulletin of Symbolic Logic, 2, 284-321.
Soare, R. I. (1999). The history and concept of computability. In E. R. Griffor (ed.), Handbook of computability theory (pp. 3-36). Amsterdam: North-Holland.
Soare, R. I. (2016). Turing computability. Theory and applications. Berlin & Heidelberg: Springer.
Staiger, L. (1997). -languages. In G. Rozenberg & A. Salomaa (eds.), Handbook of formal languages. Vol. 3: Beyond words (pp. 339-387). Berlin & Heidelberg: Springer.
Turing, A. (1936). On computable numbers, with an application to the Entscheidungsproblem. Proceedings of the London Mathematical Society, Series 2, 42(1), 230-265.