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.
Exact 2DYCK PCFG prefix laws and positive paired-prefix mass
Statement
Fix . Independently expand each nonterminal of the grammar , , with respective probabilities , and read the yield from left to right. Equivalently, start with an empty bracket stack and repeatedly choose an opening bracket of either type with probability each, pushing its type; with probability , close the top bracket when the stack is nonempty, or emit and stop when it is empty. This defines a probability law on finite words followed by and on infinite bracket streams. For a valid bracket prefix , let and denote its opening count, closing count and final stack height. Its cylinder probability is
For every , let , summing over valid prefixes, and define . Thus conditions only on having emitted at least bracket tokens, without conditioning on eventual termination or exact total length. The target after a sampled prefix is its ordinary next token in the same process. At positive height its law assigns to each opening type and to the matching closing type.
For , let consist of prefixes whose last three symbols are an opening of type , an opening of type , and the closing of type , with independently ranging over the two types. These prefixes have positive final height and end in a closing bracket. Flipping the opening type at position is a fixed-point-free involution of into equal-mass pairs; paired prefixes differ only at this nonfinal position and their top unmatched opening types are opposite. Moreover,
The finite-word mass of a typed Dyck word of length is . The total finite-word mass is for and for . After conditioning on eventual termination, the finite-word probability law and all its prefix laws are exactly those of the preceding process with parameter ; consequently its survival-conditioned prefixes have the same pairing bound . Conditioning instead on exact word length yields the uniform law on typed Dyck words of that length, independently of ; that conditioning is different and does not retain the displayed next-token probabilities.
Statement references
Facts & Assumptions
Given: The independent grammar choices, stack process, valid prefixes and conditioning conventions in the Statement.
Proof
In a left-to-right grammar expansion, expanding the current nontrivially emits its opening bracket and leaves an inner , its matching closing bracket, and a following . Choosing finishes the current and either emits the pending matching close or, when no close is pending, ends the word. Thus each token is generated by precisely the stack transition stated above. The remaining choices after any finite emitted prefix are fresh independent choices. This constructs the stream law directly, including on nonterminating samples. Each valid prefix uniquely specifies the transition choices so far: every opening requires its type choice and every closing requires an epsilon choice. Their product is . In particular is the probability of reaching bracket tokens, is positive (all-open prefixes have positive probability), and is nonincreasing in . Conditioning on reaching does not constrain the fresh choice after the prefix.
The grammar is unambiguous: a nonempty Dyck word has a unique first opening, its matching closing, and the resulting inside and following Dyck words, which recursively determine the derivation. A word with bracket pairs has nonempty choices and epsilon leaves, proving its stated finite-word mass. To calculate total termination mass, the probabilities of trees having height below successive finite bounds start at and satisfy . Their increasing limit is the probability of a finite tree: every finite binary tree has finite height, and an infinite finitely branching tree cannot have bounded height. The limit is the least fixed point in , since iteration from zero stays below any nonnegative fixed point. The roots are and , giving the stated . The stream is finite exactly when the derivation is finite: every nonempty expansion emits an opening and any derivation with only finitely many nonempty expansions has only finitely many nodes.
Each prefix in is uniquely , where is a valid prefix of length . Such an extension is always valid, has height , and has the -opening as its top unmatched opening. Its cylinder weight is . Summing the four choices of and then all gives . Divide by and use monotonicity from step 1.1 to obtain the bound. Flipping changes no count, leaves the suffix pattern valid, and changes only position ; applying the flip twice restores the prefix. There are no fixed points, so its orbits are disjoint equal-mass pairs with swapped closing targets.
After a valid prefix of height , the left-to-right residual derivation contains exactly still independent subtrees (and pending closing brackets). Its probability of eventual termination is therefore . Consequently the termination-conditioned prefix cylinder is . The fixed-point equation gives . This is exactly with . The finite-word laws likewise agree, either by the same calculation including the final epsilon or directly from step 1.2. Applying step 2.1 with gives its pairing bound. Finally all typed Dyck words of a fixed length have the same mass by step 1.2 and there are finitely many of them, proving the uniform exact-length law and the asserted distinction of conditioning.
Used by
Dependency tree · 0 levels
Nothing. This result depends on no other item in the library.
Sources
- Hahn, Theoretical Limitations of Self-Attention in Neural Sequence Models, §6, Theorem 6 and footnote 4 (standard reference, not scraped)