{aⁿbⁿcⁿdⁿ}: a four-symbol non-context-free witness #
The single-parameter four-symbol witness anbncndn = {aⁿbⁿcⁿdⁿ | n ≥ 0}.
Non-context-freeness is derived by closure, not re-proved by pumping: the erasing
homomorphism dropD : d ↦ ε maps anbncndn exactly onto the counting core
anbnc = {aⁿbⁿcⁿ}, so anbncndn_not_contextFree follows from anbnc_not_contextFree through
Language.IsContextFree.stringMap. aⁿbⁿcⁿdⁿ is the nested-counting case; the genuinely
crossing witness is the two-parameter ambncmdn sibling, which does not reduce by
single-symbol erasure.
This file also hosts the FourSymbol substrate shared with NonContextFree.AmBnCmDn: the
alphabet, the witness-form bridge to BlockWitness, and the two adjacency consequences.
Main definitions #
FourSymbol,FourString: the shared four-letter alphabet and its words.makeString_anbncndn n: the witness wordaⁿbⁿcⁿdⁿ.anbncndn: the language{aⁿbⁿcⁿdⁿ | n ≥ 0}, as the range ofmakeString_anbncndn.dropD: the erasing homomorphismd ↦ εwitnessing the reduction toanbnc.
Main results #
not_a_and_c_in_vxy/not_b_and_d_in_vxy: a window of length≤ pcannot meet two blocks that are not adjacent.stringMap_dropD_anbncndn:dropDmapsanbncndnontoanbnc.anbncndn_not_contextFree:anbncndnis not context-free.
Alphabet for the four-symbol counting witness languages.
- a : FourSymbol
- b : FourSymbol
- c : FourSymbol
- d : FourSymbol
Instances For
Equations
- instDecidableEqFourSymbol x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- instReprFourSymbol.repr FourSymbol.a prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "FourSymbol.a")).group prec✝
- instReprFourSymbol.repr FourSymbol.b prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "FourSymbol.b")).group prec✝
- instReprFourSymbol.repr FourSymbol.c prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "FourSymbol.c")).group prec✝
- instReprFourSymbol.repr FourSymbol.d prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "FourSymbol.d")).group prec✝
Instances For
Equations
- instReprFourSymbol = { reprPrec := instReprFourSymbol.repr }
Words over the four-symbol alphabet.
Equations
- FourString = List FourSymbol
Instances For
The witness word aⁿbⁿcⁿdⁿ.
Equations
- makeString_anbncndn n = List.replicate n FourSymbol.a ++ List.replicate n FourSymbol.b ++ List.replicate n FourSymbol.c ++ List.replicate n FourSymbol.d
Instances For
The language {aⁿbⁿcⁿdⁿ | n ≥ 0}, as the range of makeString_anbncndn.
Equations
- anbncndn = {w : List FourSymbol | ∃ (n : ℕ), w = makeString_anbncndn n}
Instances For
Membership characterization: every string in anbncndn is makeString_anbncndn n for
some n.
Each of the four symbols occurs exactly n times in the witness. Shared with AmBnCmDn,
which pumps over the same diagonal witness.
The four symbol counts of a word sum to its length.
The four-symbol witness is structurally BlockWitness [a, b, c, d] n.
Non-context-freeness by homomorphic reduction to {aⁿbⁿcⁿ} #
dropD erases the dⁿ block and relabels, sending the witness to makeString_anbnc n.
{aⁿbⁿcⁿdⁿ} is not context-free — derived by closure from anbnc_not_contextFree via the
erasing homomorphism dropD, rather than re-proved by pumping.