Documentation

Linglib.Core.Computability.Subregular.StrictlyLocal

Strictly Local Languages (SL_k) #

A language L is strictly k-local when membership in L is determined by which length-k substrings the boundary-augmented form of the input contains @cite{rogers-pullum-2011} @cite{lambert-2022}. The two equivalent presentations are:

The negative form is what most phonological accounts use (forbidden bigrams, forbidden trigrams), since it is finite even when the alphabet is infinite.

Main definitions #

structure Core.Computability.Subregular.SLGrammar (k : ) (α : Type u_2) :
Type u_2

A strictly k-local grammar over α: a set of permitted length-k factors over the boundary-augmented alphabet Option α (with none as the boundary).

  • permitted : Set (Augmented α)

    The set of permitted k-factors. Factors not listed here are forbidden in any string of the language.

Instances For
    theorem Core.Computability.Subregular.SLGrammar.ext_iff {k : } {α : Type u_2} {x y : SLGrammar k α} :
    x = y x.permitted = y.permitted
    theorem Core.Computability.Subregular.SLGrammar.ext {k : } {α : Type u_2} {x y : SLGrammar k α} (permitted : x.permitted = y.permitted) :
    x = y
    @[implicit_reducible]
    instance Core.Computability.Subregular.SLGrammar.instInhabited {α : Type u_1} {k : } :
    Inhabited (SLGrammar k α)
    Equations
    def Core.Computability.Subregular.SLGrammar.lang {α : Type u_1} {k : } (G : SLGrammar k α) :
    Language α

    The language generated by an SL grammar: strings whose boundary-augmented form has every k-factor in permitted.

    Equations
    Instances For
      @[simp]
      theorem Core.Computability.Subregular.SLGrammar.mem_lang {α : Type u_1} {k : } (G : SLGrammar k α) (w : List α) :
      w G.lang fkFactors k (boundary k w), f G.permitted
      def Core.Computability.Subregular.SLGrammar.ofForbidden {α : Type u_1} {k : } (forbidden : Set (Augmented α)) :

      An SL grammar from a forbidden-factor set. The permitted set is the complement; equivalently, a string is accepted iff none of its k-factors are in forbidden.

      Equations
      Instances For
        @[simp]
        theorem Core.Computability.Subregular.SLGrammar.mem_ofForbidden_lang {α : Type u_1} {k : } (forbidden : Set (Augmented α)) (w : List α) :
        w (ofForbidden forbidden).lang fkFactors k (boundary k w), fforbidden
        def Core.Computability.Subregular.IsStrictlyLocal {α : Type u_1} (k : ) (L : Language α) :

        A language L is strictly k-local iff some SLGrammar k α generates exactly L. This is the witness-style definition (cf. "L is regular iff some DFA accepts L" in Mathlib.Computability.DFA).

        Equations
        Instances For

          Every SL grammar witnesses IsStrictlyLocal for its language.