Forward traces of zero-visible leftmost descent #
A zero-visible grammar tail alternates cost-free structural changes with epsilon transitions of the normalized empty-stack PDA. The grammar target state is irrelevant to the physical cut, but the boundary between the displayed stack and the hidden zipper context is essential. The positions below retain exactly that boundary.
Physical position of a zero-visible leftmost descent. Grammar return targets are omitted; displayed stack and hidden context remain separate.
- root {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} : LeftmostEpsilonPosition M
- single {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} (state : State M) (top : StackSymbol M) (context : List (StackSymbol M)) : LeftmostEpsilonPosition M
- list {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} (state : State M) (displayed context : List (StackSymbol M)) : LeftmostEpsilonPosition M
Instances For
The concrete PDA configuration represented by a position on a chosen unconsumed input tail.
Equations
- One or more equations did not get rendered due to their size.
- DPDA_to_LR.LeftmostEpsilonPosition.conf M input (DPDA_to_LR.LeftmostEpsilonPosition.single q Z context) = { state := q, input := input, stack := Z :: context }
- DPDA_to_LR.LeftmostEpsilonPosition.conf M input (DPDA_to_LR.LeftmostEpsilonPosition.list q gamma context) = { state := q, input := input, stack := gamma ++ context }
Instances For
Forget the target-state index of a characteristic nonterminal while retaining its physical displayed-stack boundary.
Equations
- DPDA_to_LR.leftmostEpsilonPositionOf M PDA_to_CFG.N.start context = DPDA_to_LR.LeftmostEpsilonPosition.root
- DPDA_to_LR.leftmostEpsilonPositionOf M (PDA_to_CFG.N.single q Z a) context = DPDA_to_LR.LeftmostEpsilonPosition.single q Z context
- DPDA_to_LR.leftmostEpsilonPositionOf M (PDA_to_CFG.N.list q gamma a) context = DPDA_to_LR.LeftmostEpsilonPosition.list q gamma context
Instances For
Forgetting the grammar target preserves the exact concrete cut.
One forward zero-visible event. start and split only change the
grammar view of a physical cut; epsilon is one actual PDA step.
- start {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} : LeftmostEpsilonStep M LeftmostEpsilonPosition.root (LeftmostEpsilonPosition.list (emptyStackPDA M).initial_state [(emptyStackPDA M).start_symbol] [])
- split {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {q : State M} {Z : StackSymbol M} {gamma context : List (StackSymbol M)} : LeftmostEpsilonStep M (LeftmostEpsilonPosition.list q (Z :: gamma) context) (LeftmostEpsilonPosition.single q Z (gamma ++ context))
- epsilon {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {q next : State M} {Z : StackSymbol M} {replacement context : List (StackSymbol M)} (transition : (next, replacement) ∈ (emptyStackPDA M).transition_fun' q Z) : LeftmostEpsilonStep M (LeftmostEpsilonPosition.single q Z context) (LeftmostEpsilonPosition.list next replacement context)
Instances For
Forward reflexive-transitive closure, oriented so induction exposes the first structural event.
- refl {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} (position : LeftmostEpsilonPosition M) : LeftmostEpsilonTrace M position position
- head {Q T S : Type} [Fintype Q] [Fintype T] [Fintype S] {M : DPDA Q T S} {start middle finish : LeftmostEpsilonPosition M} (first : LeftmostEpsilonStep M start middle) (rest : LeftmostEpsilonTrace M middle finish) : LeftmostEpsilonTrace M start finish
Instances For
Append one structural event to a forward trace.
A zero-visible tail forgets to a forward leftmost trace.
Every structural event is ordinary reachability on any fixed input tail. The two grammar-only events are literal equality of physical cuts.
Operational realization of a complete forward trace.
Control state carried by a leftmost epsilon position.
Equations
- DPDA_to_LR.LeftmostEpsilonPosition.state' M DPDA_to_LR.LeftmostEpsilonPosition.root = (DPDA_to_LR.emptyStackPDA M).initial_state
- DPDA_to_LR.LeftmostEpsilonPosition.state' M (DPDA_to_LR.LeftmostEpsilonPosition.single q Z context) = q
- DPDA_to_LR.LeftmostEpsilonPosition.state' M (DPDA_to_LR.LeftmostEpsilonPosition.list q gamma context) = q
Instances For
Stack prefix displayed by a leftmost epsilon position.
Equations
- DPDA_to_LR.LeftmostEpsilonPosition.upper M DPDA_to_LR.LeftmostEpsilonPosition.root = [(DPDA_to_LR.emptyStackPDA M).start_symbol]
- DPDA_to_LR.LeftmostEpsilonPosition.upper M (DPDA_to_LR.LeftmostEpsilonPosition.single q Z context) = [Z]
- DPDA_to_LR.LeftmostEpsilonPosition.upper M (DPDA_to_LR.LeftmostEpsilonPosition.list q gamma context) = gamma
Instances For
Hidden stack context carried below a leftmost epsilon position.
Equations
- DPDA_to_LR.LeftmostEpsilonPosition.context' M DPDA_to_LR.LeftmostEpsilonPosition.root = []
- DPDA_to_LR.LeftmostEpsilonPosition.context' M (DPDA_to_LR.LeftmostEpsilonPosition.single q Z context) = context
- DPDA_to_LR.LeftmostEpsilonPosition.context' M (DPDA_to_LR.LeftmostEpsilonPosition.list q gamma context) = context
Instances For
At empty input a position is its displayed prefix followed by its hidden context.
Concatenate two runs which retain the same stack frame.
Every structural step preserves any selected suffix of the hidden context. The returned prefix records what was added above that suffix.
A whole leftmost epsilon trace preserves any selected suffix of the starting hidden context.
A trace beginning at a single-stack-symbol position retains its entire hidden context.
Two productive forward zero-visible traces from one structural position
are prefix-comparable. The endpoints and the untouched input tails may
differ; one-symbol lookahead and global usefulness synchronize every actual
epsilon transition, while start and split align definitionally.
Productive zero-visible traces from the same structural position and with the same one-symbol lookahead have the same empty-list return state.
The theorem is stronger than equal-count synchronization: the two traces may contain different numbers of epsilon transitions. Forward structural induction rules this out before the displayed stack first becomes empty.
Two productive leftmost epsilon traces which converge through epsilon transitions to the same displayed list child have equal source state and exposed stack symbol.
The traces may have different hidden stack contexts and different unconsumed input tails. It is enough that their tails have the same one-symbol lookahead and that each child cut has an empty-stack continuation.