Empty-list returns on an active characteristic spine #
An empty-list rule removes its active marker completely, so the final-list cancellation used for nonbase productions is unavailable. This file isolates the corresponding return problem and records the exact terminal displacement forced by equality of the two post-return forms.
If two prefixes become equal after terminal suffixes are appended, one prefix extends the other by a terminal word, and the same word is transferred between the suffixes.
A displayed final nonterminal followed only by terminals is a unique right marker, even when arbitrary nonterminals occur in its prefix.
A spine-level empty-return theorem supplies the exact semantic property expected by the LR-core reduction.
The three possible incoming edges of an empty-list occurrence #
A normalized top spine edge whose child is list q [] q.
- read {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {p : List (symbol T (Nonterminal M))} {suffix : List T} {source : State M} {a : T} {Z : StackSymbol M} {q : State M} (hparent : ActiveSpine M p (PDA_to_CFG.N.single source Z q) suffix) (htransition : (q, []) ∈ (emptyStackPDA M).transition_fun source a Z) (hrule : (PDA_to_CFG.N.single source Z q, [symbol.terminal a, symbol.nonterminal (PDA_to_CFG.N.list q [] q)]) ∈ (characteristicGrammar M).rules) : EmptyBaseEdge M (p ++ [symbol.terminal a]) q suffix
- epsilon {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {p : List (symbol T (Nonterminal M))} {suffix : List T} {source : State M} {Z : StackSymbol M} {q : State M} (hparent : ActiveSpine M p (PDA_to_CFG.N.single source Z q) suffix) (htransition : (q, []) ∈ (emptyStackPDA M).transition_fun' source Z) (hrule : (PDA_to_CFG.N.single source Z q, [symbol.nonterminal (PDA_to_CFG.N.list q [] q)]) ∈ (characteristicGrammar M).rules) : EmptyBaseEdge M p q suffix
- split {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {p : List (symbol T (Nonterminal M))} {suffix : List T} {source : State M} {Z : StackSymbol M} {q : State M} (hparent : ActiveSpine M p (PDA_to_CFG.N.list source [Z] q) suffix) (hlength : ↑[Z].length ≤ PDA_to_CFG.max_push (emptyStackPDA M)) (hrule : (PDA_to_CFG.N.list source [Z] q, [symbol.nonterminal (PDA_to_CFG.N.single source Z q), symbol.nonterminal (PDA_to_CFG.N.list q [] q)]) ∈ (characteristicGrammar M).rules) : EmptyBaseEdge M (p ++ [symbol.nonterminal (PDA_to_CFG.N.single source Z q)]) q suffix
Instances For
An empty return generated by an actual PDA transition, rather than by the structural empty right child of a stack split.
- read {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {p : List (symbol T (Nonterminal M))} {suffix : List T} {source : State M} {a : T} {Z : StackSymbol M} {q : State M} (hparent : ActiveSpine M p (PDA_to_CFG.N.single source Z q) suffix) (htransition : (q, []) ∈ (emptyStackPDA M).transition_fun source a Z) (hrule : (PDA_to_CFG.N.single source Z q, [symbol.terminal a, symbol.nonterminal (PDA_to_CFG.N.list q [] q)]) ∈ (characteristicGrammar M).rules) : EmptyTransitionEdge M (p ++ [symbol.terminal a]) q suffix
- epsilon {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {p : List (symbol T (Nonterminal M))} {suffix : List T} {source : State M} {Z : StackSymbol M} {q : State M} (hparent : ActiveSpine M p (PDA_to_CFG.N.single source Z q) suffix) (htransition : (q, []) ∈ (emptyStackPDA M).transition_fun' source Z) (hrule : (PDA_to_CFG.N.single source Z q, [symbol.nonterminal (PDA_to_CFG.N.list q [] q)]) ∈ (characteristicGrammar M).rules) : EmptyTransitionEdge M p q suffix
Instances For
Forgetting the transition-only tag gives the corresponding normalized empty edge.
A normalized empty edge which is not transition-generated has the exact visible-prefix shape of the right child of a split.
The only possible incoming spine edge of a characteristic single
nonterminal. Its parent is the corresponding nonempty list node, and the
terminal word stored in the child's suffix is exactly the completed right
sibling of that split.
- split {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {p : List (symbol T (Nonterminal M))} {parentSuffix z : List T} {source middle target : State M} {Z : StackSymbol M} {gamma : List (StackSymbol M)} (hparent : ActiveSpine M p (PDA_to_CFG.N.list source (Z :: gamma) target) parentSuffix) (hlength : ↑(Z :: gamma).length ≤ PDA_to_CFG.max_push (emptyStackPDA M)) (hrule : (PDA_to_CFG.N.list source (Z :: gamma) target, [symbol.nonterminal (PDA_to_CFG.N.single source Z middle), symbol.nonterminal (PDA_to_CFG.N.list middle gamma target)]) ∈ (characteristicGrammar M).rules) (hright : (characteristicGrammar M).DerivesRightmost [symbol.nonterminal (PDA_to_CFG.N.list middle gamma target)] (List.map symbol.terminal z)) : SingleBaseEdge M p source Z middle (z ++ parentSuffix)
Instances For
Every reachable active single occurrence is the left child of one
split edge.
Every active empty-list occurrence was introduced by exactly one of the three normalized edge forms above.
Operational factorization of an empty return #
Completing the visible prefix of an empty-list edge exposes one complete net-pop segment. The segment starts just before the edge's parent, removes its displayed stack symbol, and ends at the empty-list state with the saved stack context restored.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Transition-generated empty returns have the stronger factorization in which the net-pop segment consists of exactly one PDA step.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every normalized empty edge has an exact useful net-pop run after any chosen terminal completion of its visible prefix.
The one-step specialization of EmptyBaseEdge.returnRun for an actual
read or epsilon transition edge.
Every visible prefix of an empty edge has a terminal completion. In the
split case this explicitly completes the exposed left single; the retained
split rule guarantees that this nonterminal is productive.
A chosen terminal completion of the visible prefix upgrades a normalized empty edge to its exact-context concrete form.
A chosen completion similarly upgrades a transition-tagged empty edge.
Every syntax-facing empty edge has a concrete exact-context witness.
Every syntax-facing transition edge has a concrete transition witness.
An empty edge therefore always admits at least one concrete useful net-pop factorization.
The exact semantic return residual #
Uniqueness of normalized empty-return edges. All grammar syntax has
already been eliminated from this statement: its two witnesses are precisely
the three possible incoming edges of an active list q [] q node.
This is the empty-handle counterpart of IntroducingEdgesUnique. The
remaining proof is the useful-path/no-epsilon-cycle argument for the
normalized DPDA; the adapters below contain the entire derivation-spine and
rule-shape assembly.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A concrete paired-return classifier supplies normalized empty-return edge uniqueness. The synchronization proof may be plugged in here once available.
Normalized empty-return edge uniqueness implies the spine-native property used by the grammar proof.
Normalized empty-return edge uniqueness supplies the exact base-rule obligation expected by the LR core.
The complete unaugmented LR(1) core, parameterized only by the two normalized operational uniqueness statements.
The complete augmented LR(1) result, with every grammar-syntactic case already discharged.