Documentation

CslibFrontier.Computability.Automata.NA.Map

Relabelling nondeterministic automata along a letter map #

Given a letter map f : Symbol → Symbol' and a nondeterministic automaton na over Symbol, na.map f is the automaton over Symbol' with the same states, start and accepting states, which can step from s to t on b whenever na can step from s to t on some letter a with f a = b. It accepts exactly the image Language.map f (language na): this is the projection step of the translation of monadic second-order logic into automata Thomas, Section 3.

Unlike NA.FinAcc.preimage, which pulls an automaton back along a language homomorphism, map pushes it forward along a letter-to-letter map, so it needs nondeterminism even when na is deterministic.

Main definitions #

Main results #

References #

def Cslib.Automata.NA.FinAcc.map {State : Type u_1} {Symbol : Type u_2} {Symbol' : Type u_3} (f : Symbol → Symbol') (na : FinAcc State Symbol) :
FinAcc State Symbol'

Relabel the transitions of an automaton along a letter map f: na.map f steps from s to t on b when na steps from s to t on some letter a with f a = b.

@[simp]
theorem Cslib.Automata.NA.FinAcc.map_start {State : Type u_1} {Symbol : Type u_2} {Symbol' : Type u_3} (f : Symbol → Symbol') (na : FinAcc State Symbol) :
(map f na).start = na.start
@[simp]
theorem Cslib.Automata.NA.FinAcc.map_accept {State : Type u_1} {Symbol : Type u_2} {Symbol' : Type u_3} (f : Symbol → Symbol') (na : FinAcc State Symbol) :
(map f na).accept = na.accept
theorem Cslib.Automata.NA.FinAcc.map_mTr {State : Type u_1} {Symbol : Type u_2} {Symbol' : Type u_3} (f : Symbol → Symbol') (na : FinAcc State Symbol) {s t : State} {ys : List Symbol'} :
(map f na).MTr s ys t ↔ ∃ (xs : List Symbol), List.map f xs = ys ∧ na.MTr s xs t

na.map f has a run from s to t on ys iff na has one on some word that f maps to ys.

theorem Cslib.Automata.NA.FinAcc.map_language_eq {State : Type u_1} {Symbol : Type u_2} {Symbol' : Type u_3} (f : Symbol → Symbol') (na : FinAcc State Symbol) :

na.map f accepts the image under f of the language of na.