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.
Regular Expressions and Kleene's Theorem
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
- Deterministic Finite Automata and Regular Languages
- Finite Counting, Factorials and Binomial Coefficients
- Finite-Automata Transition and Determinisation Interfaces
- Formal Languages, Encodings, and Decision Problems
- Foundations of the Real Numbers for Analysis
- Linear Recurrences and Rational Generating Functions
- Nondeterministic Finite Automata and Subset Construction
- Relations, Functions, and Quotients
- Roots, Rational Powers, and Classical Inequalities
- The ZFC Axioms and the Basic Set Constructions
2 · Summary
This page separates regular-expression syntax from its language denotation, builds the two automata-conversion directions behind Kleene's theorem, and then packages three standard closure families together with the basic DFA decision procedures.
3 · Logical flowchart
4 · Definitions, theorems and proofs
Regular expression syntax over an alphabet
Definition
Let be an alphabet. The set of regular expressions over is the smallest class such that:
- , , and every letter belong to ;
- whenever , the formal expressions , , and also belong to .
Thus a regular expression is a finite formal expression tree built from the three base symbols and the three constructors union, concatenation, and star.
Remarks
-
The definition is syntactic: two different expression trees may still denote the same language.
-
Parentheses are part of the formal syntax, even when ordinary mathematical notation later suppresses some of them.
The language denoted by a regular expression
Definition
Fix an alphabet . The denotation of a regular expression is the language defined recursively by
and by the recursive clauses
The operations on the right are the language union, concatenation, and Kleene star from Boolean operations on languages over a fixed alphabet and Language concatenation, powers, and Kleene star.
Remarks
-
The syntax and the language have different types: one is a formal expression, the other is a subset of .
-
The recursive clauses are meaningful only because the next lemma makes the denotation assignment structurally well-defined.
Regular-expression denotation is structurally well-defined
Statement
For every regular expression over an alphabet , there exists a unique language satisfying the recursive clauses of The language denoted by a regular expression.
Facts & Assumptions
Given: A regular expression .
By Regular expression syntax over an alphabet, every regular expression is obtained from the base symbols by finitely many applications of union, concatenation, and star.
By The language denoted by a regular expression, the intended denotation is fixed on the three base symbols and, for a composite expression, is obtained from the denotations of its immediate subexpressions by one of the operations , , or .
Proof
By [L1], every regular expression has a finite construction tree, so there is a well-founded induction on the number of constructor occurrences in that tree.
In the base cases , , and , the language is uniquely fixed by [L2]. If is composite, then its outermost constructor is uniquely one of , concatenation, or by [L1]. The induction hypothesis gives unique denotations to the immediate subexpressions, and then [L2] applies one fixed language operation to those already determined languages.
Therefore exactly one language satisfies the recursive clauses for the given expression .
Every regular expression has an equivalent epsilon-NFA
Statement
For every regular expression over an alphabet , there exists an epsilon-NFA over such that
Facts & Assumptions
Given: A regular expression over .
By The language denoted by a regular expression, the denotation of a regular expression is computed from the denotations of its immediate subexpressions by the base, union, concatenation, and star clauses.
By Regular-expression denotation is structurally well-defined, each regular expression has a uniquely determined denoted language.
By Acceptance of a word by an NFA and the recognized language, an epsilon-NFA recognizes exactly the words for which some computation reaches an accepting state after reading the whole word.
Proof
We construct by induction on the structure of , maintaining one designated start state and one designated accepting state, with that designated state as the entire accepting set. For the base expressions, use: a two-state gadget with no transition to its accepting state for ; a two-state gadget joined by one -edge for ; and a two-state gadget with one -edge for a letter .
For , add a fresh start state with -edges to the starts of the machines for and , and a fresh accepting state reached by -edges from their old accepting states; only the fresh state is accepting. For , connect the accepting state of the machine for to the start state of the machine for by an -edge, make the former nonaccepting, and retain only the accepting state of the machine for . For , add fresh start and accepting states, an -edge from the new start to the new accept, an -edge from the new start into the old start, and -edges from the old accept both back to the old start and to the new accept; only the new accept is accepting.
The base gadgets recognize exactly , , and . By [L3], the union gadget accepts exactly when one branch accepts, the concatenation gadget accepts exactly when a word splits into a word accepted by the first machine followed by one accepted by the second, and the star gadget accepts exactly when the input is a concatenation of finitely many words accepted by the submachine. Using [L1] and the uniqueness from [L2], the induction follows for every constructor.
Hence the constructed epsilon-NFA recognizes precisely .
Generalized NFA's and their accepted languages
Definition
A generalized NFA over an alphabet is a finite state set with two distinguished states , , together with a label assignment
We require so has no incoming transitions and has no outgoing transitions.
For states and a set , let be the set of words for which there exist an integer and states with every intermediate state in , and a factorization such that each factor belongs to the denoted language of the corresponding edge label:
When , the state list has only and the factorization is empty, so the represented word is .
The language accepted by the GNFA is
Remarks
-
A GNFA edge label is a regular expression, not a single letter.
-
The set records words spelled by paths whose intermediate states are restricted to .
The GNFA state-elimination update
Definition
Let be a GNFA, and let be an interior state. The state-elimination update removes and keeps the surviving state set
For surviving states , the new label is
The resulting GNFA has the same distinguished start and accept states , the surviving state set , and the label function .
Remarks
-
The first summand keeps the old direct -to- behavior.
-
The second summand records paths that enter , loop there any finite number of times, and then leave for .
State elimination preserves the language between every surviving state pair
Statement
Let be a GNFA, let be an interior state, and let be the GNFA obtained from The GNFA state-elimination update. If and survive the elimination, then
Facts & Assumptions
Given: A GNFA , an interior state , surviving states , and a set .
By Generalized NFA's and their accepted languages, is the set of words read along paths from to whose intermediate states lie in , with each path segment interpreted through the denotation of its regular-expression label.
By The GNFA state-elimination update, eliminating replaces each surviving label by .
Proof
Let , witnessed by a path whose intermediate states lie in and by a factorization Delete every occurrence of from the state list, keeping the surviving states in order: For each consecutive pair , the deleted portion between them is either empty or consists of one entrance into , zero or more -to- loops, and one exit from . Therefore the corresponding subword of lies in the language of the updated label from [L2]. Using the same surviving-state list and these compressed subwords gives a witness that .
Conversely, let , witnessed by a surviving-state path with intermediate states in and by subwords in the denoted languages of the updated labels . For each such subword, [L2] says that it is either an old direct -to- word or a concatenation of an old -to- word, finitely many old -to- words, and an old -to- word. Expanding every updated edge in this way inserts only the eliminated state between surviving states, so the resulting path in has all intermediate states in . Hence .
Steps 1.1 and 1.2 prove the two inclusions, so the two path languages are equal.
Every DFA language is denoted by a regular expression
Statement
If is a DFA over , then there exists a regular expression over such that
Facts & Assumptions
Given: A DFA .
By Generalized NFA's and their accepted languages, a GNFA accepts the words read along paths from its start state to its accept state, and the intermediate-state restriction is tracked by the sets .
By The GNFA state-elimination update, eliminating an interior GNFA state uses the update .
By State elimination preserves the language between every surviving state pair, one elimination step preserves the path language between every surviving state pair.
By Acceptance of a word by a DFA and the recognized language, a word belongs to exactly when the run of from ends in a state of .
Proof
Form a GNFA by adjoining a new start state and a new accept state to the DFA states. Put the label on and on each edge with . For DFA states , label by the union of all letters with , and use on every remaining ordered pair. By [L4], a word is accepted by exactly when it labels a path from to through the old DFA states, so .
Eliminate the states of one at a time. At each step use the update from [L2]. By [L3], after each elimination the start-to-accept path language is unchanged. Therefore, when all interior states have been removed, the resulting two-state GNFA still satisfies .
In the only possible accepting paths go directly from to , so by [L1] the accepted language is exactly the denotation of the sole label on that edge. Hence some regular expression denotes .
A language is regular if and only if some regular expression denotes it
Statement
Let . Then is regular if and only if there exists a regular expression over with
Facts & Assumptions
Given: A language .
By Regular languages, a language is regular exactly when some DFA recognizes it.
By Every regular expression has an equivalent epsilon-NFA, every regular expression has an equivalent epsilon-NFA.
By The subset construction preserves the recognized language, the subset construction turns an epsilon-NFA into a DFA with the same recognized language.
By Every DFA language is denoted by a regular expression, every DFA language is denoted by some regular expression.
Proof
Suppose first that for some regular expression . By [L2], there is an epsilon-NFA recognizing , and by [L3] there is then a DFA recognizing the same language. Therefore [L1] implies that is regular.
Conversely, suppose that is regular. By [L1], some DFA recognizes . Then [L4] gives a regular expression with .
Steps 1.1 and 1.2 prove the forward and reverse implications.
Regular languages are closed under homomorphic image
Statement
Let be an alphabet map with induced word map , and let be regular. Then is a regular language over .
Facts & Assumptions
Given: An alphabet map and a regular language .
By Alphabet maps into and their induced maps on words, the induced map sends a concatenated word to the concatenation of the image words of its letters.
By The language denoted by a regular expression, the denotation of a regular expression is built recursively from union, concatenation, and star on languages.
By Regular-expression denotation is structurally well-defined, recursive substitutions through a regular-expression tree produce a uniquely determined regular expression.
By A language is regular if and only if some regular expression denotes it, every regular language is denoted by some regular expression.
Proof
Choose a regular expression over with by [L4]. For each letter , choose a regular expression over that denotes the single word : if take , and if with , take the concatenation .
Define by recursively replacing each occurrence of a letter in by , while leaving and fixed and commuting with , concatenation, and . By [L3], this gives one well-defined regular expression over .
A structural induction on using [L1] and [L2] shows that . Since , this language is exactly . Therefore is denoted by a regular expression and is regular.
Regular languages are closed under inverse homomorphism
Statement
Let be an alphabet map with induced word map . If is regular, then is regular over .
Facts & Assumptions
Given: An alphabet map and a regular language .
By Alphabet maps into and their induced maps on words, the induced map is obtained by concatenating the image words of the letters of the input word.
By The extended transition function of a DFA, a DFA transition function extends from letters to words, and the extension respects the recursive clause .
By Acceptance of a word by a DFA and the recognized language, a word is accepted exactly when the extended transition from the start state lands in an accepting state.
By Regular languages, every regular language is recognized by some DFA.
Proof
Choose a DFA with by [L4]. Define a DFA over with the same state set, start state, and accepting set by for each and .
We claim that for every word one has . The proof is by induction on : for both sides equal , and appending one letter updates the left-hand side by and the right-hand side by the block , exactly as [L1] and [L2] prescribe.
By [L3] and step 2.1, the DFA accepts exactly when accepts , that is, exactly when . Thus , so the inverse image is regular.
Regular languages are closed under left and right quotient with regular languages
Statement
Let be regular languages. Then the right quotient and the left quotient are regular.
Facts & Assumptions
Given: Regular languages , together with DFA's and recognizing them.
By Acceptance of a word by a DFA and the recognized language, a word is in the language of a DFA exactly when its run from the start state finishes in an accepting state.
By Acceptance of a word by an NFA and the recognized language, an epsilon-NFA accepts exactly when some computation reaches an accepting state after the whole input is read.
By DFAs and NFAs recognize the same languages, every language recognized by an NFA is regular.
By The product construction gives DFA's for union and intersection, two DFA's over the same alphabet can be run in parallel by a product DFA.
Proof
For the right quotient, first build the product DFA of and from [L4]. Declare a state to be accepting in a new DFA exactly when some word drives the product machine from to a state of . The transition graph of is otherwise the same as that of .
For the left quotient, let . Add a fresh start state with an -edge from to each state of , keep the letter transitions of on the old state set , and keep as the accepting set. This gives an epsilon-NFA .
If reads and ends in the state , then by construction is accepting exactly when some also takes from to a state of . By [L1], this is equivalent to for some . Hence .
By [L2], a word is accepted by exactly when some state of reaches a state of after reading . By the definition of and then [L1], this happens exactly when there exists with . Therefore .
Step 2.1 shows that the right quotient is recognized by a DFA. Step 2.2 shows that the left quotient is recognized by an NFA, so [L3] makes it regular. Thus both quotients are regular.
Membership, emptiness, finiteness, equivalence, and containment for regular languages
Definition
The standard DFA decision problems for regular languages are the following.
- Membership: given a DFA over and a word , decide whether .
- Emptiness: given a DFA , decide whether .
- Finiteness: given a DFA , decide whether is finite.
- Equivalence: given DFA's over the same alphabet, decide whether .
- Containment: given DFA's over the same alphabet, decide whether .
By Regular languages, these are decision problems for regular languages because a DFA is a witness for regularity.
DFA membership, emptiness, finiteness, equivalence, and containment are decidable
Statement
The five decision problems named in Membership, emptiness, finiteness, equivalence, and containment for regular languages are decidable for DFA input.
Facts & Assumptions
Given: The DFA decision problems of Membership, emptiness, finiteness, equivalence, and containment for regular languages.
By Acceptance of a word by a DFA and the recognized language, a DFA accepts a word exactly when the run on that word ends in an accepting state.
By The product construction gives DFA's for union and intersection, product constructions give DFA's for Boolean combinations built from union and intersection.
By Complementing the accepting states complements the recognized language, complementing the accepting set of a DFA complements its language.
For languages over one alphabet, and .
Proof
Membership is decidable by simulating the DFA on the finitely many letters of the input word and checking, via [L1], whether the final state is accepting.
Emptiness is decidable by a graph search from the start state through the finite transition graph: by [L1], the language is empty exactly when no accepting state is reachable.
Finiteness is decidable by restricting to states that are reachable from the start state and can themselves reach an accepting state. If that finite subgraph contains a directed cycle, then one may loop around the cycle arbitrarily many times before taking a path to acceptance, producing infinitely many accepted words. If it contains no directed cycle, then every accepting run has bounded length, so only finitely many words are accepted.
Given DFA's , use [L3] to complement either machine and then [L2] to build DFA's for the two differences and and for their union. By [A1], that union is the symmetric difference, so and are equivalent exactly when the resulting DFA has empty language. Step 1.2 therefore decides equivalence.
The same constructions give a DFA for . By [A1], the containment holds exactly when this difference language is empty, so step 1.2 also decides containment.
Steps 1.1, 1.2, 2.1, 2.2, and 3.1 decide membership, emptiness, finiteness, equivalence, and containment respectively.
FALSE: a regular expression is the same object as its denoted language
Statement
False claim: every regular expression is literally the same object as the language it denotes.
Facts & Assumptions
Given: The regular expression over the alphabet .
The statement refuted is: every regular expression is literally the same object as the language it denotes.
By Regular expression syntax over an alphabet, is a formal expression built from two letter expressions by one application of the union constructor.
By The language denoted by a regular expression, the language denoted by is .
Refutation
The object is, by [L1], a syntactic expression tree with an outer union node and two letter leaves.
The object is, by [L2], the two-element set of words.
A formal expression tree and a two-element set of words are not literally the same kind of object, so [A1] is false.
FALSE: state elimination has a unique output expression
Statement
False claim: once a GNFA is fixed, state elimination always produces one unique final regular expression.
Facts & Assumptions
Given: The GNFA with start state , accept state , interior states , labels , , , , and every other label equal to .
The statement refuted is: once a GNFA is fixed, state elimination always produces one unique final regular expression.
By The GNFA state-elimination update, eliminating a state replaces each surviving label by .
Refutation
Eliminate first. Applying [L1] without any algebraic simplification, and then eliminating , gives the final label .
Eliminating first and then instead gives .
These are different formal expression trees: already the first displayed outer summand ends in in step 1.1 and in in step 1.2. Thus [A1] is false even without imposing any simplification rules.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Jean Gallier and Jocelyn Quaintance, Introduction to the Theory of Computation: Some Notes for CIS511
- H. Conrad Cunningham, Notes on Models of Computation, Chapter 4: Properties of Regular Languages
- John Watrous, Introduction to the Theory of Computing, Lecture 15: Encodings; examples of decidable languages