Scope of the appendix
This appendix isolates the mathematical proof obligations of the extended learner. The main theorem is conditional on explicit terminal invariants: closed representation, right compatibility, separability and the finite Monoid Consistency Check.
This distinction matters. An exact EQ proves equality of recognized languages, but it does not alone prove that the hypothesis quotient is the syntactic monoid. The missing step is to establish that the learned equivalence is compatible with concatenation on both sides and contains no unnecessary split.
Notation
Let be regular and let
At a fixed stage, let be finite and contain . Define
The current observational equivalence is
Right-consistency refinement uses the suffix row
The target syntactic congruence is
Terminal invariants
The proof uses the following conditions.
- Separability. Distinct representatives in have distinct rows.
- Closedness. For every and , there is a such that .
- Exact language equivalence. The constructed hypothesis has one chosen representative from for every state and has passed the exact EQ: .
- Finite right consistency. For all and ,
- Boundary left compatibility. For and , put and let be its unique representative. Then, for every and ,
The Monoid Consistency Check is precisely the finite test in Condition 5.
Lemma 0A: Finite right consistency implies right compatibility
Lemma. Under Conditions 3 and 4,
for every .
Proof. Fix . Equality of the full rows of and implies
Let be the chosen representatives of the states reached in by and . Because and reach the same hypothesis state, they have the same continuation behavior in . Since , for every ,
Similarly, . In particular,
Finite right consistency gives
For every , exact language equivalence and equality of hypothesis states yield
This holds for every and , so . Hence .
Lemma 0B: Existence of path representatives
Define recursively. Let . If , choose to be the unique representative supplied by closedness for the boundary word .
Lemma. Every word has a unique path representative satisfying
Proof. We use induction on . The claim is immediate for .
Suppose and let . Lemma 0A gives
Closedness supplies some with
By transitivity, , so set . If two representatives satisfied this condition, then ; separability would force . Thus the representative exists and is unique.
Lemma 1: Unique representatives
Lemma. Under the terminal invariants,
Proof. Suppose . By Lemma 0B,
Transitivity gives . Both words belong to , so separability implies .
Conversely, if , Lemma 0B and transitivity give
Therefore the two conditions are equivalent.
Lemma 2: Extension from letters to words
Lemma. Right compatibility for letters implies
for every .
Proof. Use induction on . For , the claim is immediate. Suppose it holds for and let . Then
Applying right compatibility once gives
Thus the property holds for every finite word.
Lemma 3: The finite Monoid Check controls full rows
The implemented check compares only contexts from . The next lemma explains why this is enough to recover every coordinate in .
Lemma. Let with , , and let . If the boundary left-compatibility check passes, then for every ,
Proof. Fix . To prove equality of full rows, choose arbitrary and . Let
By Lemma 0B, . Lemma 2 allows us to append and :
Since is a row coordinate, these equivalences imply
The finite Monoid Check applies to , so
Combining the three equalities gives
Because and were arbitrary, every coordinate of and agrees. Hence .
Lemma 4: Normal-form multiplication
Lemma. For every representative and word ,
Proof. We use induction on .
For , choose . Then .
For the induction step, write with and assume
By right compatibility,
The word is a boundary word in . Its representative is
where the middle equality follows from Lemma 1 and the definition of the path representative. Lemma 3 gives
By transitivity, .
Lemma 5: Arbitrary products reduce to representatives
Lemma. For all ,
Proof. Lemma 0B gives . By Lemma 2,
Applying Lemma 4 with the representative gives
Transitivity completes the proof.
Lemma 6: Observational equivalence is a congruence
Lemma. At termination, is compatible with concatenation on both sides.
Proof. Right compatibility with arbitrary suffixes is Lemma 2.
For left compatibility, suppose and choose any . Lemma 1 gives
Using Lemma 5 twice,
Therefore . Since was arbitrary, is both a left and right congruence.
Lemma 7: The quotient saturates the language
Lemma. If , then
Proof. Because , the coordinate belongs to every full row. Equality of rows therefore implies
Hence every class lies entirely inside or entirely outside .
Theorem: Correctness of the learned quotient
Theorem. If the terminal invariants hold and the finite Monoid Consistency Check passes, then
Consequently,
Proof. We prove both inclusions.
First inclusion
Assume . By Lemma 6, for all ,
Lemma 7 then gives
Therefore , and so
Reverse inclusion
Assume but . By Lemma 1,
Separability says their rows differ. Hence there exist and such that
Lemma 0B gives and . Lemmas 6 and 7 therefore imply
and
Thus , contradicting . Therefore
The equivalences coincide, and their quotient is the syntactic monoid.
Corollary: Why Promote can skip the post-check
Corollary. Suppose every representative is promoted into the prefix set, so that
If a boundary word and its representative have equal full rows, then the finite Monoid Consistency condition already holds.
Proof. Equality of full rows means
Since every also belongs to , choose . Then
This is exactly boundary left compatibility. The post-EQ Monoid Check would therefore repeat information already encoded in the rows.
Termination under strict refinement
Let . Every new representative added to has a row different from all existing representatives. That difference is witnessed by actual contexts and , so the new representative belongs to a previously unrepresented syntactic class. Therefore
Similarly, every accepted refinement of or must split at least one current observational class. Under the progress condition that the learner never inserts a context that leaves the current partition unchanged, only finitely many such splits are possible because syntactic congruence has classes.
With an exact equivalence teacher, the loop must therefore reach a hypothesis that recognizes . Once the terminal invariants and boundary left compatibility also hold, the main theorem applies and the returned quotient is .
Proof obligations for the implementation
The theorem separates mathematical correctness from engineering details. A concrete implementation should test the following properties independently:
- stable row coordinates and unique representatives;
- closedness after every representative insertion;
- right-compatibility refinement after changes to ;
- exact language equivalence of the final hypothesis in Oracle experiments;
- the boundary left-compatibility condition for Post;
- the invariant and zero Monoid Check calls for Promote;
- language, MQ and EQ trajectory preservation after cache or table refactors.
These tests do not replace the proof. They establish that the running program satisfies the hypotheses under which the proof is valid.