{aⁿbⁿcⁿdⁿ}: a four-symbol non-context-free witness language #
The single-parameter four-symbol witness anbncndn = {aⁿbⁿcⁿdⁿ | n ≥ 0},
proven non-context-free via the CFL pumping lemma + the unified adjacency
lemma in BlockWitness.
Membership requires na = nb = nc = nd (all four counts equal) and the
sorted shape aⁿbⁿcⁿdⁿ. Pumping breaks at least one count equality.
This file also hosts the shared FourSymbol substrate consumed by the
two-parameter relaxation in NonContextFree.AmBnCmDn:
- The alphabet (
FourSymbol,FourString,LawfulBEq). - Witness-form bridges (
makeString_anbncndn_eq_blockwitness). - Three adjacency consequences via
BlockWitness.not_both_in_vxy(not_a_and_d_in_vxy,not_a_and_c_in_vxy,not_b_and_d_in_vxy). - Filter-count machinery (
filter_count,filter_eq_nil_of_not_mem,fourSymbol_filter_total).
Closure properties for IsContextFree (homomorphism, regular intersection)
live in Linglib.Core.Computability.ContextFreeGrammar.Closure.
Alphabet for cross-serial dependency patterns.
- 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 }
The language {aⁿbⁿcⁿdⁿ | n ≥ 0}, modeling Dutch cross-serial dependencies.
Equations
- One or more equations did not get rendered due to their size.
- isInLanguage_anbncndn [] = true
Instances For
Generate 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 a mathlib Language.
Equations
- anbncndn = {w : List FourSymbol | isInLanguage_anbncndn w = true}
Instances For
Each symbol's filter count in makeString_anbncndn n equals n. Shared
with AmBnCmDn (which pumps over the same diagonal witness).
The four-symbol witness is structurally BlockWitness [a, b, c, d] n.
makeString_anbncndn n is always in {aⁿbⁿcⁿdⁿ}.
Membership characterization: every string in anbncndn is makeString_anbncndn n
for some n. The converse to makeString_in_language.
Pumping breaks membership in {aⁿbⁿcⁿdⁿ}.
{aⁿbⁿcⁿdⁿ} does NOT have the CFL pumping property.