Persistent Receipts and Simultaneous Records:
A Direct Scaffold for Even Palindromes
Draft 5 · 21 September 2026
We construct an online palindrome recognizer from persistent records. Typed receipts identify the historical palindrome records needed by each update; a shared-tail identity permits their sequences to be reused. A simultaneous-record compiler packs each bounded batch, including cycles among fresh records, into one scaffold node. The direct recognition theorem uses the strict, opaque sequence interface stated in Section 11 and symbolic finite resource bounds.
Contents
I The construction
1 The question and the direct route
1.1 The language and the conjecture
Write for the word read backwards and for the set of binary words of the form : the even-length palindromes , , , , , , and so on. As a generative object the language is as simple as they come: three rewriting rules produce it (Section 2.2). Loff, Moreira, and Reis (hereafter LMR) studied how much computational power the recognition-based grammars called parsing expression grammars have, and found both surprising positive examples and a natural negative conjecture [7, Conjecture 7, p. 10]:
The language of even-length palindromes has no PEG, i.e. .
An earlier paper [5] derives palindrome membership in PEG from a real-time multitape recognizer and a machine-to-scaffold compiler. Here we develop the persistent-record construction directly.
1.2 What this paper does
The recognizer stores the longest even-palindromic suffix and the context to its left. Its receipts make the next update accessible through a bounded number of record operations. The sequence interface and its source-level implementation evidence are treated separately in Section 11 and Appendix D.
The construction has two main ingredients:
- Receipt closure. Each input letter updates the longest suffix and its context using a fixed number of persistent sequence operations (Theorem 8.9).
- Simultaneous compilation. A bounded graph of fresh records, including fresh cycles, can be encoded in one scaffold node (Theorem 10.2).
1.3 How to read this paper
Sections 2–4 define the machine, distinguish words from their stored records, and give a running example. Sections 5–8 prove the receipt recurrence. Sections 9–12 compile and assemble the recognizer. The theorem numbers are retained from the previous edition.
2 Background: words, grammars, parsing expression grammars, and scaffolds
2.1 Words, languages, palindromes
An alphabet is a finite set of letters; in this paper unless stated otherwise. A word is a finite sequence of letters, is the empty word, is the set of all words, and is the length of . Juxtaposition is concatenation. A language is any subset of . The reversal of is ; reversal of a language is .
A word is a suffix of if for some , and a proper suffix if moreover ; prefixes are defined symmetrically. The empty word is a proper suffix of every nonempty word. A palindrome is a word with ; an even palindrome is a palindrome of even length, equivalently a word of the form . The empty word is an even palindrome. Thus and because reversing gives again.
When a palindrome occurs as a suffix of a word , the letter of immediately to the left of that occurrence will matter constantly; we say the occurrence is preceded by that letter. The empty suffix of a nonempty word is preceded by the word's last letter; the empty suffix of is preceded by no letter.
2.2 Context-free grammars: the generative reading
A context-free grammar has terminal and nonterminal symbols, a start symbol, and rules that replace one nonterminal by a finite string of symbols [2, pp. 120–122]. It generates the terminal words reachable from its start symbol.
Example 2.1 (even palindromes are context-free). With start symbol and rules the derivation produces , and in general the generated language is exactly : each rule adds one matching letter at each end, and every arises by choosing the letters of in order. The reading is existential: a word belongs to the language if some sequence of choices produces it. Nothing in the definition says how a machine would discover those choices.
2.3 Parsing expression grammars: the recognition reading
Parsing expression grammars, introduced by Ford [3, §3], use rule shapes that look like context-free rules but give them an operational meaning. We follow the formalization of LMR [7, Definitions 1–4], which is the one their theorem is stated for.
Definition 2.2 (parsing expressions and grammars). Fix disjoint finite sets of terminals and of non-terminals. Parsing expressions are built from the atoms , , (accept the empty word) and by three constructions: sequence , ordered choice , and the predicates and . A parsing expression grammar assigns to each non-terminal one expression , written , and names a start non-terminal .
The meaning of an expression is a recognition procedure that reads an input word from the left and either fails or succeeds consuming a prefix of [7, Definition 3 and Algorithm 1]:
succeeds consuming nothing; fails; the terminal succeeds consuming if begins with , and fails otherwise.
Sequence : run on ; if it succeeds consuming , run on the remainder; succeed consuming if both succeed, otherwise fail.
Ordered choice : run ; if it succeeds, that is the answer; only if it fails is run on the same input.
Predicates: succeeds consuming nothing if fails, and fails if succeeds; succeeds consuming nothing if succeeds.
A non-terminal runs .
A grammar is total when recognition terminates on every input. We use complete-match recognition: a word is accepted only when the start expression consumes the entire input. Let denote the languages of total PEGs [7, Definition 4].
Example 2.3 (order is semantic). Take and the input . The first alternative succeeds consuming , so the choice commits to it: , and although the second alternative would have consumed it. As a context-free grammar, generates . Ordered choice is not a parsing strategy for a context-free grammar; it changes the language. (Ford proves the corresponding algebraic fact: sequence distributes over ordered choice on one side only [3, p. 7].)
Example 2.4 (predicates see ahead without consuming). The expression succeeds exactly at the end of the input, consuming nothing, because it succeeds only where no letter can be read. Predicates let a PEG test a property of the remaining input and then parse it again. It is known that the non-context-free language has a PEG [7, p. 3, citing Aho and Ullman], and LMR use predicates to recognize the palindromes of power-of-two length [7, Theorem 8, p. 10].
2.4 Why comparing the two classes is not a syntactic matter
The context-free alternatives in Example 2.1 cannot simply be read as ordered PEG choices: a successful alternative commits before a later failure can reconsider it. We instead use LMR's machine characterization below.
2.5 Scaffolding automata
A scaffolding automaton reads one letter and appends one immutable graph node per step. It chooses the new label and outgoing edges from a fixed-radius labelled unfolding of the previous top. Edges may point to boundedly accessible old nodes, the new node itself, or nowhere.
Definition 2.5 (scaffold). Let and let be a finite alphabet. A -scaffold with top has nodes , a label for each node (: the base is unlabelled), and for each node and each port a target (edges point backwards or to the node itself; means the port is missing). A port word over is followed from a node by taking port , then port of the node reached, and so on; it is valid from if no missing port is met, and then it has an endpoint. The -neighbourhood of a node is the labelled tree of depth obtained by unfolding ports from : it records the label of every node reached by a port word of length at most , and where a port is missing. The tree records labels, not node numbers, so it does not reveal whether two port words reach the same node.
Definition 2.6 (scaffolding automaton). A scaffolding automaton is a tuple : an input alphabet , a degree , a working alphabet , a distance , a finite set of control states with initial state and accepting states , and a transition function where is the set of possible -neighbourhoods. The computation on starts from the scaffold consisting of the base node alone and the state . At step the machine computes , where is the current top, and appends node with label and ports The new state is . The word is accepted if the state after the last letter lies in ; is the set of accepted words, and we write when some scaffolding automaton decides .
Three points deserve emphasis. The descriptor (the empty port word) names the old top itself. The descriptor lets a new node point to itself; it is part of LMR’s model, not an extension. And the machine cannot test whether two observed nodes are the same node: it sees a tree.
2.6 The exact correspondence with PEGs, and why reversal appears
Theorem 2.7 (Loff–Moreira–Reis [7, Theorem 16, p. 21]). A language is in if and only if its reversal is decided by some scaffolding automaton. In particular, if a finite scaffolding automaton decides , then is recognized by a total complete-match PEG.
We use the scaffold-to-PEG direction. The reversal causes no difficulty because .
2.7 Persistent data structures
A persistent data structure retains old versions after an update. Here records are immutable: updates create new records and may share old ones, but cannot change their fields.
The key consequence is structural sharing. If a list is represented as a chain of pairs, then creates one new pair pointing at the old chain ; the old list and the new list share everything but that pair, and neither can tell (Figure 3). A structure that needs to "copy" an unbounded old part can instead point to it.
A steque supports insertion at either end and removal at the front. A catenable steque also joins two sequences. We require worst-case bounds for every operation, independent of sequence length; Section 11 states the exact interface.
2.8 The mutable palindrome index, and why a scaffold cannot have it
Algorithms that maintain all palindromes of a growing word use a palindromic tree (the eertree of Rubinchik and Shur [8, §2.2]): one node per distinct palindrome, a suffix link from each node to its longest proper palindromic suffix, and, added whenever it is first discovered, an edge labelled from the node of to the node of . Discovering that edge means walking suffix links from the current node until a node is found whose occurrence is preceded by ; the walk can be long, but its cost is amortized and the edge is then stored at the old node, so it is never needed again.
A scaffold can do neither thing. It cannot walk an unbounded chain within one step (it sees distance ), and it cannot add an edge to an old node. The present paper shows what must be stored instead: not a pointer from a palindrome type to a type, but a pointer carried by each occurrence to the particular historical record that the next step will need. Section 7 records, with small counterexamples, why each cheaper idea fails.
3 Words, records, and scaffold nodes
For the prefix already read, we factor where is its longest even-palindromic suffix and retain . This level contains ordinary words and exact identities.
Palindrome occurrences, typed suffix-link receipts, and receipt ropes expose exactly the historical objects needed by the next transition. Sharing occurs here; a stored receipt is a pointer to a particular record, not merely the name of a palindrome string.
A single physical node tuple-packs all logical records born at one input time. A logical pointer is decoded as a physical historical node plus a finite slot tag.
A palindrome type is a word; an occurrence is a particular interval of the input. The record's semantic fields depend on its type, but its physical address belongs to its occurrence. Receipts preserve access to a suitable historical record without modifying a type-global table.
4 A running palindrome trace
For each prefix , let be its longest even-palindromic suffix and write . The recognizer accepts exactly when . Table 1 follows the input 00011001.
An external update matches the first context letter; an internal update selects a suffix inside the current palindrome; a reset leaves the empty palindrome.
| old | old | old | case | new | new | ||
|---|---|---|---|---|---|---|---|
| 1 | 0 | reset | 0 | ||||
| 2 | 0 | 0 | 0 | external | 00 | ||
| 3 | 00 | 0 | 00 | internal | 00 | 0 | |
| 4 | 000 | 1 | 00 | 0 | reset | 1000 | |
| 5 | 0001 | 1 | 1000 | external | 11 | 000 | |
| 6 | 00011 | 0 | 11 | 000 | external | 0110 | 00 |
| 7 | 000110 | 0 | 0110 | 00 | external | 001100 | 0 |
| 8 | 0001100 | 1 | 001100 | 0 | internal | 1001 | 1000 |
After the second letter, . The third letter gives an internal update to another occurrence of 00. Row 8 will illustrate the receipt and scaffold representations in Examples 8.10 and 12.1.
II Persistent palindrome state
5 The occurrence-context recurrence
The state tracks the longest even-palindromic suffix and its left context. The recurrence below avoids searching an unbounded suffix-link chain.
5.1 Definitions
Let be the input prefix read so far. Let be its longest even-palindromic suffix and write The word is the left-context stack of the current occurrence; its first letter lies immediately to the left of .
Definition 5.1 (selected suffix and displaced chunk). For an even palindrome and a letter , let be the longest proper even-palindromic suffix of for which for some word (that is, the longest proper even-palindromic suffix preceded by inside ), and put . Both are undefined when no such factorization exists.
When defined, is the suffix that can be extended by the next letter ; is the displaced context.
Definition 5.2 (suffix link, bridge, bridge block). For a nonempty even palindrome , let be its longest proper even-palindromic suffix (possibly ), called its suffix link. Write with ; the letter is the bridge of and is its bridge block. Because and are palindromes, , so is also a prefix of and At the word level we set by convention. At the record level, the typed receipt for this empty word is a distinguished empty record , which has no suffix-link field or bridge. Thus an occurrence of in a word equation means , while the same value stored in a receipt slot is represented by .
Example 5.3. For : , the bridge is (the letter before the suffix occurrence of ), , and ; indeed . For : , (the last letter), , . For : , , .
5.2 The three-case update
Theorem 5.4 (Occurrence-context factorization). After reading , the new longest even suffix and reversed context are exactly Moreover,
Proof. Every nonempty even-palindromic suffix of has the form , where is an even-palindromic suffix of immediately preceded by .
If the current longest suffix is externally preceded by , then is maximal. Removing that external letter removes the first symbol of . Otherwise every eligible is a proper suffix of , so maximality selects . Writing shows that the new context is and hence has reversal . If no eligible proper suffix exists, the longest even suffix is empty and the reversed full prefix is .
Finally is empty exactly when is empty, which is exactly when the whole prefix equals its longest even-palindromic suffix. ◻
In Table 1, rows 2, 5, 6, and 7 are external matches; rows 3 and 8 are internal-direct updates; rows 1 and 4 are resets. The final equivalence in the theorem explains why row 2 is accepting and the final row is not. The theorem also shows why keeping only the length of would be insufficient: the internal case must identify a particular suffix and the chunk that precedes it.
Example 5.5 (the two internal rows). At row 3 the old palindrome is and the context is empty. For the arriving , the only eligible proper even suffix is . Writing gives and . Hence and . The palindrome type has not changed, but its occurrence has: it now occupies the last two positions of rather than all of the preceding prefix. This is a small example of why occurrence context cannot be discarded.
At row 8 the old state is , , . The arriving letter is , so the external case fails. The factorization shows and . The recurrence gives and . The extra in is easy to omit when the factorization is read by eye; reversal then makes that omission visible at the front of the new context.
5.3 The transition table has fixed width
Lemma 5.6 (chunk recursion). Let be a nonempty even palindrome with suffix link , bridge , and bridge block . Then and for every letter , with the same definedness on both sides (for the right-hand sides are undefined).
Proof. Every proper even-palindromic suffix of is a suffix of , since is the longest one. The suffix itself is preceded by , so and the displaced chunk is . For , the suffix is not eligible, so every eligible suffix is a proper suffix of preceded by inside , which is the definition of ; writing gives , so . ◻
Example 5.7. For (, , ): , ; and , . Directly, and .
For the bridge letter, the suffix link supplies the transition. Every other letter reuses the suffix-link record's stored transition. The alphabet is fixed, so the table has fixed width.
6 Typed mirror receipts
Theorem 5.4 reduces online recognition to catenating type-indexed chunks. It does not yet say how a fresh occurrence obtains its suffix-link record without a search. The needed object is a typed receipt.
The word 001100 is a type; each interval spelling it is an occurrence. A receipt points to an old record of the required type.
Here "typed" specifies the palindrome represented by the target record.
Theorem 6.1 (Typed mirror receipt). Suppose an update selects a longest suffix occurrence of the old input that is immediately preceded by , and creates . Then The palindrome has a complete occurrence in the old input and a pre-existing birth record. One old typed pointer can therefore install the suffix-link field of .
Proof. Every proper nonempty even-palindromic suffix of is , where is a proper even-palindromic suffix of immediately preceded in by . Maximizing gives the displayed formula. Since is a palindrome, is also a proper prefix of ; that prefix ends before the newly appended final , so the complete occurrence lies in the old input.
At the first occurrence of any nonempty even palindrome , it is the longest even-palindromic suffix of the prefix ending there. Otherwise a longer even-palindromic suffix would contain as a proper prefix as well as a suffix, giving an earlier occurrence of . The online construction creates a record for the longest even-palindromic suffix at every step, so it has already made a birth record for . The empty case uses the distinguished empty record. ◻
The mirror theorem establishes that the required record occurs in the old history. The receipt construction must additionally expose a pointer to it at bounded depth.
The word "typed" is essential. A raw endpoint does not identify the needed record at bounded depth. Proposition 6.2 makes this precise for the following endpoint-only discipline: store, instead of a typed pointer, the time at which the mirror copy of the required palindrome ends, and recover the record by starting from the longest even-palindromic suffix of the prefix ending there and following suffix links downward.
Proposition 6.2 (Endpoint-only escape). For , let . Its longest even-palindromic suffix is and the suffix link is . The mirror occurrence of ends at the historical prefix , whose longest suffix-link chain is Recovering from that untyped endpoint takes exactly suffix-link steps.
Proof. The suffix is an even palindrome, and no longer suffix of can be a palindrome because any such suffix begins inside the initial zero block but contains its unmatched asymmetrically. Its longest proper even suffix is . The prefix copy of that selected by the mirror argument ends at time . At that time the input is , whose longest even suffix is the whole prefix and whose proper even suffixes decrease by two zeros at each link. Starting at reaches after links. ◻
This rules out the endpoint-only representation; it is not a lower bound against all scaffolding automata.
7 Why simpler representations fail
The following counterexamples explain why the representation needs occurrence receipts, anchor information, and stored direct transitions.
7.1 Why an immutable type table is not enough
If one record is created at the first birth of each palindrome type, it is tempting to copy a fixed-alphabet transition table from the suffix-link record, as the mutable palindromic tree would do: an entry for letter pointing to the record of the target type . The target of a later transition, however, need not exist when the source type is born.
Proposition 7.1 (Future transition after type birth). For , put , Then , so the transition selected by has target . The type is born by the end of the prefix , but is not a factor of that prefix. It becomes available only in a later history such as . Thus the immutable first-birth record of cannot already point to every future transition out of .
Proof. The word is the longest proper even-palindromic suffix of that is immediately preceded by , giving . Any occurrence of contains two symbols separated by zeros. In the only adjacent symbols lie at its center, so no such factor occurs. In , the separator together with the initial block of the second copy gives an occurrence of . This event is strictly later than the birth record of . ◻
A table fixed at a type's first appearance cannot include this later transition. The construction therefore transports receipts with occurrences.
7.2 Why raw persistent words are not enough
A persistent rope can share the letters of a context perfectly. Receipts, however, depend on the palindrome around which those letters are interpreted.
Proposition 7.2 (Anchor dependence). For the fixed one-letter block and anchors , Consequently the same raw rope cell requires infinitely many distinct typed receipt targets as its anchor varies.
Proof. The word is an even palindrome. Its longest proper even palindromic suffix is . These target types are distinct as varies. Hence a receipt attached only to the raw letter block cannot be correct for all anchors. ◻
This proposition does not forbid structural sharing of the underlying word. It says that the positive object must be an anchored receipt path, and that later reuse must justify why the receipt shadow survives a legal change of physical anchor. Lemma 8.3 supplies exactly that justification.
7.3 Why bounded bridge chasing is not enough
One might defer the missing transition and repeatedly follow the suffix link, testing the bridge letter at each record. The following family makes the number of failed tests arbitrary.
Proposition 7.3 (Bridge-chasing escape). For and , let These are even palindromes. For , whereas the bridge of is . The search for the -transition from therefore makes exactly failed bridge tests before reaching the variable target .
Proof. The word is unchanged by reversal, so it is an even palindrome. The suffix beginning after the first block is and is palindromic. No longer proper suffix is palindromic: a suffix beginning inside the first has fewer initial zeros than terminal zeros and meets a while its reversal is still inside the terminal zero block; a suffix beginning in the following starts with and ends with . Hence is the longest proper even-palindromic suffix. The letter immediately before it is the second of the removed block.
Thus each of the first records rejects the requested bridge letter and delegates to its suffix link. At , the bridge letter before its longest proper even suffix is (for , is preceded by the last letter ), so the recursion stops. There are exactly failures, and is unbounded. ◻
The proposition refutes bounded bridge chasing for this representation. It does not refute recursively stored direct transitions: the final construction materializes the same recursion persistently, so the transition selected in a later step is already at bounded depth.
| Attempt | What it preserves | Escape family | Information retained finally |
|---|---|---|---|
| Historical endpoint | where the mirror copy ends | : target lies links below the historical maximum | direct typed pointer to the required record |
| Immutable type-birth table | canonical suffix-link type | : a needed target is born later | occurrence-indexed transition receipt |
| Anchor-free word rope | persistent raw context letters | the block over anchors needs different receipts | headered anchored receipt path |
| Bounded bridge chase | correct recursive selector equation | forces exactly failures | persistently materialized direct/reset rope |
We now construct anchored receipt ropes whose shared tails retain their required receipts.
8 Receipt ropes and shadow transport
8.1 What a receipt rope represents
A rope for context stores each letter together with the receipt needed if that letter extends the current palindrome. Its header is the receipt for the current anchor.
8.2 Definitions
Definition 8.1 (anchored path, receipt trace, headered rope). For an even palindrome and a word , define the anchored path by and write for its final palindrome. Cell of the path stores . Its receipt trace is and its headered form is whose first component is the header and whose sequence of cells is the body. Palindrome words in a receipt position denote typed pointers to the particular occurrence records supplied by the construction, not mere type tags. In particular, the displayed header of a rope anchored at is physically represented by .
Taking a tail promotes the first cell's receipt to the new header. Sharing a tail is valid only when its receipt trace, as well as its letters, agrees.
Example 8.2. The live context at row 7 of Table 1 is : the header is , and the one cell records that after an external match by the palindrome would have suffix link .
8.3 The bridge-shadow identity
The physical palindrome states in a retained context tail can change after a prepend or reset. The next lemma shows that the typed receipt trace does not. Its two anchors and are different words; the claim is that wrapping them through the same context produces the same sequence of suffix links.
Lemma 8.3 (Bridge-shadow identity). Suppose , , and is the longest even-palindromic suffix of . If , or if the first letter of differs from , then
(The statement allows : then is any nonempty even palindrome with , and the hypothesis on says has no nonempty even-palindromic suffix.)
Example 8.4. , , , : the hypotheses hold (; has longest even-palindromic suffix ), and indeed .
Proof. For a letter and even palindrome , put . Every proper even-palindromic suffix of is a suffix of . Hence
Write , put , and define Both and end in the same word , of length . We prove for every that
For , the hypothesis and (1) give . This common palindrome is a proper suffix of , so its length is at most .
Assume (2) at . Since is shorter than the common suffix , the letter immediately before its terminal occurrence lies inside . It is therefore the same bridge letter in and . Equation (1), with , now gives the same next receipt on both sides: it is either when is that common bridge, or otherwise.
It remains to retain the strict length bound. In the second case . In the first case the only way could reach is, by parity, that is odd and . Then the common suffix has the form . Because is a palindrome, is an even-palindromic suffix of strictly longer than : the word is a prefix of . This contradicts the maximality hypothesis. Thus (2) follows by induction, and its receipt equalities are precisely . ◻
The length inequality keeps the next inspected bridge inside the proper suffix and allows the induction to continue.
8.4 Direct and reset ropes, and the mirror-prefix lemma
For nonempty with suffix link , bridge , and bridge block , write When is defined, define the direct headered rope When it is undefined, define the reset rope The direct rope is the context rope that the internal case of Theorem 5.4 will need: it is anchored at the palindrome that the letter creates, and its cells carry the receipts for the displaced chunk that becomes the front of the new context. The reset rope is the analogue when nothing can be wrapped: anchored at , its cells carry the receipts for the whole failed candidate .
The next lemma identifies the final receipt used in Theorems 8.7 and 8.9.
Lemma 8.5 (Mirror-prefix lemma). Let be a nonempty even palindrome and a letter.
If is defined, the final palindrome of is , and .
If is undefined, the final palindrome of is , and .
In both cases the last receipt of the rope is the anchor's source itself.
Proof. (1) Write with and . Wrapping through gives . Since is a palindrome with prefix , the word is also a suffix of , and it is a proper even-palindromic suffix. Suppose a longer proper even-palindromic suffix existed, with a nonempty suffix of , even. Palindromicity of gives , so has period : its suffix of length equals its prefix of that length, and since is a palindrome that prefix is the reversal of ; hence is an even palindrome. The same equality identifies with the prefix of of length , so the terminal occurrence of in is preceded by the last letter of , which is because is a suffix of . By maximality of , , i.e. ; so and is not proper, a contradiction.
(2) Wrapping through gives , a palindrome with prefix , so is a proper even-palindromic suffix. If a longer proper one existed, with a nonempty suffix of of even length, the same periodicity argument shows that the suffix of of length is an even palindrome. When , the equality identifies with the corresponding prefix of ; because ends in , the terminal occurrence of is preceded by , which would make defined. And forces , i.e. , not proper. ◻
Corollary 8.6. With as above and : if is defined, write ; then . If is undefined, then .
Proof. By Lemma 5.6, is defined iff is (for both are undefined). Apply Lemma 8.5 to in place of : the final palindrome of is , and that of is . (For the second case reads .) ◻
8.5 The receipt-rope recurrence
Theorem 8.7 (Receipt-rope recurrence). Let be the header receipt of . For , and, whenever is defined,
The off-bridge rope is the old corresponding rope, one new bridge cell, and the shared tail of the bridge rope. The proof must establish equality of their receipts as well as their words.
Proof. Raw words. Let . By Lemma 5.6, with the same definedness, and . Hence, when defined, is anchored at the same palindrome as and wraps through , then , then ; by the catenation law its first cells are literally those of , its next cell has letter , and its remaining cells are where with . In the reset case, similarly begins with the cells of , continues with a cell, and ends with where . On the other side, since and .
Receipts. Put (direct case) or (reset case), so that , and write with its last letter ( is nonempty because ). We claim ; the first entry of this identity is the statement that the cell of (resp. ) carries , and the remaining entries identify with receipt by receipt.
Apply Lemma 8.3 with , , and . Its hypotheses hold: has bridge and by Corollary 8.6; and is with its first letter removed, whose even-palindromic suffixes are exactly the proper even-palindromic suffixes of , the longest being . The lemma gives agreement of the receipts on all cells except the last. For the last cell, the final palindromes are (resp. ) on the left and on the right; both have suffix link by Lemma 8.5. Hence , which is the displayed identity.
Definedness. is defined iff is, by Lemma 5.6; and is defined (i.e. undefined) iff is. ◻
Example 8.8 (the recurrence on ). Here , , . For : , , so and the recurrence predicts . Direct computation of gives the same five cells. The shared tail is anchored at on the left and at on the right; the two anchors differ, and their receipts agree.
8.6 Full receipt closure
Theorem 8.9 (Full abstract receipt closure). Over a fixed alphabet, every nonreset update obtains a fresh occurrence record, its complete direct/reset rope table, and the updated live context from old receipts by a fixed number of head, tail, singleton, inject, and catenation operations. On reset, only the live rope is updated and the occurrence root becomes the fixed empty record.
This is closure under sequence operations. Section 11 supplies the interface needed to implement those operations with bounded records.
Proof. Suppose the update creates , where is the old longest suffix (external case) or (internal case), and let as given by Theorem 6.1. Select the old rope when is defined and the old reset rope otherwise; call it the source rope. Its body is nonempty (its word is , resp. , and both are nonempty); write the body .
The bridge of is . If is defined, write ; then , so the bridge of is the last letter of , which is the first letter of , i.e. . If is undefined, , the bridge of is its last letter , and the first letter of the reset rope’s word is .
The header of is . The header of is . The first cell of the source rope is obtained by wrapping its anchor (, resp. ) by , so its receipt is .
The body of is followed by . By (i), with , so , while the source rope’s word is (in the reset case and the source word is ). So wraps through the same letters as the source rope after its first cell, followed by one final letter . By the catenation law the cells coincide with , and the final cell has letter and receipt by Lemma 8.5. In symbols, Operationally: pop the source body, inject the terminal cell , and reuse the old header .
The suffix-link pointer of . In the external case and is the receipt stored in the first cell of the live rope , which the pop of (3) below promotes to the new header. In the internal case is the header of the old entry , whose anchor is . In both cases one old receipt names a record of type .
Every other entry of the fresh record follows from (2), Theorem 8.7, and the finite alphabet: for , the rope or is (resp. ) catenated with the singleton and with —two catenations on ropes read from the record of , which is reached by the pointer of (iv). The bridge transition receipt is the suffix-link receipt ; every off-bridge direct transition receipt is copied from the corresponding entry of the record for .
Let be the live context rope. The three cases of Theorem 5.4 give where denotes the old palindrome. The first case is the catenation law read backwards. In the second case the new live rope is , and the tail is anchored at where ; in the third case the tail is anchored at . Lemma 8.3 applies to , , and : by Lemma 8.5 (applied to and ), the bridge of is , either or its first letter differs from , and , of which is the longest even-palindromic suffix by definition. So the old body is literally reusable even though its concrete anchor changes. Equations (2)–(3) use a fixed number of rope primitives and old fields. ◻
Example 8.10 (row 8 at the rope layer). Before row 8 the state is , , with live rope . The letter is , the internal case with , and the fresh palindrome is . The source rope is since is undefined; so , , , and (2) gives which agrees with the direct definition . The suffix-link pointer of the fresh record is the header of , namely , the empty record. The new live rope by (3) is which is computed directly. The last cell was created at row 7 around the anchor and is now read around the anchor ; its receipt is unchanged. The terminal cell of the fresh bridge rope points at the fresh record itself: this is the cycle of Part III. What generalizes: every nonreset update has exactly this shape. What is incidental: the particular lengths.
III Turning bounded records into a scaffold
9 The cyclic allocation obstacle
9.1 Records, fields, and batches
From here on a record is a finite tuple with a finite tag, a finite payload (such as a letter), and a fixed number of pointer fields, each of which is missing or points to a record. A persistent program holds a fixed number of roots (pointers kept in finite control) and, at each step, reads old records by following fields from the roots and creates a finite batch of fresh records. The fresh batch is a finite labelled directed graph: its vertices are the fresh records (slots for some bound ), and each field of each slot is missing, points to an old record, or points to a slot.
Strict sequential allocation permits references only to old records or previously allocated records. A simultaneous batch instead specifies a finite adjacency table whose edges may target any fresh slot.
9.2 The cycle the palindrome construction forces
The obstruction is already visible in equation (2) of the closure proof. A fresh palindrome occurrence record stores the root of its bridge rope . The final fresh cell of that rope stores the typed receipt . Thus Both edges are semantic requirements of the same input transition. Neither endpoint can be replaced by an old record, and neither ordering of the two fresh objects makes all pointers backward. Example 8.10 exhibits the cycle concretely: the record for and the cell are both created at row 8 and point at each other.
The batch is a finite labelled graph. Its specification requires no recursive evaluation of the owner/rope cycle.
10 Bounded simultaneous record transducers
We now define the source machine precisely and compile it into the scaffold model of Definition 2.6. This section is independent of palindromes: a reader may regard its input as an arbitrary bounded persistent-record update.
10.1 The source model
Definition 10.1 (Bounded simultaneous record transducer). Fix constants . A bounded simultaneous record transducer has current roots, allocates at most active slots per input symbol, gives each record pointer fields, and follows at most old-record fields from its current roots in one step. Its control states, record tags, and nonpointer payloads are finite.
After its bounded old observation, one transition chooses a finite labelled batch graph. Every new root and field targets one of: The last case includes self-loops, forward references, and mutual cycles. The whole finite adjacency table is specified simultaneously. No fresh record is inspected while the plan is chosen, and control does not branch on whether two old addresses name the same record.
An old address is a root together with a sequence of at most field names; it is dereferenced by starting at the root and following the named fields. “Simultaneous” constrains dependencies rather than prescribing a physical allocation primitive. The plan may depend on finite control and bounded old structure, but it may not branch on a fresh record as though that record had already been evaluated. The adjacency table is output data of the transition. The initial roots may be missing or point into a fixed finite, immutable, pointer-closed initial record graph. The compiled decoder stores that graph and its initial roots as finite table data; those virtual records are present from time zero and are never charged to a fresh batch.
10.2 Tuple packing
Pack the at most logical records into finite slots of one physical node. The node label records the active slots, their tags, and the target-slot component of each pointer.
Theorem 10.2 (Simultaneous batch compiler). Every transducer of Definition 10.1 whose initial record graph is fixed, finite, immutable, and pointer-closed compiles exactly and letter-synchronously into a finite scaffolding automaton of degree and observation/update distance at most . The source transition uses only bounded labelled rooted unfoldings and does not branch on pointer identity; acceptance is in finite control.
Proof. Name the fixed initial records . Store their labels, fields, and initial roots in a finite decoder table. A logical pointer is missing, virtual (an index in this table), or dynamic (a physical node and slot). Virtual pointers need no scaffold edge.
At time zero an initialization flag selects the fixed initial roots and acceptance value. The first transition reads the table, creates only its at-most- dynamic records, and clears the flag. At later times a dynamic pointer uses the root or field port below. A virtual pointer is followed entirely inside the table: pointer-closure prevents a path entering it from returning to later dynamic records.
One physical scaffold node represents the complete logical batch at one input time. Its finite label records the active mask, every tag and payload, and for each of its ports the finite target-slot tag of the record that port stands for (when the target is present).
Ports represent the next roots. Port represents field of slot . Thus a decoded logical pointer is a pair of a physical scaffold node and a finite slot number.
A path that stays dynamic uses one root edge and one edge per field dereference. If it enters the virtual table, its remaining suffix is computed there; the physical descriptor is ignored for a virtual target.
Consider an old logical address that starts at root and follows fields , with . The current labelled unfolding reveals the slot reached after every prefix, because each slot tag is stored in the label of the node whose port is being followed, and that node lies within distance of the old top. Compile the address to the raw port word where is the slot tag at the preceding logical pointer. This word has length at most and reaches exactly the old target. The extra one in the distance bound is the initial root port; each logical dereference contributes one field port thereafter. LMR’s transition sees the labels of all nodes within distance (Definition 2.5), so suffices both to compute the word and to read the tags along it.
Use a missing descriptor for and the compiled word for an old target. For every fresh target use physical and record the intended logical slot in the new finite label. This rule makes no distinction between an earlier target, a later target, a self-loop, or one edge of a mutual cycle.
Assume that the old top decodes to the source roots and old heap. Induction on the length of an old logical address proves that its raw word decodes correctly: the base root port reaches the physical node named by that root and supplies its slot; each subsequent field port is selected using the current slot and supplies the next slot. Missing decodes to missing. A fresh descriptor reaches the new physical node by and then its target-slot tag selects exactly the requested fresh logical record.
Applying these facts independently to every root and field makes the decoded finite labelled adjacency table identical to the source batch. Notice that the induction is on an old address, never on the unfolding of a fresh cycle. Comparing two finite adjacency tables requires no fixed point. Tags, payloads, control, and acceptance are copied directly.
The virtual-initial-record base case and this one-step commuting square give the full run invariant by induction on input length. All parameter ranges, masks, labels, and plans are finite, so the compiled automaton is finite. ◻
A self-loop, forward reference, or mutual cycle in the fresh batch uses the same physical target with different finite slot tags.
Remark 32 (Where the cycle lives). The physical scaffold still has only backward edges and self-loops, exactly as LMR's definition requires. A logical record pointer is the larger coordinate , not the physical node alone. Following a physical edge keeps fixed while its finite edge tag changes the logical slot from to . An arbitrary finite cycle in the decoded fresh batch is therefore represented by one physical self-loop together with finite slot dynamics. The encoding has moved cyclicity from physical time into the finite decoder state.
11 Opaque-atom staging
The receipt update needs persistent sequences with the following list semantics and source-record properties.
11.1 The sequence interface
Let denote the sequence of token occurrences stored by a root . The operations satisfy:
The operation uncons(q) returns None exactly on the empty sequence; otherwise it returns its exact first token and a root for the remaining sequence. All operations preserve every old version, including when their inputs share structure.
In addition, the implementation is strict and immutable, uses a finite record signature and finite inspected data, and has a uniform bound on primitive evaluation steps. It copies and returns base tokens without inspecting them or testing pointer identity. Each old pointer comes from an input root by field selection or is copied from known fresh structure. Temporary control values do not escape. These properties are the sequence contract used in Theorem 12.2.
11.2 The inherited theorem and its model
Kaplan and Tarjan's theorem motivates this interface. Applying it here also requires the source-record properties just stated.
Theorem 11.1 (Kaplan–Tarjan [6, Theorem 5.1, p. 592]; source scope). On regular steques, push, pop, inject, and catenation have worst-case constant cost and return regular steques; catenation assumes two regular inputs.
Regularity is the invariant of their steque representation. Their purely functional model uses pair construction and projection, without memoization [6, p. 578].
Recursive pairs and buffers are structural data that an operation may inspect. Base tokens are opaque. In this application a token is the complete receipt cell, whose receipt field may eventually point to the fresh owner.
Theorem 11.2 (Opaque-atom staging). Let a strict purely functional sequence operation, parameterized by a base element type , use finite constructor tests and a worst-case bounded number of , , and operations. It may inspect the representation’s own pairs, buffers, and recursive child structures, but it may not inspect, compare, hash, traverse, or identity-test values of the base type . With new elements replaced by symbolic atoms, its branch and fresh structural allocation graph are determined by old structure alone. The graph is finite, acyclic, and uniformly bounded.
A symbolic element may denote a designated fresh payload record, and a fresh owner may store a fixed tuple of resulting roots. Adding those payload and owner slots to the structural skeleton forms one bounded simultaneous batch. Substitution is sound even when a payload field points back to the owner and creates a cycle.
Proof. Fix the old structural roots. A worst-case constant bound gives a uniform number of primitive evaluation steps. Replace each new element by a distinct symbol and follow the evaluation.
A constructor test, , or reads an old structural record or a structural record allocated at an earlier step. By hypothesis it never follows an element field. Its result and next branch are therefore independent of the symbols. A allocates one fixed-arity record whose fields are old pointers, earlier fresh structural pointers, or symbolic elements. Induction over the at most steps yields a bounded acyclic structural allocation graph independent of the symbolic values.
Now add the bounded fresh payload slots and the owner slot, replace each designated symbol by its payload slot, and fill the payload's receipt field with the owner slot where required. The owner stores its fixed tuple of result roots. The resulting cycle crosses from the owner to a structural root, then to an opaque payload cell, and returns to the owner. Structural evaluation never follows the payload field, so neither the sequence denotation nor the resource bound changes. Theorem 10.2 compiles the whole simultaneous batch, including that feedback edge, with . ◻
Implementation. Appendix D identifies the length-free four-operation source variant and the semantic and resource arguments used for it. The normalization theorem below states the source-record assumptions independently of that implementation.
Theorem 11.3 (Whole-client bounded symbolic normalization). Fix a finite immutable record signature. Let one deterministic strict client transition have a uniform bound on calls, constructor tests, loops, recursion, and retained fresh records. Suppose it observes only finite tags, finite nonpointer data, old records reached by bounded rooted addresses, and constructors of ordinary fresh structural records already known to its symbolic evaluation. It neither observes pointer identity or allocation state nor inspects an unresolved opaque atom, designated fresh payload, or designated fresh owner. Suppose also that every old pointer later read or retained has a bounded rooted provenance, temporary control packages do not escape, and unreachable failure leaves are completed by a fixed finite plan. Then the whole client normalizes to one bounded simultaneous record-transducer plan determined only by finite control, the input letter, and a bounded labelled unfolding of the old roots.
Proof. Represent every pointer during the step as missing, virtual, an old root followed by a field word, a fresh structural slot, or an opaque atom. Symbolically execute the bounded client. Inspecting an old pointer reads the corresponding node of the bounded old unfolding. Inspecting a fresh structural pointer reads the constructor and finite fields already stored for that symbolic slot, so every apparent same-step structural test is partially evaluated while the finite transition table is defined. Inspecting an unresolved atom or a designated fresh payload or owner is excluded. Because the program does not test identity, two old addresses may alias without changing a branch.
Strict structural allocation adds fixed-arity symbolic records. Transition-local options, bounded vectors, products, GADT witnesses, and result packages are eliminated by substituting their pointer expressions at their uses; they need no persistent slot because they do not escape. After structural evaluation, add the designated payload and owner slots and perform the opaque-atom substitution. This constructs a finite adjacency table rather than running more client code, so it may introduce self-loops, forward references, or mutual cycles without creating a new observation.
The old-provenance hypothesis translates every old target into a permitted bounded address. The allocation and width hypotheses bound the fresh table. There are finitely many control states, input letters, and labelled old unfoldings of the fixed depth, so the symbolic results form a finite transition table. Unreachable assertion and partial-result leaves receive the fixed rejecting plan and do not affect the run from the valid initial state. Thus the sequential client and simultaneous plan have the same retained roots, record graph, control, and acceptance bit, up to fresh-slot renaming. ◻
Finite-access lemma. Suppose a client executes at most primitive steps. Pointers start at old roots or fixed virtual records; primitives copy pointers, select fields, and construct fixed-arity records. Then every old pointer inspected or retained has a bounded address from an original root.
Proof. Give an old root level zero. Copying preserves its level; selecting a field of an old record increases it by one. Selecting a field of a known fresh record substitutes the pointer expression stored there, introducing no old edge. If a primitive performs several selections, expand it into individual selections. Induction over the at most steps bounds every old expression by . Virtual records are resolved in their fixed table. Retaining an old subtree needs only its root expression, not a traversal of all its descendants. The argument therefore bounds both reads and exposed old pointers, including those passed between calls. ∎
For a concrete program, a finite acyclic call graph with bounded vector folds supplies such a after each called primitive is expanded. A finite source file alone would not: recursive calls, unbounded loops, or unbounded primitives must be excluded.
Pointer-identity tests, inspection of unresolved payload atoms, and unbounded traversal are excluded by the hypotheses. Each would invalidate the symbolic evaluation argument.
In the palindrome client, the external acceptance test inspects the structural tail returned by the first uncons; later catenations also consume earlier results. These are known fresh structural values during symbolic evaluation. The newly designated receipt cells and owner are not inspected. The external and internal branches use at most eight sequence calls each; reset uses two (Appendix B). The sequence contract and the finite-access lemma thus give a uniform bound for the complete client.
12 A direct palindrome scaffold
12.1 The record layout
We assemble the construction. The persistent program keeps roots: the current occurrence record and the live context rope. Finite control remembers whether the current palindrome is empty and the acceptance bit determined by whether the live rope has empty body.
An occurrence record for a nonempty palindrome has the following fields.
A suffix-link field: a typed pointer to a record of type , or the empty record if .
A bridge payload: the letter .
For each letter , a table entry, which is either direct; a tag, a typed pointer to a record of type (the transition receipt), and the rope root of —or reset; a tag and the rope root of .
The empty record has no suffix link and no bridge, and its two entries are the reset ropes ; it belongs to the fixed virtual initial graph and is decoded from time zero. A rope value is a header receipt together with a steque root whose elements are cells .
For the explicit source-resource certificate, this logical layout has three physical record shapes. An occurrence owner has seven direct pointer fields: suffix; transition, header, and body for entry ; and transition, header, and body for entry . Its bridge and two direct/reset tags are finite payloads; a reset tag guards a missing transition pointer. A live-rope record has header and body fields. A cell record has a finite letter and one receipt pointer, and its pointer is the opaque element stored by the sequence. Table entries and their rope pairs are therefore flattened into the owner rather than separately boxed. The two roots remain the owner and live-rope records.
The transition receipts materialize the chunk recursion of Lemma 5.6 persistently: for the bridge letter the transition receipt is the suffix link (), and for the other letter it is copied from the corresponding entry of the suffix-link record (), one old pointer read at creation time. This is what Proposition 7.3 demanded: the selector that a later step needs is already at depth one, not at the end of a chain.
12.2 One step
On input , inspect the live rope’s first cell and the -entry of the current record. The old live-rope header is not read. Theorem 5.4 selects the case: external if the first cell's letter is ; internal if the -entry is direct; reset otherwise. Then:
Source rope: the -entry rope of the current record ( or ). Suffix link of : the receipt in the first cell of the live rope. Live rope: pop.
Source rope: the -entry rope of the record of , reached through the -entry’s transition receipt of the current record. Suffix link of : the header of the current record’s -entry rope . Live rope: catenate with the body of the old live rope.
No fresh occurrence record; the root becomes . Live rope: catenate with the body of the old live rope.
In the two nonreset cases the fresh record is filled by Theorem 8.9: bridge and bridge rope from the source rope by one pop and one inject (equation (2)); transition receipt for equal to the suffix link; for the other letter , transition receipt copied from the -entry of the suffix-link record and rope built by Theorem 8.7 with two catenations. Theorem 11.2 stages each opaque sequence operation, and Theorem 11.3 symbolically composes the complete eight/eight/two client into one old-dependent simultaneous plan. Theorem 10.2 appends that batch as the one scaffold node required for the arriving letter. Acceptance is the finite empty-body test on the live rope (Theorem 5.4).
Example 12.1 (row 8 at the scaffold layer). After 00011001, the new owner represents 1001. Its suffix receipt points to the virtual empty record. The owner stores the header and body pointers of its two table ropes directly; the live rope has a separate root record. A fresh terminal receipt cell in the bridge rope points back to this owner.
Assign the owner, live-rope record, new cells, and sequence records distinct slots of the same new scaffold node. Each reference between them becomes a SELF edge with its target-slot tag. References to existing receipts and shared sequence tails keep their old targets. This realizes the owner/rope cycle while leaving every older scaffold node unchanged.
12.3 Uniform constants
Fix a sequence implementation satisfying Section 11.1. The client schedules are finite, so the finite-access lemma and Theorem 11.3 give constants for allocation, record width, and old-address access, independent of input length. The initial empty owner and ropes are virtual records.
With two current roots, the compiler gives The argument uses existence of these constants. Appendix B records the implementation's allocation inventory; no numerical radius is used in the theorem.
12.4 The run invariant and the theorem
After reading a prefix :
the decoded occurrence root names a record for the current occurrence of the longest even-palindromic suffix (the empty record if );
the decoded live-rope root denotes ;
every table entry in every reachable occurrence record has the word and receipt semantics of Section 8 (its rope is or of its record’s type, and its transition receipt, when present, names a record of type of that type); and
finite control marks acceptance exactly when the live rope has empty body.
The empty initial prefix satisfies the invariant using the distinguished empty record and empty rope. One application of the word recurrence chooses the right abstract update; receipt closure proves the new decoded objects have the required semantics; opaque staging and the compiler prove that the single new physical node decodes to those objects. This is the induction performed in the final theorem.
Theorem 12.2 (Direct palindrome construction). For a persistent sequence implementation satisfying the contract of Section 11.1, the receipt construction recognizes the binary even-palindrome language with a finite scaffolding automaton. If the complete client has source-record bounds , it has degree and distance at most .
Proof. The fixed virtual empty-owner graph satisfies the run invariant. On each input letter, Theorem 5.4 selects the exact word update and Theorem 8.9 supplies its occurrence record, table entries, and receipt rope. The sequence laws preserve those denotations. Opacity permits the fresh receipt cells to remain symbolic under Theorem 11.2. The finite client schedule and finite-access lemma meet Theorem 11.3, including the external tail-emptiness test, and produce one bounded simultaneous plan. Theorem 10.2 encodes it in one scaffold node. The context is empty exactly for an even palindrome, which is the acceptance bit in finite control. Induction on input length proves the claim. ∎
Corollary 12.3 (Direct PEG route). Under the sequence contract in Theorem 12.2, the construction yields a PEG for .
Proof. Loff–Moreira–Reis Theorem 2.7 sends the scaffold language of Theorem 12.2 to a complete-match PEG for its reversal. The reversal of is again of the form , so . ◻
13 Relation to the transfer construction
The earlier transfer paper [5] obtains palindrome membership from a classical real-time recognizer. The present construction exposes the stored state: occurrence receipts, anchored ropes, and a finite simultaneous batch. Its representation counterexamples concern only the specific interfaces in Section 7.
The compiler applies to any bounded simultaneous record update. The palindrome application additionally uses receipt closure and the sequence contract. Both routes use the Loff–Moreira–Reis correspondence to obtain a PEG.
14 Supporting evidence
The receipt, compiler, and normalization arguments are written proofs. Bounded word and graph checks test the recurrence, shadow transport, receipt closure, and batch decoding. Source audits address the separate sequence contract and resource accounting. The proof and evidence index links those records.
This work was developed with AI assistance. The recorded AI reviews share model dependencies; no external specialist review is recorded.
A Notation
Table 3 collects the symbols whose meanings cross more than one proof layer. A symbol naming a word is not silently identified with the record that represents an occurrence of that word.
| Symbol | Meaning |
|---|---|
| input prefix, factored at its longest even-palindromic suffix | |
| reversed occurrence context; its head is immediately left of | |
| suffix-link word: longest proper even-palindromic suffix of nonempty ; by convention | |
| , | bridge letter and bridge block: |
| longest proper even suffix of immediately preceded by | |
| reversed word displaced into context when is wrapped | |
| , | anchored palindrome path obtained by wrapping through , and its final palindrome |
| , | its receipt trace; its headered rope |
| direct receipt rope when exists | |
| reset receipt rope when does not exist | |
| the live context rope | |
| the distinguished record representing a typed receipt to the empty palindrome | |
| , | scaffold descriptors: the node being appended; no edge |
| decoded logical record: physical node and finite slot | |
| roots, slots per step, fields per record, old dereference radius |
B Client operation inventory
The complete schedules include observations used for branching and acceptance:
| Branch | Sequence calls | Allocation expression |
|---|---|---|
| External | 3 uncons, 2 single, 3 cat | |
| Internal | 2 uncons, 2 single, 4 cat | |
| Reset | 1 uncons, 1 cat |
Here bound the respective operations; the terms count client records in the chosen layout. The flattened layout has a seven-pointer owner, a two-pointer live-rope wrapper, and one-pointer cells. The archived fixed-client allocation audit reports . These implementation-specific ceilings are not needed for the qualitative theorem.
C Supporting files
The evidence index separates the word recurrence, receipts, compiler, sequence implementation, and assembled client. The typed-call inventory checks source bindings and bounded call recurrences. The constructor-flow analysis records progress toward an automated pointer-provenance proof.
D Sequence implementation
The length-free four-operation variant adapts the handwritten OCaml implementation of Viennot, Wendling, Guéneau, and Pottier [10], at upstream commit 444358e963db89b7d90a5065c4680ddd70248f82. It removes cached-length observations from the relevant interface and uses bounded endpoint probes. The facade exposes empty, single, uncons, and cat.
The supporting source arguments cover the deque list equations, the Buffer lower-bound invariant and assertion safety, allocation, and bounded calls. The relevant vector folds have at most six elements. Recursive sequence-wide folds elsewhere in the module are outside this facade's operation paths. The finite-access lemma applies to the bounded primitive evaluation, irrespective of the depth of recursively paired data.
These are informal source-level arguments for the contract in Section 11.1. The automated analysis does not yet establish complete old/fresh pointer provenance or a numerical access radius. The separate Rocq development proves properties of its own implementation; no checked correspondence to this handwritten source is used here. The implementation evidence and the generic conditional construction should therefore be read as distinct parts of the argument.
Acknowledgment of inherited work
Loff, Moreira, and Reis supply the scaffold/PEG correspondence; Kaplan and Tarjan supply the real-time catenable-sequence result; Viennot and coauthors supply the modern implementations. The receipt construction, simultaneous-record compiler, and normalization argument are the contributions developed here.
References
Source[1] Noam Chomsky and Marcel-Paul Schützenberger. The algebraic theory of context-free languages. In P. Braffort and D. Hirschberg, editors, Computer Programming and Formal Systems, Studies in Logic and the Foundations of Mathematics, pages 118–161. North-Holland, Amsterdam, 1963.
[2] James R. Driscoll, Neil Sarnak, Daniel D. Sleator, and Robert E. Tarjan. Making data structures persistent. Journal of Computer and System Sciences, 38(1):86–124, 1989. https://doi.org/10.1016/0022-0000(89)90034-2.
[3] Bryan Ford. Parsing expression grammars: A recognition-based syntactic foundation. In Proceedings of POPL 2004, pages 111–122. ACM, 2004. https://doi.org/10.1145/964001.964011.
[4] Zvi Galil. Palindrome recognition in real time by a multitape Turing machine. Journal of Computer and System Sciences, 16(2):140–157, 1978. https://doi.org/10.1016/0022-0000(78)90042-9.
[5] Joshua Gay. Real-time multitape languages transfer to parsing expression grammars. FPRD Lab review paper, released 5 August 2026. FPRD reading edition.
[6] Haim Kaplan and Robert E. Tarjan. Purely functional, real-time deques with catenation. Journal of the ACM, 46(5):577–603, 1999. https://doi.org/10.1145/324133.324139.
[7] Bruno Loff, Nelma Moreira, and Rogério Reis. The computational power of parsing expression grammars. Journal of Computer and System Sciences, 111:1–21, 2020. https://doi.org/10.1016/j.jcss.2020.01.001. Expanded preprint arXiv:1902.08272v2 (2020); definition and theorem numbers in this paper follow the preprint.
[8] Mikhail Rubinchik and Arseny M. Shur. EERTREE: An efficient data structure for processing palindromes in strings. European Journal of Combinatorics, 68:249–265, 2018. https://doi.org/10.1016/j.ejc.2017.07.021. Preprint arXiv:1506.04862.
[9] A. O. Slisenko. A simplified proof of the real-time recognizability of palindromes on Turing machines. Zapiski Nauchnykh Seminarov LOMI, 68:123–139, 1977. English translation in Journal of Soviet Mathematics, 15:68–77, 1981, https://doi.org/10.1007/BF01404109.
[10] Jules Viennot, Arthur Wendling, Armaël Guéneau, and François Pottier. Verified purely functional catenable real-time deques. arXiv:2505.07681v3, 3 July 2026. https://arxiv.org/abs/2505.07681v3.
Revision history
Draft 5, 21 September 2026. Consolidated the web and PDF editions; integrated virtual initialization into the compiler proof; stated the sequence contract in the direct construction; replaced the numerical distance claim with symbolic bounds; and shortened repeated exposition.
10 September 2026 corrections. The initial fixed graph is encoded in a finite decoder table. The six-call formulas were replaced by complete client schedules. The later proposed radii 55/874, client radius 1750, and scaffold distance 1751 remain withdrawn because the checker did not establish source-path coverage or pointer provenance.