Documentation

Linglib.Core.Computability.Subregular.Function.Hierarchy

The subregular function hierarchy #

Inclusions among the directionality classes of Core/Computability/Subregular/Function/, assembled from the strictly-local, synchronous-subsequential (LetterSubsequential) and bimachine (Bimachine) substrate:

single-symbol ISL/OSL ⊆ IsLetterLeftSubsequential ⊆ IsBimachineWeaklyDeterministic ⊆ IsBimachineComputable

A left-subsequential transducer is the degenerate bimachine whose right automaton is trivial, so its cell output is a one-sided rule — non-interacting.

Main results #

TODO #

Synchronous ⊆ block subsequential #

A Mealy machine is an SFST emitting singleton blocks with an empty final flush, so the synchronous class embeds in the block class scanning the same direction.

def Subregular.Mealy.toSFST {σ : Type u_1} {α : Type u_2} {β : Type u_3} (T : Mealy σ α β) :
SFST α β σ

View a synchronous transducer as a block SFST: singleton outputs, empty flush.

Equations
  • T.toSFST = { start := T.initial, step := fun (s : σ) (x : α) => ((T.step s x).1, [(T.step s x).2]), finalOutput := fun (x : σ) => [] }
Instances For
    @[simp]
    theorem Subregular.Mealy.toSFST_runFrom {σ : Type u_1} {α : Type u_2} {β : Type u_3} (T : Mealy σ α β) (s : σ) (xs : List α) :
    T.toSFST.runFrom s xs = T.runFrom s xs
    @[simp]
    theorem Subregular.Mealy.toSFST_run {σ : Type u_1} {α : Type u_2} {β : Type u_3} (T : Mealy σ α β) :
    T.toSFST.run = T.run
    theorem Subregular.IsLetterLeftSubsequential.isLeftSubsequential {α : Type u_2} {β : Type u_3} {f : List αList β} (hf : IsLetterLeftSubsequential f) :

    A letter-left-subsequential function is left-subsequential: synchronous ⊆ block.

    Subsequential ⊆ weakly deterministic. A synchronous left-subsequential function is computed by a non-interacting bimachine: the left automaton is the transducer, the right automaton is trivial, so the cell output is a one-sided rule (ωR is the identity).

    theorem Subregular.IsBimachineComputable.of_weaklyDeterministic {α : Type u_1} [DecidableEq α] {f : List αList α} (h : IsBimachineWeaklyDeterministic f) :

    Weakly deterministic ⊆ regular. A non-interacting bimachine is a bimachine.

    Strictness: WD ⊊ regular #

    A conjunctive change — a target raised iff a trigger occurs on both sides — is bimachine-computable but RequiresBothSides, so no non-interacting bimachine computes it.

    Toy alphabet for the conjunctive-change witness: a trigger, a recessive target, and its raised form.

    Instances For
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      def Subregular.instReprConjSym.repr :
      ConjSymStd.Format
      Equations
      Instances For

        A target raises iff a trigger occurs on both sides — a flag bimachine (Bimachine.ofFlags) tracking a trigger on each side, whose cell genuinely needs both flags (l && r).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Subregular.conjBase (d : ) :
          List ConjSym

          Witness word at distance d: a medial .tgt flanked by d neutral fillers and a .trig on each end. The two perturbations replace one end's .trig with a filler.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            The conjunctive spread requires both sides: the base raises a medial target (a trigger on each side), but flipping either far trigger to a filler reverts it. The perturbations are List.sets of the base, so they agree with it off the flipped index (getElem?_set_ne), and the reverting cell output is read off via conjBM_run_at.

            The strictly-local lower end: single-symbol ISL/OSL ⊆ subsequential #

            The ISL/OSL classes are block-output (length-changing) in general, so they sit outside the length-preserving lattice. Their single-symbol (length-preserving) fragment embeds: the same bounded window that makes toFinSFST finite-state serves as a Mealy state, with the lone output symbol as the letter. This extends the chain to single-symbol ISL/OSL ⊆ subsequential ⊆ WD ⊆ regular.

            def Subregular.ISLRule.toMealy {α : Type u_2} {β : Type u_3} {k : } [Fintype α] (r : ISLRule k α β) (hs : ∀ (w : List α) (x : α), (r.windowOutput w x).length = 1) :
            Mealy { l : List α // l.length k - 1 } α β

            A length-preserving (single-symbol) left-ISL rule as a synchronous transducer: the bounded input window is the state, the lone output symbol the letter.

            Equations
            • r.toMealy hs = { initial := [], , step := fun (w : { l : List α // l.length k - 1 }) (x : α) => ((w ++ [x]).rtake (k - 1), , (r.windowOutput (↑w) x).head ) }
            Instances For
              theorem Subregular.ISLRule.toMealy_run_eq_apply {α : Type u_2} {β : Type u_3} {k : } [Fintype α] (r : ISLRule k α β) (hs : ∀ (w : List α) (x : α), (r.windowOutput w x).length = 1) :
              (r.toMealy hs).run = r.apply
              theorem Subregular.isLetterLeftSubsequential_of_ISLRule {α : Type u_2} {β : Type u_3} {k : } [Fintype α] (r : ISLRule k α β) (hs : ∀ (w : List α) (x : α), (r.windowOutput w x).length = 1) :

              Single-symbol left-ISL ⊆ left-subsequential.

              def Subregular.OSLRule.toMealy {α : Type u_2} {β : Type u_3} {k : } (r : OSLRule k α β) (hs : ∀ (w : List β) (x : α), (r.windowOutput w x).length = 1) :
              Mealy { l : List β // l.length k - 1 } α β

              A length-preserving (single-symbol) left-OSL rule as a synchronous transducer: the bounded output window is the state.

              Equations
              • r.toMealy hs = { initial := [], , step := fun (w : { l : List β // l.length k - 1 }) (x : α) => ((w ++ r.windowOutput (↑w) x).rtake (k - 1), , (r.windowOutput (↑w) x).head ) }
              Instances For
                theorem Subregular.OSLRule.toMealy_run_eq_apply {α : Type u_2} {β : Type u_3} {k : } [Fintype β] (r : OSLRule k α β) (hs : ∀ (w : List β) (x : α), (r.windowOutput w x).length = 1) :
                (r.toMealy hs).run = r.apply
                theorem Subregular.isLetterLeftSubsequential_of_OSLRule {α : Type u_2} {β : Type u_3} {k : } [Fintype β] (r : OSLRule k α β) (hs : ∀ (w : List β) (x : α), (r.windowOutput w x).length = 1) :

                Single-symbol left-OSL ⊆ left-subsequential.

                theorem Subregular.IsBimachineWeaklyDeterministic.of_ISLRule {α : Type u_2} {k : } [Fintype α] [DecidableEq α] (r : ISLRule k α α) (hs : ∀ (w : List α) (x : α), (r.windowOutput w x).length = 1) :

                Single-symbol left-ISL ⊆ WD — extends the lattice down through subsequential.

                theorem Subregular.IsBimachineWeaklyDeterministic.of_OSLRule {α : Type u_2} {k : } [Fintype α] [DecidableEq α] (r : OSLRule k α α) (hs : ∀ (w : List α) (x : α), (r.windowOutput w x).length = 1) :

                Single-symbol left-OSL ⊆ WD.