Documentation

Linglib.Core.Computability.NonContextFree.AnBnCn

{aⁿbⁿcⁿ}: a three-symbol non-context-free witness language #

The classical three-symbol non-context-free witness anbnc = {aⁿbⁿcⁿ | n ≥ 0}, proven non-context-free via the CFL pumping lemma + the unified adjacency lemma in BlockWitness.

Independent of AnBnCnDn and AmBnCmDn — uses its own ThreeSymbol alphabet and parallel filter-count machinery.

inductive ThreeSymbol :

Alphabet for {aⁿbⁿcⁿ}.

Instances For
    @[implicit_reducible]
    Equations
    def instReprThreeSymbol.repr :
    ThreeSymbolStd.Format
    Equations
    Instances For
      @[implicit_reducible]
      Equations
      def isInLanguage_anbnc (w : List ThreeSymbol) :
      Bool

      The language {aⁿbⁿcⁿ | n ≥ 0}.

      Equations
      Instances For
        def makeString_anbnc (n : ) :

        Generate aⁿbⁿcⁿ.

        Equations
        Instances For
          def anbnc :
          Language ThreeSymbol

          The language {aⁿbⁿcⁿ | n ≥ 0} as a mathlib Language.

          Equations
          Instances For
            theorem mem_anbnc_iff (w : List ThreeSymbol) :
            w anbnc ∃ (n : ), w = makeString_anbnc n

            Membership characterization: every string in anbnc is makeString_anbnc n for some n. Mirror of mem_anbncndn_iff; consumed by the homomorphic reduction aⁿbⁿcⁿdⁿ → aⁿbⁿcⁿ in AnBnCnDn.

            {aⁿbⁿcⁿ} does NOT have the CFL pumping property.

            theorem anbnc_not_contextFree :
            ¬anbnc.IsContextFree

            {aⁿbⁿcⁿ} is not context-free.