unfold stepChar at h
nfa : NFA
c : Char
pos : String.Pos
next : SparseSet nfa.nodes.size
saveSlots : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
target : Fin nfa.nodes.size
matched' : Option (Array (Option String.Pos))
next' : SparseSet nfa.nodes.size
saveSlots' : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
h : stepChar nfa c pos next saveSlots target = (matched', next', saveSlots')
inv : ∀ (i j : Fin nfa.nodes.size), i ∈ next → ↑j ∈ nfa.εStep ↑i → j ∈ next
⊢ ∀ (j : Fin nfa.nodes.size), j ∈ next' ↔ j ∈ next ∨ ∃ i ∈ nfa.charStep (↑target) c, ↑j ∈ nfa.εClosure i
nfa : NFA
c : Char
pos : String.Pos
next : SparseSet nfa.nodes.size
saveSlots : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
target : Fin nfa.nodes.size
matched' : Option (Array (Option String.Pos))
next' : SparseSet nfa.nodes.size
saveSlots' : Data.Vec (Array (Option String.Pos)) nfa.nodes.size
h :
  (match hn : nfa[target] with
    | Node.char c' target' =>
      if c = c' then
        let_fun isLt := ⋯;
        let currentSave := saveSlots.get ↑target ⋯;
        exploreεClosure nfa pos next currentSave none saveSlots ⟨target', isLt⟩ #[]
      else (none, next, saveSlots)
    | Node.sparse cs target' =>
      if c ∈ cs then
        let_fun isLt := ⋯;
        let currentSave := saveSlots.get ↑target ⋯;
        exploreεClosure nfa pos next currentSave none saveSlots ⟨target', isLt⟩ #[]
      else (none, next, saveSlots)
    | x => (none, next, saveSlots)) =
    (matched', next', saveSlots')
inv : ∀ (i j : Fin nfa.nodes.size), i ∈ next → ↑j ∈ nfa.εStep ↑i → j ∈ next
⊢ ∀ (j : Fin nfa.nodes.size), j ∈ next' ↔ j ∈ next ∨ ∃ i ∈ nfa.charStep (↑target) c, ↑j ∈ nfa.εClosure i