Langlib

Langlib.Classes.ContextFree.Basics.Elementary

Elementary Context-Free Languages #

This file builds basic context-free grammars witnessing simple languages.

Main declarations #

Context-free grammar for the empty Language (i.e., always gives false).

Equations
Instances For

    Characterization of the empty Language.

    Context-free grammar for the singleton Language that contains [] as its only word.

    Equations
    Instances For

      Characterization of the singleton Language.

      def cfg_symbol_star {T : Type} (a : T) :

      Context-free grammar for a Language {a}.star where a is a given terminal symbol.

      Equations
      Instances For
        theorem language_of_cfg_symbol_star {T : Type} (a : T) :
        CF_language (cfg_symbol_star a) = fun (w : List T) => ∃ (n : ), w = List.replicate n a

        Characterization of the {a}.star Language.