How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Decidable, Recognizable, and Enumerable Languages
1 · Prerequisites
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Finite Counting, Factorials and Binomial Coefficients
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Linear Recurrences and Rational Generating Functions
- Relations, Functions, and Quotients
- Robust Machine Models and Universal Computation
- Sequences and Limits
- The ZFC Axioms and the Basic Set Constructions
- Turing Machines, Configurations, and Computation
2 · Summary
This page separates three notions that are often conflated on first exposure: computability of total functions, recognizability of languages by machines that may diverge on nonmembers, and computable enumerability as effective listing. The main equivalences show that recognizable languages are exactly the computably enumerable ones and that decidability is the same as simultaneous recognizability of a language and its complement.
The rest of the page packages the basic closure properties, fixes one concrete dovetailing schedule for later use, and records two standard consequences about domains, ranges, and injective enumerations of c.e. sets. The final false statements separate recognizability from total halting and countability from decidability.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Computable and partial computable functions
Definition
Fix effective encodings of sets and .
A function is partial computable when some deterministic Turing machine computes it in the sense of Partial functions computed by a machine under fixed encodings.
If , so the machine halts with the correct output on every input in , then is computable or total computable.
Remarks
-
"Computable" is the total case of "partial computable"; the distinction is whether divergence is allowed outside a proper domain.
-
The encoded machine works on binary words, but the represented function lives on the underlying sets and through the chosen encodings.
Decidable and recognizable languages
Definition
Let be a language.
- is recognizable when some deterministic Turing machine recognizes in the sense of Languages recognized and decided by a Turing machine.
- is decidable when some deterministic Turing machine decides in the sense of Languages recognized and decided by a Turing machine.
After fixing any effective binary encoding of the finite alphabet (and hence of ) and the evident encoding of , equivalently is decidable exactly when its characteristic function is computable with respect to those encodings. Recognizability only asks for effective halting on the positive instances and forbids acceptance on the negative instances.
Computably enumerable sets and languages
Definition
Fix an effectively encoded set .
A subset is computably enumerable when either or there exists a total computable function whose range is exactly .
If is a language over an alphabet , then is computably enumerable when it is c.e. as a subset of under the chosen effective word encoding.
Remarks
-
The classical synonym is "recursively enumerable".
-
Repetition in the output list is allowed; the range condition only asks that every element of appears at least once and that nothing outside appears.
A binary language is recognizable if and only if it is computably enumerable
Statement
For every language , the following are equivalent, where computable enumerability is taken with respect to the identity encoding of binary words:
- is recognizable.
- is computably enumerable.
Facts & Assumptions
Given: A language .
By Decidable and recognizable languages, recognizability means that some Turing machine accepts exactly the words of and may diverge on nonmembers.
By Computably enumerable sets and languages, computable enumerability means either or is the range of a total computable function.
Proof
Assume first that is c.e. If , then the machine that immediately rejects every input recognizes . Otherwise choose a total computable enumerator with range as in [L2]. On input , search through and compute until ; if this occurs, accept. For the search eventually finds a witness , and for it never accepts. Thus is recognizable by [L1].
Assume conversely that is recognizable. If , then [L2] already says that is c.e. So assume , and let be a recognizer for . By dovetailing the simulations of over binary words in shortlex order, fix one accepted word .
Fix a standard total computable bijection from onto , and let be the th binary word in shortlex order. Define This is a total computable function . Every output of lies in , and if then for some and accepts in some finite number of steps , so for the paired input with coordinates . Hence the range of is exactly , so [L2] shows that is c.e.
Steps 1.1 and 2.1 prove the equivalence.
A language is decidable if and only if it and its complement are recognizable
Statement
For every language , the following are equivalent:
- is decidable.
- Both and its complement are recognizable.
Facts & Assumptions
Given: A language .
By Decidable and recognizable languages, a decider halts on every input and gives the correct yes-or-no answer, while a recognizer only needs to accept the members.
By Boolean operations on languages over a fixed alphabet, the complement of is the language over the same alphabet.
Proof
If is decidable, then a decider for is already a recognizer for , and swapping its accepting and rejecting halting states gives a recognizer for . Thus item 1 implies item 2 by [L1] and [L2].
Assume recognizes and recognizes . On input , simulate one step of , then one step of , then two steps of each, and so on. If accepts at some stage, accept; if accepts at some stage, reject. Because every word lies in exactly one of and , exactly one machine must eventually accept, so this interleaving always halts with the correct answer. Therefore is decidable by [L1].
Steps 1.1 and 1.2 prove both directions.
Recognizable languages are closed under union and intersection
Statement
If are recognizable, then both and are recognizable.
Facts & Assumptions
Given: Recognizable languages .
By Decidable and recognizable languages, a recognizer accepts exactly the members of its language, but may diverge on nonmembers.
By Boolean operations on languages over a fixed alphabet, and are languages over the same alphabet.
Proof
Let recognize and recognize . To recognize , interleave their computations on an input and accept as soon as either machine accepts. If , one of the recognizers eventually accepts; if , neither does. Hence is recognizable by [L1] and [L2].
To recognize , again interleave the two computations on , but now record whether each machine has accepted and halt only once both accept. If , both accepting events occur after finitely many stages; if , at least one machine never accepts, which is allowed for a recognizer. Thus is recognizable.
Therefore recognizable languages are closed under union and intersection.
Decidable languages are closed under the Boolean operations
Statement
If are decidable, then their complement, union, intersection, difference, and symmetric difference are decidable.
Facts & Assumptions
Given: Decidable languages .
By Decidable and recognizable languages, a decider halts on every input with the correct membership answer.
By Boolean operations on languages over a fixed alphabet, complements and differences are taken inside the fixed ambient .
The set identities hold for all subsets of one set.
Proof
If decides , then flipping its final yes-or-no answer gives a halting decider for . If and decide and , run both and combine their two halting answers by the ordinary Boolean truth tables to decide and .
By [A1], the same deciders decide as and decide as . Because each constituent operation from step 1.1 preserves halting, these languages are decidable as well.
Therefore decidable languages are closed under all five stated Boolean operations.
A dovetailing schedule
Definition
For each stage , let Inside , order the pairs lexicographically by and then by .
The sequence is the stage-sum dovetailing schedule. Running task for one more local step at each occurrence of a pair means that global stage performs exactly the finitely many local simulations whose task index and local time sum to .
Remarks
-
Every stage is finite, so one global stage can be completed before the next begins.
-
The point of the schedule is fairness: no fixed finite amount of work on a fixed task is postponed forever.
A dovetailing schedule reaches every finite simulation stage
Statement
In the stage-sum dovetailing schedule of A dovetailing schedule, every pair appears at the finite global stage . In particular, every fixed finite simulation prefix of every fixed task is eventually reached.
Facts & Assumptions
Given: The stage-sum dovetailing schedule .
By A dovetailing schedule, consists exactly of the pairs with .
Proof
Fix and set . Then the defining condition for is satisfied, so [L1] gives .
Therefore the task with index is run through its local time by the finite global stage . This is exactly the claimed fairness property.
Domains and ranges of partial computable functions are computably enumerable
Statement
Let be a partial computable function on effectively encoded sets and , and assume that the chosen total decoder for the input encoding of is itself computable. Then its domain and its range are computably enumerable.
Facts & Assumptions
Given: A partial computable function on effectively encoded sets and , together with a computable total decoder for the chosen input encoding of .
By Computable and partial computable functions, some machine computes , halting exactly on the inputs in and outputting the correct value there.
By A binary language is recognizable if and only if it is computably enumerable, it is enough to build recognizers for the binary code languages of the domain and range.
By A dovetailing schedule reaches every finite simulation stage, the stage-sum schedule eventually reaches every finite simulation stage of every candidate input.
Proof
Let . On an input word , run the computable decoder from the given data for the input encoding of . If is malformed, diverge forever. If is valid, simulate the machine from [L1] on the same word and accept exactly when that simulation halts. This recognizes exactly the binary language , so [L2] makes computably enumerable. Since consists exactly of the codes of elements of , the same enumeration viewed through the fixed encoding witnesses that is computably enumerable as a subset of .
Let . On an input word , dovetail the following branches over all binary words in shortlex order: first run the computable decoder for the input encoding of on , and discard the branch if is malformed; otherwise simulate the machine from [L1] on . Accept as soon as some valid input code halts with output . If for some , then [L3] ensures that the halting computation on the valid code is eventually reached, so the recognizer accepts. If , no valid branch can witness acceptance. Thus is recognizable, [L2] makes it computably enumerable as a binary language, and therefore is computably enumerable as a subset of .
Therefore both the domain and the range of a partial computable function are computably enumerable.
Every computably enumerable set is the domain of a partial computable function
Statement
Let be a computably enumerable subset of an effectively encoded set . Then there exists a partial computable function whose domain is exactly .
Facts & Assumptions
Given: A c.e. set .
By Computably enumerable sets and languages, either or there exists a total computable enumerator with range .
By Computable and partial computable functions, a partial computable function is one produced by a machine that halts exactly on its domain.
Proof
If , take the nowhere-defined partial function from to the one-point set . Its machine diverges on every input, so [L2] shows that its domain is exactly .
Suppose now that , and let be the total computable enumerator from [L1]. Define a machine on an input code that computes the outputs one after another until it first sees the codeword , at which point it halts and outputs . If with , some index satisfies , so the machine eventually halts on . If , no enumerated value has code , so the machine never halts on . Thus [L2] gives a partial computable function whose domain is exactly .
In either case, is the domain of a partial computable function.
Infinite computably enumerable sets have computable injective enumerations
Statement
Every infinite computably enumerable subset of an effectively encoded set is the range of a total computable injective function .
Facts & Assumptions
Given: An infinite computably enumerable set .
By Computably enumerable sets and languages, since is infinite it is in particular nonempty, so there exists a total computable function whose range is exactly .
By Computable and partial computable functions, the total computable enumerator from [L1] is realized by a machine that halts with the code of on every input .
Proof
By [L1], choose a total computable enumerator with range exactly , and let be a machine as in [L2] that computes it. On input , simulate the computations of on one after another, keep the list of distinct output codewords already seen, and halt when the st new codeword appears, outputting that codeword.
The resulting function is injective by construction, because each output is the next codeword not seen before. Every value of lies in because every output of lies in the range of . Conversely, if , then some stage of the sequential scan in step 1.1 encounters the codeword among the outputs of , so that codeword is eventually appended to the distinct-output list. Hence the range of is exactly .
Because is infinite, for each there are at least distinct elements of . Step 2.1 shows that each of their codewords appears somewhere in the scan from step 1.1, so the st new codeword is found after finitely many outputs of . Therefore the machine of step 1.1 halts on every input , and it computes a total injective function with range .
Thus every infinite c.e. set has a computable injective enumeration.
Well-formed deterministic one-tape Turing machine descriptions form a decidable language
Statement
Under the chosen encoding of A fixed effective binary encoding of deterministic one-tape Turing machines, the set of binary words that decode to well-formed deterministic one-tape Turing machines is a decidable language.
Facts & Assumptions
Given: The chosen machine encoding.
By The chosen machine coding is injective and has a total decoder, the chosen code has a total decoder that either reconstructs the unique coded machine or reports malformed input.
By Decidable and recognizable languages, a language is decidable exactly when some Turing machine halts on every input and accepts exactly its members.
Proof
On input a binary word , run the total decoder from [L1]. If it reports malformed input, reject; if it returns a coded machine, accept. Because the decoder is total, this procedure halts on every input.
The procedure accepts exactly those binary words that decode to well-formed deterministic one-tape Turing machine descriptions. Therefore [L2] shows that the description language is decidable.
FALSE: recognizable means total halting
Statement
Whenever a machine recognizes a language, it halts on every input.
Facts & Assumptions
Given: The language .
By Decidable and recognizable languages, a recognizer only has to halt and accept on the members of its language.
Refutation
Let be the machine that accepts immediately on input 0 and otherwise moves right forever without entering any halting state. Then accepts exactly the one-word language .
On every nonmember of , the machine from step 1.1 diverges. So recognizes but does not halt on every input.
Therefore recognizability does not force total halting, and the statement is false.
FALSE: every countable language is decidable
Statement
Every countable language is decidable.
Facts & Assumptions
Given: The unary alphabet .
By Finite, countably infinite, countable, uncountable, a language is countable when it is finite or countably infinite.
By Turing machines admit an effective enumeration, the coded deterministic one-tape Turing machines can be effectively listed.
By Decidable and recognizable languages, a decider for a language must halt on every input and give the correct membership answer.
By A fixed effective binary encoding of deterministic one-tape Turing machines, a coded machine has input alphabet , so every coded machine with can read every unary word as a legal input.
Any deterministic one-tape decider over the unary alphabet can be put in the normalized coded form by relabelling its finite state and tape alphabets, adding unreachable designated states if necessary, and filling any omitted transition entries with a rejecting transition. This preserves its behavior on unary inputs.
Refutation
The set is countable by length, so write its elements as for . Filter the effective list from [L2] by keeping only the coded machines whose input-alphabet parameter satisfies ; by [L4], this gives an effective enumeration of all coded deterministic one-tape machines that can read every unary word. Let . By [L1], the language is countable because it is a subset of the countable set .
Suppose a decider decides . By [F1], an equivalent coded decider occurs as some in the filtered enumeration. If , then step 1.1 says that does not accept , contradicting the requirement that a decider for accept members. If , then step 1.1 says that accepts , contradicting the requirement that a decider reject nonmembers.
Thus no decider decides the countable language , so the statement is false.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Jean Gallier and Jocelyn Quaintance, Introduction to the Theory of Computation: Some Notes for CIS511
- John Watrous, Introduction to the Theory of Computing, Lecture 18: Further discussion of computability
- John Watrous, Introduction to the Theory of Computing, Lecture 17: More undecidable languages; reductions