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.
Formal Languages, Encodings, and Decision Problems
1 · Prerequisites
2 · Summary
This page fixes the pre-machine vocabulary for the computability theory track: finite words over an alphabet, languages and their basic operations, reversal and induced letter-to-word maps, effective encodings with total decoders, and the encoded-size convention used later for complexity bounds.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Computation alphabets, words, the empty word, and
Definition
Let be a finite set, called an alphabet. For each natural number , a word of length over is a function , equivalently an element of (The set of all functions ). Writing for , we display the word as . This is the same finite-word convention already used in Finite words, contiguous factors, avoidance and proper-prefix states.
The unique word of length is the empty word .
If and are words, their concatenation is the word defined by
The set of all finite words over is an indexed union in the sense of , and for .
Remarks
-
A word is an element of , not a subset of . The symbols of the alphabet are the values of the function; the word itself is the whole finite sequence.
-
For the binary alphabet the notation means every finite binary word, including .
The computation-word convention agrees with the published finite-word definition
Statement
Let be a finite alphabet. The word convention of Computation alphabets, words, the empty word, and and the published convention of Finite words, contiguous factors, avoidance and proper-prefix states describe the same words of each length, the same empty word, and the same displayed concatenation of finite words. Hence the set on this page is exactly the set of finite words over already used in the published item.
Facts & Assumptions
Given: A finite alphabet .
On this page, a word of length over is a function , the empty word is the unique word of length , and concatenation is the offset construction of Computation alphabets, words, the empty word, and .
The published item Finite words, contiguous factors, avoidance and proper-prefix states defines a word of length over as a function , names the unique length-zero word , and writes concatenation of words as .
Proof
For each natural number , both [L1] and [L2] say that a word of length over is a function . So the two conventions have exactly the same length- words.
Both [L1] and [L2] call the unique word of length the empty word , so the two empty-word conventions coincide.
If and , then [L1] defines by taking the first values from and the next values from . That is exactly the displayed word obtained by writing the letters of followed by the letters of , which is what the published notation of [L2] denotes.
Since the words of every length agree by step 1.1, their union over all lengths agrees as well. So the set of Computation alphabets, words, the empty word, and is literally the same set of finite words already used in Finite words, contiguous factors, avoidance and proper-prefix states.
Languages over an alphabet
Definition
Let be an alphabet. A language over is a subset , where is the set of finite words of Computation alphabets, words, the empty word, and and is the subset relation of Subset , proper subset , and the separation notation .
Thus a language is a set of words over a fixed alphabet, not a set of alphabet symbols.
Remarks
-
The ambient alphabet matters. The same set of written strings can be viewed as a language over different alphabets only when it is contained in each corresponding .
-
The two extreme languages over are and .
Boolean operations on languages over a fixed alphabet
Definition
Fix an alphabet , and let be languages over (Languages over an alphabet).
Their union, intersection, and difference are the languages
Their complement is taken inside the same ambient :
Remarks
-
Complement depends on the chosen ambient alphabet. A language may have different complements when it is regarded inside different .
-
These are ordinary set-theoretic operations applied to subsets of .
Language concatenation, powers, and Kleene star
Definition
Fix an alphabet , and let be languages over (Languages over an alphabet).
Their concatenation is where is word concatenation as in Computation alphabets, words, the empty word, and .
Define the powers of by and, for each , let be the set of words of the form with each .
The Kleene star of is
Remarks
-
The word belongs to for every language , even when , because it already lies in .
-
The positive closure satisfies .
Language concatenation is associative
Statement
For languages over the same alphabet,
Facts & Assumptions
Given: Languages over a fixed alphabet .
Language concatenation is by Language concatenation, powers, and Kleene star.
If and are words, then the concatenated word is defined by the offset rule of Computation alphabets, words, the empty word, and .
Proof
Let . By [L1] there are words , and with .
Let , , and . By [L2], both and have length , and for each index they take the same value: from when , from when , and from when . Hence .
Conversely, let . By [L1] there are words , , and with .
Since and , the word lies in by [L1]. Together with step 1.2 this gives .
The same index comparison as in step 1.2 gives , and now by [L1]. So .
Steps 2.1 and 2.2 prove both inclusions, so .
Kleene star is the least concatenation-closed language containing and
Statement
Let be a language over an alphabet .
- .
- .
- If is a language with and , then .
In particular, is the least language containing and closed under left concatenation by words from ; therefore it is also the least concatenation-closed language containing and .
Facts & Assumptions
Given: A language and a language .
The powers of satisfy , for the set consists of words with each , and by Language concatenation, powers, and Kleene star.
Language concatenation is by Language concatenation, powers, and Kleene star.
Proof
By [L1], . This proves clause 1.
Let . By [L2] there are and with . Since , [L1] gives some with . Then by the definition of in [L1], so again. Thus , proving clause 2.
Assume and . We prove by induction on that . For , [L1] gives .
For the induction step, assume . If , then by [L1] there are and with . The induction hypothesis gives , so . Hence .
If , choose with and . Writing and with every , the concatenation is the -fold product , so . Therefore , and is concatenation-closed.
Any concatenation-closed language containing and satisfies , because for and the concatenation lies in .
By steps 1.3 and 1.4, every is contained in . Since by [L1], we get . This proves clause 3.
Step 1.1 gives , and [L1] gives . Together with step 1.5, this shows that is itself a concatenation-closed language containing and . Now step 2.1 and step 1.6 show that every other such language contains . This is exactly the stated minimality.
Word reversal and language reversal
Definition
Let be a word over an alphabet . Its reversal is the word defined by Equivalently, if , then . In particular, .
If is a language, its reversal is
Remarks
-
Reversal changes the order of letters but not the alphabet or the word length.
-
The definition is pointwise on words first and only then lifted to languages.
Reversal is an involution and reverses concatenation
Statement
For words over a fixed alphabet and languages over that alphabet:
- .
- for every word .
- and .
Facts & Assumptions
Given: Words and languages over a fixed alphabet .
Word reversal is defined by for a word , and language reversal is , by Word reversal and language reversal.
Word concatenation is the offset construction and language concatenation is by Computation alphabets, words, the empty word, and and Language concatenation, powers, and Kleene star.
Proof
Let and . For , the th letter of is the th letter of , hence the th letter of by [L2], so .
For , write with . Then the th letter of is the th letter of , so ; this is exactly the offset rule for the concatenation . Therefore .
Let . For each , So .
If , then for some by [L1]. By [L2] we may write with and , and then step 1.2 gives . Hence .
Conversely, if , then with and by [L1] and [L2]. Step 1.2 gives , and , so . Thus .
By [L1], exactly when for some , that is, for some with . Step 1.3 then gives . Conversely, if then step 1.3 gives . So .
Alphabet maps into and their induced maps on words
Definition
Let and be alphabets. An alphabet map is a function in the sense of A function is a relation with and implying ; , the value , domain and codomain.
Its induced word map is the function defined as follows. For the empty word, . For a one-letter word , set . For a word of length over , set the left-associated concatenation of the image words of its letters.
Remarks
-
When every has length , the induced map simply replaces each letter by a single letter .
-
The point of the definition is that the whole map on is determined by the values on the letters of .
The induced word map is the unique concatenation-preserving extension
Statement
Let be an alphabet map and let be its induced word map. For , write for the one-letter word whose unique value is .
- For all words ,
- If satisfies for all words and for every , then .
Facts & Assumptions
Given: An alphabet map , its induced map , and a map preserving concatenation and satisfying for every .
The induced map is defined by and by Alphabet maps into and their induced maps on words.
Word concatenation is formed by writing the letters of the first word followed by those of the second, by Computation alphabets, words, the empty word, and .
Proof
If and , then [L2] says that the word is . Applying [L1] to that word gives , which is exactly .
Since preserves concatenation, . Comparing word lengths forces .
For the induction step, write a nonempty word as with its final letter. If , then by the hypothesis on and [L1].
We prove for every word by induction on the length of . The base case is the empty word, handled by step 1.2 and [L1].
Steps 2.1 and 1.3 show that for every word , so . Together with step 1.1 this proves both clauses.
Effective binary encodings and total decoders
Definition
Let . A binary encoding of a set is an injective function (A function is a relation with and implying ; , the value , domain and codomain, Injection, surjection, bijection).
Fix a symbol not belonging to . A total decoder for is a function such that Thus is exactly the output on malformed codes, and the decoder is defined on every binary word, not only on words in the image of .
The encoding is effective when such a total decoder is specified.
The encoding is prefix-free when no codeword is a proper prefix of another: there do not exist distinct and a nonempty binary word with .
Remarks
-
Effectiveness here means injective plus explicitly decodable with a fixed malformed-code output. It does not yet formalize computation by Turing machines.
-
Prefix-freeness is an additional property, not part of the definition of an effective encoding.
Finite tuples admit effective prefix-free binary encodings
Statement
For every fixed , the set of binary -tuples has an effective prefix-free binary encoding.
Facts & Assumptions
Given: A fixed integer .
An effective binary encoding is an injective map into equipped with a total decoder having a fixed malformed-code output, and prefix-free means that no codeword is a proper prefix of another, by Effective binary encodings and total decoders.
Proof
First encode a single binary word by From the initial block of 's and the following , one reads off and then reads exactly that many remaining bits, so is injective and has a total decoder that either returns the uniquely parsed word or the malformed token of [L1].
For the fixed tuple length , define The initial block tells the decoder that exactly self-delimiting blocks must follow. Parsing those blocks recovers a unique tuple when the input has the required form, and otherwise the decoder returns the malformed token. Hence is an effective encoding in the sense of [L1].
The encoding is prefix-free. Indeed, once the parser has read the initial block , it knows that the codeword ends exactly after the th self-delimiting block. So a valid codeword cannot be a proper prefix of a different valid codeword with extra unread bits at the end.
Therefore admits an effective prefix-free binary encoding.
Decision problems, search problems, and function problems
Definition
Fix a set of instances together with an effective binary encoding (Effective binary encodings and total decoders).
A decision problem on is a distinguished subset of yes-instances. Its associated language of encoded yes-instances is a language over the binary alphabet in the sense of Languages over an alphabet.
A search problem on consists of a condition assigning to each instance a set of acceptable outputs; solving the problem means producing one acceptable output when one exists.
A function problem on is a specified total function on instances, for some output set (A function is a relation with and implying ; , the value , domain and codomain).
Remarks
-
Decision problems ask for a yes/no answer, search problems ask for a witness, and function problems ask for a designated output value.
-
The same mathematical problem can have several encodings. The associated language depends on the chosen .
Instance size and polynomially related encodings
Definition
Let be a set of instances and let be an effective binary encoding. The size of an instance with respect to is the length of its codeword:
If are two effective encodings of the same instance set, they are polynomially related when there exist polynomials such that for every ,
Remarks
-
Resource bounds are measured as functions of encoded input length, not of an abstract instance before encoding.
-
Polynomially related encodings may differ substantially, but neither can blow up the other's lengths by more than a polynomial factor.
FALSE: a language is a set of symbols
Statement
False claim: if is an alphabet, then every language over is a subset of .
Facts & Assumptions
Given: The binary alphabet and the set .
The false claim: every language over an alphabet is a subset of .
A language over is a subset of by Languages over an alphabet.
The word is a binary word of length , hence an element of , by Computation alphabets, words, the empty word, and .
Refutation
By [L2], the word lies in , so the one-element set is a subset of . Therefore [L1] shows that is a language over .
The element is a word of length , not a single symbol of the alphabet . So , and therefore is not a subset of .
Thus is a language over for which the conclusion of [A1] fails. The claim is false.
FALSE: every effective encoding is prefix-free
Statement
False claim: every effective binary encoding is prefix-free.
Facts & Assumptions
Given: The encoding defined by .
The false claim: every effective binary encoding is prefix-free.
An effective binary encoding is an injective map into with a total decoder and a fixed malformed-code output, and prefix-free means that no codeword is a proper prefix of another, by Effective binary encodings and total decoders.
Refutation
The map is injective: if , deleting the common first bit gives .
Define a total decoder by setting for every binary word and for every binary word not beginning with (including the empty word). Then for every , so is effective by [L1].
The codeword is a proper prefix of . So is not prefix-free.
Step 1.2 shows that is an effective encoding, while step 1.3 shows that it is not prefix-free. Therefore [A1] 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 E. Savage, Models of Computation: Exploring the Power of Computing
- Michael Sipser, MIT 18.404J Theory of Computation, Lecture 1
- Michael Sipser, MIT 18.404J Theory of Computation, Lecture 7
- Sanjeev Arora and Boaz Barak, Computational Complexity: A Modern Approach
- San Skulrattanakulchai, The Class P