Documentation

RegexCorrectness.VM.CharStep.Basic

theorem Regex.VM.eachStepChar.go.induct' (σ : Strategy) (nfa : NFA) (wf : nfa.WellFormed) (it : String.Iterator) (current : SearchState σ nfa) (motive : (i : ) → i current.states.countSearchState σ nfaProp) (base : ∀ (next : SearchState σ nfa), motive current.states.count next) (done : ∀ (i : ) (hlt : i < current.states.count) (next : SearchState σ nfa), nfa[current.states[i]] = NFA.Node.donemotive i next) (found : ∀ (i : ) (hlt : i < current.states.count) (next : SearchState σ nfa), nfa[current.states[i]] NFA.Node.done∀ (matched : Option σ.Update) (next' : SearchState σ nfa), stepChar σ nfa wf it current.updates next current.states[i] = (matched, next')matched.isSome = truemotive i next) (not_found : ∀ (i : ) (hlt : i < current.states.count) (next : SearchState σ nfa), nfa[current.states[i]] NFA.Node.done∀ (matched : Option σ.Update) (next' : SearchState σ nfa), stepChar σ nfa wf it current.updates next current.states[i] = (matched, next')¬matched.isSome = truemotive (i + 1) next'motive i next) (i : ) (hle : i current.states.count) (next : SearchState σ nfa) :
motive i hle next
@[simp]
theorem Regex.VM.eachStepChar.go_base {σ : Strategy} {nfa : NFA} {wf : nfa.WellFormed} {it : String.Iterator} {current next : SearchState σ nfa} :
go σ nfa wf it current current.states.count next = (none, next)
@[simp]
theorem Regex.VM.eachStepChar.go_done {σ : Strategy} {nfa : NFA} {wf : nfa.WellFormed} {it : String.Iterator} {current : SearchState σ nfa} {i : } {next : SearchState σ nfa} (hlt : i < current.states.count) (hn : nfa[current.states[i]] = NFA.Node.done) :
go σ nfa wf it current i next = (none, next)
@[simp]
theorem Regex.VM.eachStepChar.go_found {σ : Strategy} {nfa : NFA} {wf : nfa.WellFormed} {it : String.Iterator} {current : SearchState σ nfa} {i : } {next next' : SearchState σ nfa} {matched : Option σ.Update} (hlt : i < current.states.count) (hn : nfa[current.states[i]] NFA.Node.done) (h : stepChar σ nfa wf it current.updates next current.states[i] = (matched, next')) (found : matched.isSome = true) :
go σ nfa wf it current i next = (matched, next')
@[simp]
theorem Regex.VM.eachStepChar.go_not_found {σ : Strategy} {nfa : NFA} {wf : nfa.WellFormed} {it : String.Iterator} {current : SearchState σ nfa} {i : } {next next' : SearchState σ nfa} {matched : Option σ.Update} (hlt : i < current.states.count) (hn : nfa[current.states[i]] NFA.Node.done) (h : stepChar σ nfa wf it current.updates next current.states[i] = (matched, next')) (not_found : ¬matched.isSome = true) :
go σ nfa wf it current i next = go σ nfa wf it current (i + 1) next'