Deterministic Context-Free Languages Are Not Closed Under Homomorphism #
If deterministic context-free languages were closed under arbitrary string homomorphisms, then erasing the first symbol of a prefix-marked disjoint union would make them closed under union.
@[reducible, inline]
Equations
Instances For
def
DCFHomomorphism.DPDA.leftQuotientSingleton
{Q A S : Type}
[Fintype Q]
[Fintype A]
[Fintype S]
(M : DPDA Q A S)
(a : A)
:
DPDA (LeftQuotientState Q) A S
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
DCFHomomorphism.DPDA.leftQuotientSingleton_accepts
{Q A S : Type}
[Fintype Q]
[Fintype A]
[Fintype S]
(M : DPDA Q A S)
(a : A)
:
(leftQuotientSingleton M a).acceptsByFinalState = (fun (x : List A) (L : Language A) => L.leftQuotient x) [a] M.acceptsByFinalState
theorem
DCFHomomorphism.DPDA.is_DCF_leftQuotient_singleton
{Q A S : Type}
[Fintype Q]
[Fintype A]
[Fintype S]
(M : DPDA Q A S)
(a : A)
:
is_DCF ((fun (x : List A) (L : Language A) => L.leftQuotient x) [a] M.acceptsByFinalState)
A disjoint, prefix-marked choice between two languages. The leading Boolean
selects the source language and every payload symbol is injected with Sum.inr.
Unlike ordinary union, this operation is deterministic: a DPDA chooses the source machine from the first input symbol.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
DCFHomomorphism.DCF_markedChoice
{T : Type}
[Fintype T]
{L₁ L₂ : Language T}
(hL₁ : is_DCF L₁)
(hL₂ : is_DCF L₂)
:
is_DCF (markedChoice L₁ L₂)
Prefix-marked choice preserves deterministic context-freeness.
theorem
DCFHomomorphism.DCF_notClosedUnderHomomorphism :
¬ClosedUnderHomomorphism fun {α : Type} [Fintype α] => is_DCF
theorem
DCFHomomorphism.DCF_notClosedUnderEpsFreeHomomorphism :
¬ClosedUnderEpsFreeHomomorphism fun {α : Type} [Fintype α] => is_DCF