ε-transition function for the FS→ES PDA conversion. Defined as a top-level function to ensure good definitional reduction.
Equations
- PDA_FS_to_ES_eps M (Sum.inr 0) none = {(Sum.inl M.initial_state, [some M.start_symbol, none])}
- PDA_FS_to_ES_eps M (Sum.inl q) (some s) = (fun (p : Q × List S) => (Sum.inl p.1, List.map some p.2)) '' M.transition_fun' q s ∪ if q ∈ M.final_states then {(Sum.inr 1, [])} else ∅
- PDA_FS_to_ES_eps M (Sum.inl q) none = if q ∈ M.final_states then {(Sum.inr 1, [])} else ∅
- PDA_FS_to_ES_eps M (Sum.inr 1) x✝ = {(Sum.inr 1, [])}
- PDA_FS_to_ES_eps M (Sum.inr 0) (some val) = ∅
Instances For
Multi-step simulation: if M reaches r₂ from r₁, then M' reaches lift(r₂) from lift(r₁).
Invariant for configurations reachable from the initial config of the FS→ES PDA.
Every such configuration is either:
(1) the initial config (inr 0, w, [none])
(2) a simulation of M: (inl q, w', γ.map some ++ [none]) with
M.Reaches ⟨M.initial_state, w, [M.start_symbol]⟩ ⟨q, w', γ⟩
(3) the drain state (inr 1, ...) with a witness that some final state of M
was reached on empty input.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The invariant is preserved by multi-step reachability.
Backward direction of PDA_FS_subset_ES.
Empty-stack acceptance ⊆ Final-state acceptance #
Given a PDA M that accepts by empty stack, we construct a new PDA M' that
accepts by final state, recognising the same language.
The construction adds:
ε-transition function for the ES→FS PDA conversion.
Equations
- PDA_ES_to_FS_eps M (Sum.inr 0) none = {(Sum.inl M.initial_state, [some M.start_symbol, none])}
- PDA_ES_to_FS_eps M (Sum.inl q) (some s) = (fun (p : Q × List S) => (Sum.inl p.1, List.map some p.2)) '' M.transition_fun' q s
- PDA_ES_to_FS_eps M (Sum.inl q) none = {(Sum.inr 1, [])}
- PDA_ES_to_FS_eps M (Sum.inr 1) x✝ = ∅
- PDA_ES_to_FS_eps M (Sum.inr 0) (some val) = ∅
Instances For
Lifting a configuration from the original PDA to the ES→FS PDA.
Equations
Instances For
Multi-step simulation: if M reaches r₂ from r₁, then the ES→FS PDA reaches lift(r₂) from lift(r₁).
Invariant for configurations reachable from the initial config of the ES→FS PDA.
Every such configuration is either:
(1) the initial config (inr 0, w, [none])
(2) a simulation of M: (inl q, w', γ.map some ++ [none]) with
M.Reaches ⟨M.initial_state, w, [M.start_symbol]⟩ ⟨q, w', γ⟩
(3) the accepting state (inr 1, w', []) with a witness that M
reached empty stack on some suffix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Any PDA empty-stack language is also a PDA final-state language.
A language is accepted by some PDA via empty-stack acceptance iff it is accepted by some PDA via final-state acceptance.
The languages accepted by PDAs via final-state acceptance are exactly the languages accepted by PDAs via empty-stack acceptance.